week1 미션

테이블 (19)

food_category (Untitled9)

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

inquiry (Untitled8)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • title (Field) — varchar(100)
  • type (Field2) — varchar(20)
  • content (Field3) — text
  • status (Field4) — enum('waiting','answered') default 'waiting'
  • created_at (Field5) — datetime(6)
  • updated_at (Field6) — datetime(6)
  • is_deleted (Field7) — boolean

member (Untitled)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(30) — NOT NULL
  • nick_name (Field4) — varchar(20)
  • email (Field5) — varchar(100) — NOT NULL
  • password (Field6) — varchar(100)
  • gender (Field2) — enum('남성','여성') — NOT NULL
  • birth (Field3) — date — NOT NULL
  • address (Field7) — varchar(100)
  • point (Field8) — float — NOT NULL
  • role (Field12) — enum('user', 'owner', 'admin')
  • created_at (Field9) — datetime(6) — NOT NULL
  • updated_at (Field10) — datetime(6) — NOT NULL
  • is_deleted (Field11) — boolean — NOT NULL

member (CopyOfUntitled)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(30)
  • email (Field5) — varchar(50)
  • gender (Field2) — varchar(10)
  • birth (Field3) — date
  • address (Field7) — varchar(100)
  • status (Field8) — varchar(10)
  • created_at (Field9) — datetime(6)
  • updated_at (Field10) — datetime(6)

member_mission (Untitled5)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • mission_id (Key3) — bigint — 외래 키 → mission.id — NOT NULL
  • status (Field) — enum('assigned','in_progress','completed','failed') — NOT NULL
  • started_at (Field6) — datetime(6)
  • completed_at (Field2) — datetime(6)
  • created_at (Field4) — datetime(6) — NOT NULL
  • updated_at (Field5) — datetime(6) — NOT NULL
  • is_deleted (Field3) — boolean — NOT NULL

member_mission (CopyOfUntitled5)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • mission_id (Key2) — bigint — 외래 키 → mission.id — NOT NULL
  • member_id (Key3) — bigint — 외래 키 → member.id — NOT NULL
  • status (Field) — enum('assigned','in_progress','completed')
  • completed_at (Field2) — datetime(6)
  • point_awarded (Field3) — int
  • created_at (Field4) — datetime(6)
  • updated_at (Field5) — datetime(6)

member_pref_food (Untitled7)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • food_category_id (Key3) — bigint — 외래 키 → food_category.id — NOT NULL
  • created_at (Field2) — datetime(6) — NOT NULL
  • updated_at (Field3) — datetime(6) — NOT NULL
  • is_deleted (Field) — boolean — NOT NULL

member_pref_food (CopyOfUntitled7)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • food_type (Field) — enum('한식','일식','중식','양식','치킨','분식','고기/구이','도시락','야식','패스트푸드','디저트','아시안푸드')

mission (Untitled4)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • store_id (Key2) — bigint — 외래 키 → store.id — NOT NULL
  • name (Field) — varchar(100) — NOT NULL
  • description (Field2) — text
  • reward (Field3) — int
  • criteria (Field4) — varchar(100) — NOT NULL
  • created_at (Field5) — datetime(6) — NOT NULL
  • updated_at (Field6) — datetime(6) — NOT NULL
  • is_deleted (Field7) — boolean — NOT NULL

mission (CopyOfUntitled4)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → region.id — NOT NULL
  • store_id (Key3) — bigint — 외래 키 → store.id — NOT NULL
  • name (Field) — varchar(100)
  • description (Field2) — text
  • reward (Field3) — int
  • criteria (Field4) — varchar(100)
  • created_at (Field5) — datetime(6)
  • updated_at (Field6) — datetime(6)

phone (Untitled12)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • phone_number (Field) — varchar(20)
  • is_certified (Field5) — boolean — NOT NULL
  • created_at (Field2) — datetime(6) — NOT NULL
  • updated_at (Field3) — datetime(6) — NOT NULL
  • is_deleted (Field4) — boolean — NOT NULL

region (CopyOfUntitled2)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(15)

region (Untitled2)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(15)

review (CopyOfUntitled6)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (Key2) — bigint — 외래 키 → member.id — NOT NULL
  • store_id (Key3) — bigint — 외래 키 → store.id — NOT NULL
  • content (Field) — text
  • rating (Field2) — int
  • created_at (Field3) — datetime(6)
  • updated_at (Field4) — datetime(6)

review (Untitled6)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_mission_id (Key2) — bigint — 외래 키 → member_mission.id — NOT NULL
  • parent_review_id (Field6) — bigint
  • content (Field) — text — NOT NULL
  • rating (Field2) — int — NOT NULL
  • created_at (Field3) — datetime(6) — NOT NULL
  • updated_at (Field4) — datetime(6) — NOT NULL
  • is_deleted (Field5) — boolean — NOT NULL
  • replies (Field7)

review_images (Untitled10)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • review_id (Key2) — bigint — 외래 키 → review.id — NOT NULL
  • src (Field) — varchar(200) — NOT NULL
  • created_at (Field2) — datetime(6) — NOT NULL
  • updated_at (Field3) — datetime(6) — NOT NULL

store (CopyOfUntitled3)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → region.id — NOT NULL
  • name (Field2) — varchar(40)
  • address (Field3) — varchar(100)
  • food_type (Field4) — varchar(20)

store (Untitled3)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → region.id — NOT NULL
  • name (Field2) — varchar(40)
  • address (Field3) — varchar(100)
  • food_type (Field4) — varchar(20)
  • created_at (Field) — datetime(6)
  • updated_at (Field5) — datetime(6)
  • is_deleted (Field6) — boolean

store_images (Untitled11)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • store_id (Key2) — bigint — 외래 키 → store.id — NOT NULL
  • src (Field) — varchar(200)
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)