week1

Tables (7)

food_category

  • food_category_id — BIGINT — Primary key — NOT NULL
  • category_name — VARCHAR(30) — NOT NULL

member

  • member_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255)
  • nickname — VARCHAR(50) — NOT NULL
  • name — VARCHAR(50)
  • gender — ENUM('M','F','UNKNOWN') — NOT NULL
  • birth_date — DATE
  • address — VARCHAR(255)
  • total_point — INT — NOT NULL
  • status — ENUM('ACTIVE','WITHDRAWN') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_mission

  • member_mission_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.mission_id — NOT NULL
  • status — ENUM('CHALLENGED','IN_PROGRESS','REQUESTED','SUCCESS') — NOT NULL
  • auth_code — VARCHAR(20)
  • earned_point — INT — NOT NULL
  • challenged_at — DATETIME — NOT NULL
  • completed_at — DATETIME

mission

  • mission_id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • title — VARCHAR(150) — NOT NULL
  • min_amount — INT — NOT NULL
  • reward_point — INT — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE') — NOT NULL
  • created_at — DATETIME — NOT NULL

region

  • region_id — BIGINT — Primary key — NOT NULL
  • region_name — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL

social_account

  • social_account_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • provider — ENUM('KAKAO','NAVER','APPLE','GOOGLE') — NOT NULL
  • provider_user_id — VARCHAR(255) — NOT NULL
  • created_at — DATETIME — NOT NULL

store

  • store_id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.region_id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.food_category_id — NOT NULL
  • store_name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255)
  • phone — VARCHAR(20)
  • business_hours — VARCHAR(100)
  • status — ENUM('OPEN','CLOSED') — NOT NULL
  • created_at — DATETIME — NOT NULL