isimjeonsim

Tables (12)

answer_reminders (참여 독려)

  • reminder_id (독려 id) — BIGINT — Primary key — NOT NULL
  • daily_question_id (일일 질문 id) — BIGINT — Foreign key → daily_questions.daily_question_id — NOT NULL
  • question_id (질문 id2) — BIGINT — Foreign key → daily_questions.question_id — NOT NULL
  • sent_ad (발송 시각) — TIMESTAMP
  • from_user_id (알림보낸사람id) — BIGINT — Foreign key → users.user_id — NOT NULL
  • to_user_id (알림받은사람id) — BIGINT — Foreign key → users.user_id — NOT NULL

answers (답변)

  • answer_id (Key) — BIGINT — Primary key — NOT NULL
  • user_id (유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • family_id (가족아이디) — BIGINT — Foreign key → families.family_id — NOT NULL
  • daily_question_id (일일 질문 id) — BIGINT — Foreign key → daily_questions.daily_question_id — NOT NULL
  • original_answer (최초 작성 답변) — TEXT
  • final_answer (최종 제출 답변) — TEXT
  • is_modified (수정 여부) — TINYINT(1)
  • ai_feedback (AI 피드백 내용) — TEXT
  • submitted_at (제출 일시) — TIMESTAMP
  • updated_at (수정 시각) — TIMESTAMP

comments (댓글)

  • comment_id (Key) — BIGINT — Primary key — NOT NULL
  • user_id (유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • daily_question_id (일일 질문 id) — BIGINT — Foreign key → daily_questions.daily_question_id — NOT NULL
  • content (댓글 내용) — TEXT
  • created_at (생성 시각) — TIMESTAMP
  • updated_at (수정 시각) — TIMESTAMP
  • is_deleted (삭제 여부) — TINYINT(1)

daily_questions (일일질문)

  • daily_question_id (일일 질문 id) — BIGINT — Primary key — NOT NULL
  • family_id (가족아이디) — BIGINT — Foreign key → families.family_id — NOT NULL
  • question_id (질문 id) — BIGINT — Foreign key → questions.question_id — NOT NULL
  • assigned_date (배정된 날짜) — DATE
  • is_all_answered (전원 참석 여부) — TINYINY(1)
  • published_at (답변 공개 시각) — TIMESTAMP
  • created_at (생성시각) — TIMESTAMP

families (가족)

  • family_id (가족아이디) — BIGINT — Primary key — NOT NULL
  • created_by (생성자 유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • family_name (가족 이름) — VARCHAR(100)
  • invite_code (가족 초대 코드) — VARCHAR(20)
  • created_at (생성시각) — TIMESTAMP
  • updated_at (수정시각) — TIMESTAMP
  • is_active (활성 상태) — TINYINT(1)

family_levels (관계 성장 단계)

  • level_id (레벨 id) — BIGINT — Primary key — NOT NULL
  • family_id (가족아이디) — BIGINT — Foreign key → families.family_id — NOT NULL
  • current_level (현재 레벨) — INT
  • current_points (현재 누적 점수) — INT
  • level_name (레벨 명) — VARCHAR(50)
  • updated_at (수정 시각) — TIMESTAMP

family_members (가족 구성원)

  • member_id (구성원 아이디) — BIGINT — Primary key — NOT NULL
  • family_id (가족아이디) — BIGINT — Foreign key → families.family_id — NOT NULL
  • user_id (유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • role (역할) — VARCHAR(20)
  • nickname_in_family (가족 내 호칭) — VARCHAR(50)
  • joined_at (조인 시점) — TIMESTAMP
  • is_active (활성 상태) — TINYINT(1)

fcm_tokens (fcm토큰)

  • token_id (토큰 id) — BIGINT — Primary key — NOT NULL
  • user_id (유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • fcm_token (fcm 푸시 토큰) — VARCHAR(500)
  • device_type (기기 타입) — VARCHAR(20)
  • is_active (활성 여부) — TINYINT(1)
  • created_at (생성 시각) — TIMESTAMP
  • updated_at (수정 시각) — TIMESTAMP

notifications (알림)

  • notiifcation_id (Key) — BIGINT — Primary key — NOT NULL
  • user_id (유저 아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
  • notification_type (알림 타입) — VARCHAR(50)
  • title (알림 제목) — VARCHAR(255)
  • content (알림 내용) — VARCHAR(255)
  • related_type (관련 타입) — VARCHAR(50)
  • related_id (관련 id) — BIGINT
  • is_read (읽음 여부) — TINYINT(1)
  • created_at (생성 시각) — TIMESTAMP

point_history (점수 획득 이력)

  • point_history_id (Key) — BIGINT — Primary key — NOT NULL
  • family_id (가족아이디) — BIGINT — Foreign key → families.family_id — NOT NULL
  • point_type (점수 타입) — VARCHAR(50)
  • points (획득 점수) — INT
  • description (설명) — VARCHAR(255)
  • earned_at (획득 일시) — TIMESTAMP
  • related_date (관련 날짜) — DATE

questions (질문)

  • question_id (질문 id) — BIGINT — Primary key — NOT NULL
  • question_number (질문 번호(Q1, Q2, 등 Q뒤 숫자)) — INT
  • question_text (질문 내용) — TEXT
  • counseling_technique (상담 기법) — VARCHAR(50)
  • description (질문 설명) — TEXT
  • example_answer (예시 답변) — TEXT
  • is_active (활성 상태) — TINYINT(1)
  • display_order (노출 순서) — INT
  • created_at (생성 시각) — TIMESTAMP
  • updated_at (수정 시각) — TIMESTAMP

users (사용자)

  • user_id (유저 아이디) — BIGINT — Primary key — NOT NULL
  • email (이메일) — VARCHAR(255)
  • password_hash (비밀번호) — VARCHAR(255)
  • nickname (닉네임) — VARCHAR(50)
  • profile_image_url (프로필사진주소) — VARCHAR(500)
  • created_at (생성시각) — TIMESTAMP
  • updated_at (수정시각) — TIMESTAMP
  • last_login_at (마지막접속시각) — TIMESTAMP
  • is_active (접속상태) — TINYINT(1)