week1

Tables (12)

food_category

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(15) — NOT NULL

member

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(20) — NOT NULL
  • nickname — VARCHAR(20) — NOT NULL
  • email — VARCHAR(50) — NOT NULL
  • password — VARCHAR(200)
  • phone — VARCHAR(15) — NOT NULL
  • gender — ENUM('MALE','FEMALE') — NOT NULL
  • birth — DATE — NOT NULL
  • profile_image_url — VARCHAR(300)
  • point — INT — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE','BANNED') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_mission

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.id — NOT NULL
  • status — ENUM('CHALLENGING','COMPLETE') — NOT NULL
  • started_at — DATETIME — NOT NULL
  • completed_at — DATETIME

member_point_history

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • point — INT — NOT NULL
  • reason — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL

member_prefer_category

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • category_id — BIGINT — Foreign key → food_category.id — NOT NULL

member_social_login

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • provider — ENUM('KAKAO','NAVER','GOOGLE') — NOT NULL
  • provider_id — VARCHAR(100) — NOT NULL

mission

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • introduction — VARCHAR(200) — NOT NULL
  • point_reward — INT — NOT NULL
  • deadline — DATE
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

region

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(20) — NOT NULL

review

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.id
  • score — FLOAT — NOT NULL
  • body — VARCHAR(500) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

review_image

  • id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → review.id — NOT NULL
  • image_url — VARCHAR(300) — NOT NULL
  • created_at — DATETIME — NOT NULL

store

  • id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • address — VARCHAR(100) — NOT NULL
  • phone — VARCHAR(15) — NOT NULL
  • description — VARCHAR(200)
  • image_url — VARCHAR(300)
  • score — FLOAT — NOT NULL
  • status — ENUM('OPEN','CLOSED','TEMP_CLOSED') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

store_category

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • category_id — BIGINT — Foreign key → food_category.id — NOT NULL