mission1

Tables (8)

food_category

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(30) — NOT NULL
  • created_at — DATETIME — NOT NULL

member

  • id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • social_type — VARCHAR(20) — NOT NULL
  • social_id — VARCHAR(100) — NOT NULL
  • email — VARCHAR(100)
  • name — VARCHAR(50) — NOT NULL
  • gender — VARCHAR(10)
  • birth_date — DATE — NOT NULL
  • point — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • inactive_date — DATETIME
  • 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
  • mission_status — VARCHAR(20) — NOT NULL
  • auth_code — VARCHAR(20)
  • challenged_at — DATETIME — NOT NULL
  • completed_at — DATETIME
  • earned_point — INT

member_prefer

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.id — NOT NULL
  • created_at — DATETIME — NOT NULL

mission

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • min_order_amount — INT — NOT NULL
  • reward_point — INT — NOT NULL
  • period_days — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

region

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — 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
  • member_mission_id — BIGINT — Foreign key → member_mission.id — NOT NULL
  • score — INT — NOT NULL
  • content — TEXT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

store

  • id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • phone — VARCHAR(20)
  • score — DECIMAL(2,1) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL