umc11th_workbook

Tables (8)

food_category

  • food_category_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(45) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member

  • member_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(20) — NOT NULL
  • nickname — VARCHAR(20) — NOT NULL
  • email — VARCHAR(100)
  • phone_number — VARCHAR(20)
  • gender — ENUM('NONE','MALE','FEMALE') — NOT NULL
  • social_type — ENUM('KAKAO','NAVER','APPLE','GOOGLE') — NOT NULL
  • social_id — VARCHAR(255) — NOT NULL
  • point — INT — NOT NULL
  • status — ENUM('ACTIVE','INACTIVE') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

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('CHALLENGING','COMPLETE') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

mission

  • mission_id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • reward — INT — NOT NULL
  • description — VARCHAR(255) — NOT NULL
  • deadline — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

region

  • region_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(45) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

review

  • review_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • body — TEXT
  • score — DECIMAL(2,1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

review_image

  • review_image_id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → review.review_id — NOT NULL
  • image_url — VARCHAR(512) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_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
  • name — VARCHAR(45) — NOT NULL
  • address — VARCHAR(255)
  • score — DECIMAL(2,1)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL