UMC Spring - week1

테이블 (13)

가게 (store)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → 지역.id — NOT NULL
  • food_id (Key3) — bigint — 외래 키 → 음식 카테고리.id — NOT NULL
  • created_at (Field2) — datetime(6)
  • updated_at (Field) — datetime(6)
  • address (Field3) — varchar(30)
  • rating (Field4) — float
  • name (Field5) — varchar(20)

동의사항 (agreement)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(30)
  • content (Field2) — text
  • created_at (Field3) — datetime(6)
  • updated_at (Field4) — datetime(6)
  • required_YN (Field5) — boolean

동의사항 맵핑테이블 (user_agree)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • user_id (Key2) — bigint — 외래 키 → 회원.id — NOT NULL
  • agree_id (Key3) — bigint — 외래 키 → 동의사항.id — NOT NULL
  • created_at (Field) — datetime(6)
  • updated_at (Field2) — datetime(6)

리뷰 (review)

  • id (PK) — bigint — 기본 키 — NOT NULL
  • user_id (Key2) — bigint — 외래 키 → 회원.id — NOT NULL
  • store_id (Key) — bigint — 외래 키 → 가게.id — NOT NULL
  • region_id (Key22) — bigint — 외래 키 → 가게.region_id — NOT NULL
  • image_id (Key3) — bigint — 외래 키 → 가게.food_id — NOT NULL
  • content (Field) — text
  • rating (Field2) — float
  • created_at (Field3) — datetime
  • updated_at (Field4) — datetime

리뷰 답글 (review_reply)

  • id (PK) — bigint — 기본 키 — NOT NULL
  • review_id (FK) — bigint — 외래 키 → 리뷰.id — NOT NULL
  • user_id (Key2) — bigint — 외래 키 → 리뷰.user_id — NOT NULL
  • store_id (Key) — bigint — 외래 키 → 리뷰.store_id — NOT NULL
  • region_id (Key22) — bigint — 외래 키 → 리뷰.region_id — NOT NULL
  • image_id (Key3) — bigint — 외래 키 → 리뷰.image_id — NOT NULL
  • id (Key4) — bigint — 외래 키 → 회원.id — NOT NULL
  • content (Field) — text
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)
  • title (Field5) — varchar(30)

리뷰사진 (review_image)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • review_id (PK) — bigint — 외래 키 → 리뷰.id — NOT NULL
  • user_id (Key3) — bigint — 외래 키 → 리뷰.image_id — NOT NULL
  • created_at (Field) — datetime(6)
  • updated_at (Field2) — datetime(6)
  • image_url (Field3) — text

문의 (question)

  • id (PK) — bigint — 기본 키 — NOT NULL
  • user_id (Key) — bigint — 외래 키 → 회원.id — NOT NULL
  • content (Field) — text
  • title (Field3) — varchar(20)
  • created_at (Field2) — datetime
  • del_YN (Field4) — int
  • updated_at (Field5) — datetime

미션 (mission)

  • id (PK) — bigint — 기본 키 — NOT NULL
  • store_id (Key) — bigint — 외래 키 → 가게.id — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → 가게.region_id — NOT NULL
  • user_id (Key3) — bigint — 외래 키 → 가게.food_id — NOT NULL
  • name (Field) — varchar(20)
  • rating (Field2) — float
  • reward (Field4) — int
  • content (Field5) — text
  • status (Field6) — varchar(10)
  • created_at (Field7) — datetime(6)
  • updated_at (Field8) — datetime(6)
  • deadline (Field9) — datetime(6)

미션 맵핑테이블 (user_mission)

  • id (PK) — bigint — 기본 키 — NOT NULL
  • user_id (Key) — bigint — 외래 키 → 회원.id — NOT NULL
  • mission_id (PK2) — bigint — 외래 키 → 미션.id — NOT NULL
  • store_id (Key2) — bigint — 외래 키 → 미션.store_id — NOT NULL
  • region_id (Key22) — bigint — 외래 키 → 미션.region_id — NOT NULL
  • review_id (Key3) — bigint — 외래 키 → 미션.user_id — NOT NULL
  • created_at (Field) — datetime
  • updated_at (Field2) — datetime

음식 카테고리 (food_category)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field)
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)

음식 카테고리 맵핑테이블 (user_food)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • food_id (Key2) — bigint — 외래 키 → 음식 카테고리.id — NOT NULL
  • user_id (Key3) — bigint — 외래 키 → 회원.id — NOT NULL
  • created_at (Field) — datetime(6)
  • updated_at (Field2) — dateimte(6)

지역 (region)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(20)
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)

회원 (user)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(20)
  • gender (Field2) — varchar(10)
  • birth (Field3) — varchar(20)
  • address (Field4) — varchar(40)
  • point (Field6) — int
  • status (Field9) — varchar(15)
  • inactive_date (Field10) — datetime
  • created_at (Field11) — datetime
  • updated_at (Field12) — datetime
  • age (Field7) — int
  • userType (Field5) — int
  • email (Field8) — varchar(50)
  • phone_number (Field13) — varchar(20)