최종 식선생

테이블 (5)

문항 (options)

  • id — int — 기본 키 — NOT NULL
  • question_id — int — 외래 키 → 질문.id — NOT NULL — autoincrement
  • 문항 (text) — text
  • 순서 (order) — int
  • 다음 문제 id (next_question_id) — int

설문 (Surveys)

  • id — int — 기본 키 — NOT NULL
  • 제목 (title) — str
  • 설명 (description) — Text

유저 (users)

  • id — int — 기본 키 — NOT NULL
  • 유저 id (user_id) — str
  • 소셜로그인 (provider) — str
  • 액세스 토큰 (access_token) — str
  • 리프레시 토큰 (refresh_token) — str
  • 이름 (name) — str
  • 키 (height) — float
  • 몸무게 (weight) — float
  • 생년월일 (birthday) — date
  • 성별 (gender) — str
  • 혈액형 (blood_type) — str
  • 목표 체중 (tartget_weight) — float

유저 응답 (user_responses)

  • id — int — 기본 키 — NOT NULL
  • user_id — int — 외래 키 → 유저.id — NOT NULL
  • survey_id — int — 외래 키 → 설문.id — NOT NULL
  • question_id — int — 외래 키 → 질문.id — NOT NULL — autoincrement
  • option_id — int — 외래 키 → 문항.id — NOT NULL
  • 타입 (type) — int
  • 답변 (answer) — str

질문 (questions)

  • id — int — 기본 키 — NOT NULL — autoincrement
  • survey_id — int — 외래 키 → 설문.id — NOT NULL
  • 질문 (text) — text
  • 순서 (order) — int
  • 페이지 (page_number) — int