Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[기획] 공고 스펙 상세 #1

Open
metamon123 opened this issue Apr 27, 2023 · 5 comments
Open

[기획] 공고 스펙 상세 #1

metamon123 opened this issue Apr 27, 2023 · 5 comments
Assignees

Comments

@metamon123
Copy link
Collaborator

metamon123 commented Apr 27, 2023

무엇을 하는 기능인가요?

설문 데이터를 수집하고 싶은 연구자(데이터 구매자)가 자신의 설문을 홈페이지에 등록하는 기능입니다.

API 목록

  • GET http://localhost/survey/
    • response (json) = Survey[]
  • GET http://localhost/survey/{id: string}
    • response (json) = Survey | null
  • POST http://localhost/survey/
    • request body (json) = RegisterSurveyDto
    • response (json) = Survey

관련 데이터 스키마

공고 등록 스펙 (RegisterSurveyDto)

RegisterSurveyDto {
  "publisherWalletId": "string" & not null & len > 0,
  "title": "string" & not null & len > 0,
  "summary": "string",
  "desc": "string" & not null & len > 0,
  "privateAttendeeKey": "string",
  "publicAttendeeEmailPattern": "string",
  "maxAttendeeCount": int (ex. 0),
  "automaticClosingDatetime": datetime string (ex. "2023-05-05T13:30:01Z"),
  "manualClosing": boolean (ex. true),
  "reward": int (ex. 0),
  "questions": [
    "string"
  ]
}
  1. 실험의 내용
    • title (필수, string)
    • summary (string)
      • 실험 목록이 card 목록으로 표시될 때 제목과 함께 표시할 짧은 설명
    • desc (필수, string)
      • 특정 실험을 클릭한 뒤에 보여질 긴 설명
  2. 실험 종료 조건
    • maxAttendeeCount (필수, int)
      • 실험 참여자 수의 최댓값
      • 연구자의 과한 지출 방지 목적
    • manualClosing (필수, boolean)
      • 연구자의 수동 종료 기능 on 여부
    • automaticClosingDatetime (필수, datetime string yyyy-MM-dd'T'HH:mm:ss'Z' ex. 2023-05-05T00:00:01Z)
      • 실험 마감 기간 (자동 마감)
      • 연구자의 어뷰징 방지 목적
  3. 보상
    • reward (필수, int)
  4. 게시자의 id
    • publisherWalletId (필수, string)
      • survey register 시에 게시자가 입력 폼에 작성하는 wallet id
    • 추후에는 로그인된 세션의 계정 정보에서 게시자의 플랫폼 id 를 사용하는 방식으로 변경 예정
  5. 질문 목록
    • questions (필수, string[])
  6. 실험 참가 자격 (private: 지정된 실험 인원 ⇒ public: 불특정 다수)
    • privateAttendeeKey (string): 비밀키
    • publicAttendeeEmailPattern (string): (특정) 이메일 패턴
    • (구현 우선순위는 낮음. 있으면 좋지만 최종 제출물에 없어도 무관.)

공고 목록 (SurveyDto[])

SurveyDto {
  "id": "string",
  "publisherWalletId": "string",
  "title": "string",
  "summary": "string",
  "desc": "string",
  "privateAttendeeKey": "string",
  "publicAttendeeEmailPattern": "string",
  "maxAttendeeCount": int (ex. 0),
  "automaticClosingDatetime": datetime string (ex. "2023-05-05T13:30:01Z"),
  "manualClosing": boolean (ex. true), 
  "reward": int (ex. 0),
  "questions": [
    "string"
  ],
  "closed": true,
  "manuallyClosed": false
}

RegisterSurveyDto 에 몇가지 필드가 추가된 객체.
현재는 id, closed, manuallyClosed 필드만 추가됨.

  • id (string): survey 의 id
  • closed (boolean): 실험이 종료되었는지
    • manuallyClosed 를 안 보고 이 값만 봐도 좋습니다.
  • manuallyClosed (boolean): 실험이 수동으로 종료되었는지
    • 이 값과 automaticClosingDatetime 을 참고해서 closed 가 정해집니다.
@metamon123 metamon123 converted this from a draft issue Apr 27, 2023
@metamon123 metamon123 added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Apr 27, 2023
Repository owner deleted a comment from jaeyubsong Apr 27, 2023
@metamon123
Copy link
Collaborator Author

논의 후에 min 인원 항목은 빼기로 해서 삭제하겠습니다.

@metamon123 metamon123 moved this from Todo to In Progress in Trust Survey Apr 27, 2023
@metamon123
Copy link
Collaborator Author

description 을 요약본 / 본문의 2개 필드로 나누면 좋을 수도?

@metamon123
Copy link
Collaborator Author

  • 실험 내용에 title, summary 가 추가되었습니다.
  • 실험 참가 자격 항목의 구현 우선순위를 낮췄습니다.
  • 실험 종료 조건 > 자동 종료의 type 을 datetime string 으로 변경했습니다.
  • 게시자의 id 항목을 추가했습니다.
  • 질문 목록을 추가했습니다.
  • 전반적으로 항목이 필수적으로 요구되는지를 업데이트했습니다.

@metamon123
Copy link
Collaborator Author

@hbin0701
정확한 API 목록과 데이터 스키마(RegisterSurveyDto, Survey)를 추가했습니다.
#5 가 main 에 머지되면 적절한 swagger 업데이트와 함께 서버에 반영될 예정이니, 프론트 작업 시에 참고해주세요!

@metamon123
Copy link
Collaborator Author

@hbin0701
Survey 데이터가 SurveyDto 로 이름이 바뀌었으며, closed manuallyClosed 가 추가되었습니다.
manuallyClosed 는 쓸 일이 없으실 것 같고, closed 필드를 프론트에서 사용하시면 될 것 같습니다.

  • SurveyDto.closed (boolean): 실험이 종료되었는지
    • SurveyDto.manuallyClosed 를 안 보고 이 값만 봐도 좋습니다.
  • SurveyDto.manuallyClosed (boolean): 실험이 수동으로 종료되었는지
    • 이 값과 SurveyDto.automaticClosingDatetime 을 참고해서 closed 가 정해집니다.

@metamon123 metamon123 assigned metamon123 and unassigned jaeyubsong May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants