week1

Tables (10)

food_category

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

member

  • id — BIGINT — Primary key — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • gender — VARCHAR(10)
  • birth_date — DATE — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • point — BIGINT — NOT NULL
  • deleted_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_food_preference

  • 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

member_mission

  • id — BIGINT — Primary key — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • cert_code — VARCHAR(20)
  • accepted_at — DATETIME — NOT NULL
  • completed_at — DATETIME
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.id — NOT NULL

mission

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • min_amount — INT — NOT NULL
  • reward_point — INT — NOT NULL
  • duration_days — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — 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
  • rating — TINYINT — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • member_mission_id — BIGINT — Foreign key → member_mission.id — NOT NULL

review_image

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

social_account

  • id — BIGINT — Primary key — NOT NULL
  • provider — VARCHAR(20) — NOT NULL
  • provider_user_id — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL

store

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • phone — VARCHAR(20)
  • created_at — DATETIME — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.id — NOT NULL