UMC-1-WORKBOOK

Tables (21)

Link (링크)

  • linkId (Key) — Primary key — NOT NULL
  • userId (Key2) — 링크 저장자 — Foreign key → users.userId — NOT NULL
  • emotionId (Key3) — 선택된 감정 — Foreign key → emotion.emotionId — NOT NULL
  • folderId (Key4) — 링크가 속한 폴더 — Foreign key → folder.folderId — NOT NULL
  • url (Field)
  • title (Field2) — 실제 링크 제목
  • memo (Field3) — 선택
  • created_at (Field8)

aiSummary (ai 요약)

  • aiSummaryId (Key) — Primary key — NOT NULL
  • linkId (Key2) — Foreign key → Link.linkId — NOT NULL
  • categoryId (Key3) — Foreign key → category.categoryId — NOT NULL
  • summary (Field)
  • keywords (Field2) — 키워드 배열/JSON
  • ai_category (Field3) — AI 분류 카테고리
  • image_url (Field4)
  • created_at (Field5)

category (카테고리)

  • categoryId (Key) — Primary key — NOT NULL
  • name (Field)

curation (큐레이션)

  • curationId (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → users.userId — NOT NULL
  • month (Field) — 2025-05 형태
  • summary_text (Field2) — 랜덤 멘트
  • top_emotions (Field3) — 가장 많이 클릭한 감정 2개
  • top_situations (Field4) — 가장 많이 클릭한 상황 2개
  • Field5

curationLink (큐레이션링크)

  • curationLinkId (Key) — Primary key — NOT NULL
  • curationId (Key2) — Foreign key → curation.curationId — NOT NULL
  • linkId (Key3) — Foreign key → Link.linkId — NOT NULL
  • type (Field) — 추천/외부 구분

emotion (감정)

  • emotionId (Key) — Primary key — NOT NULL
  • name (Field) — 설렘, 우울, 짜증,,,,
  • Field2

folder (폴더)

  • folderId (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → users.userId — NOT NULL
  • categoryId (Key3) — Foreign key → category.categoryId — NOT NULL
  • name (Field)
  • parent_folder_id (Field2) — 하위 폴더 관리 (Folder.folder_id) - 자기참조 FK
  • is_shared (Field3) — on/off

interest (관심분야)

  • interestId (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → users.userId — NOT NULL
  • name (Field)

member (유저)

  • id (유저 ID) — BIGINT — Primary key — NOT NULL
  • name (이름) — VARCHAR(50)
  • nickname (닉네임) — VARCHAR(30)
  • gender (성별) — ENUM('M','F')
  • birth (생년월일) — DATE
  • phone (전화번호) — VARCHAR(15)
  • address (주소) — VARCHAR(255)
  • email (이메일) — VARCHAR(255)
  • created_at (가입일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)
  • status (계정 상태) — ENUM('active', 'inactive')
  • inactive_date (탈퇴 날짜 (비활성 했을 때)) — DATETIME
  • total_points (토탈 포인트) — INT

mission (미션)

  • id (미션 ID) — BIGINT — Primary key — NOT NULL
  • id (가게 ID) — BIGINT — Foreign key → store.id — NOT NULL
  • content (미션 내용) — TEXT
  • points (미션 포인트) — INT
  • final_date (미션 종료일) — DATETIME(6)
  • created_at (생성일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)

points (포인트)

  • id (포인트 ID) — BIGINT(PK) — Primary key — NOT NULL
  • id (유저 ID) — BIGINT — Foreign key → member.id — NOT NULL
  • amounts (포인트) — INT
  • description (포인트 설명) — TEXT
  • created_at (생성일) — DATETIME(6)

purpose (목적)

  • purposeId (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → users.userId — NOT NULL
  • name (Field)

recommendLink (추천링크)

  • recommendLinkId (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → users.userId — NOT NULL
  • emotionId (Key3) — Foreign key → emotion.emotionId — NOT NULL
  • situationId (Key4) — Foreign key → situation.situationId — NOT NULL
  • created_at (Field)

region (지역)

  • id (지역 ID) — BIGINT — Primary key — NOT NULL
  • region_name (지역 이름) — VARCHAR(100)
  • latitude (위도) — DECIMAL(10,7)
  • longitude (경도) — DECIMAL(10,7)

review (리뷰)

  • id (리뷰 ID) — BIGINT — Primary key — NOT NULL
  • id (유저 ID) — BIGINT — Foreign key → member.id — NOT NULL
  • id (가게 ID) — BIGINT — Foreign key → store.id — NOT NULL
  • content (리뷰 내용) — TEXT
  • created_at (생성일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)
  • rating (평점(1~5)) — INT

review_image (리뷰 이미지)

  • id (리뷰 이미지 ID) — BIGINT — Primary key — NOT NULL
  • id (리뷰 ID) — BIGINT — Foreign key → review.id — NOT NULL
  • image_url (리뷰 이미지 url) — VARCHAR(255)
  • created_at (생성일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)

sharedFolder (공유폴더)

  • sharedFolderId (Key) — Primary key — NOT NULL
  • folderId (Key2) — Foreign key → folder.folderId — NOT NULL
  • sharedUrl (Field) — 사용자별 공유 URL
  • isWatcher (Field2) — 읽기 전용 여부
  • created_at (Field3) — 공유 시작 시각
  • expire_at (Field4) — 공유 만료 시각(선택)
  • senderId (Field6) — (FK → Users.userId) -- 공유한 사람
  • receiverId (Field5) — (FK → Users.userId) -- 공유받은 사람

situation (상황)

  • situationId (Key) — Primary key — NOT NULL
  • job_type (Field) — 직장인/학생
  • name (Field2) — 퇴근 중,,,,등등
  • Field3

store (가게)

  • id (가게 ID) — BIGINT — Primary key — NOT NULL
  • id (지역 ID) — BIGINT — Foreign key → region.id — NOT NULL
  • store_name (가게 이름) — VARCHAR(100)
  • store_address (가게 주소) — VARCHAR(255)
  • created_at (생성일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)
  • image_url (가게 이미지 url) — VARCHAR(255)
  • store_category (가게 유형) — VARCHAR(100)

user_mission (유저 미션)

  • id (유저 미션 ID) — BIGINT — Primary key — NOT NULL
  • id (유저 ID) — BIGINT — Foreign key → member.id — NOT NULL
  • id (미션 ID) — BIGINT — Foreign key → mission.id — NOT NULL
  • status (진행 상태) — ENUM('PROFRESSING','COMPLETED')
  • created_at (생성일) — DATETIME(6)
  • updated_at (수정일) — DATETIME(6)
  • completed_date (미션 완료일) — DATETIME(6)

users (Untitled)

  • userId (Key) — Primary key — NOT NULL
  • email (Field)
  • password (Field2)
  • nickname (Field3)
  • gender (Field8)
  • job (Field4)
  • created_at (Field5)
  • updated_at (Field6)