chapter2 - 2025-09-18 00:58:09

Tables (8)

challenge

  • challengeId — Primary key — NOT NULL
  • title
  • description
  • goalCount
  • type
  • createdAt
  • updatedAt
  • missionId — INT — Foreign key → mission.missionId — NOT NULL — 미션 고유 ID (UUID)

challengeHistory

  • challengeHistoryId — INT — Primary key — NOT NULL — 유저-미션 진행 고유 ID (UUID)
  • createdAt — DATETIME — NOT NULL — 생성일
  • updatedAt — DATETIME — NOT NULL — 수정일
  • userChapterHistoryId — INT — Foreign key → userChapterHistory.userChapterHistoryId — NOT NULL — 유저-챕터 매핑 고유 ID (UUID)
  • challengeId — Foreign key → challenge.challengeId — NOT NULL

chapter

  • chapterId — INT — Primary key — NOT NULL — 챕터 고유 ID (UUID)
  • title — VARCHAR(255) — 챕터 제목
  • shortDescription — TEXT
  • description — TEXT — 챕터 설명
  • unLockConditionDescription — TEXT
  • additionalComponent — TEXT — 추가 구성 요소(예: 이미지 URL 등)
  • userType — ENUM
  • orderNo — INT
  • createdAt — DATETIME — NOT NULL — 생성일
  • updatedAt — DATETIME — NOT NULL — 수정일

chapterMissionMapping

  • chapterMissionID — INT — Primary key — NOT NULL — 챕터-미션 매핑 고유 ID (UUID)
  • isRequired — ENUM(1,0)
  • isActive — ENUM(1,0)
  • orderNo — INT
  • chapterId (chapterId2) — INT — Foreign key → chapter.chapterId — NOT NULL — 챕터 고유 ID (UUID)
  • missionId (missionId2) — INT — Foreign key → mission.missionId — NOT NULL — 미션 고유 ID (UUID)

mission

  • missionId — INT — Primary key — NOT NULL — 미션 고유 ID (UUID)
  • title — VARCHAR(255) — 미션 제목
  • description — TEXT — 미션 설명
  • missionType — VARCHAR(50)
  • goalCount — INT — NOT NULL — 미션 완료를 위한 목표 횟수
  • additionalComponent — TEXT — 추가 구성 요소(예: 이미지, 참고 데이터 등)
  • createdAt — DATETIME — NOT NULL — 생성일
  • updatedAt — DATETIME — NOT NULL — 수정일

user

  • userId — INT — Primary key — NOT NULL — 유저 고유 ID (UUID)
  • name — VARCHAR(100) — 유저 이름
  • phone — VARCHAR(20) — 전화번호
  • address — VARCHAR(255) — 주소
  • userType — ENUM

userChapterHistory

  • userChapterHistoryId — INT — Primary key — NOT NULL — 유저-챕터 매핑 고유 ID (UUID)
  • status — ENUM('LOCKED','UNLOCKED','START','IN_PROGRESS', 'COMPLETE') — NOT NULL — 챕터 진행 상태
  • unLockedAt — DATETIME — 시작일
  • startedAt — DATETIME
  • completedAt — DATETIME — 완료일
  • createdAt — DATETIME — NOT NULL — 생성일
  • updatedAt — DATETIME — NOT NULL — 수정일
  • chapterId — INT — Foreign key — NOT NULL — 챕터 고유 ID (UUID)
  • userId — INT — Foreign key — NOT NULL — 유저 고유 ID (UUID)
  • userProgramId — INT
  • userId (userId2) — INT — Foreign key → user.userId — NOT NULL — 유저 고유 ID (UUID)
  • chapterId (chapterId2) — INT — Foreign key → chapter.chapterId — NOT NULL — 챕터 고유 ID (UUID)

userMissionHistory

  • userMissionHistoryId — INT — Primary key — NOT NULL — 유저-미션 진행 고유 ID (UUID)
  • achievedCount (currentCount) — INT — NOT NULL — 현재 달성 횟수
  • goalCount — INT
  • hasCompleteMessageDisplayed — ENUM(1,0)
  • createdAt — DATETIME — NOT NULL — 생성일
  • updatedAt — DATETIME — NOT NULL — 수정일
  • userChapterHistoryId (userChapterHistoryId2) — INT — Foreign key → userChapterHistory.userChapterHistoryId — NOT NULL — 유저-챕터 매핑 고유 ID (UUID)
  • missionId — INT — Foreign key → mission.missionId — NOT NULL — 미션 고유 ID (UUID)