UMC_8_DB설계

테이블 (14)

Alarm (Untitled10)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • user_id (아이디) — bigint — 외래 키 → member.id — NOT NULL
  • type (Field) — enum — 새로운 이벤트/리뷰답변/문의내역 답변
  • title (Field6) — varchar(20)
  • message (Field2) — text
  • created_at (Field3) — datetime(6)
  • updated_at (Field4) — datetime(6)
  • is_read (Field5) — boolean

food_type (Untitled5)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • type_name (Field) — varchar(10)

member (Untitled)

  • id (아이디) — bigint — 기본 키 — NOT NULL
  • name (Field) — varchar(10)
  • gender (Field3) — varchar(1)
  • email (Field10) — varchar(40)
  • status (Field6) — enum
  • inactive_date (Field7) — datetime
  • birth_date (Field2) — varchar(10)
  • address (Field8) — varchar(255)
  • address_detail (Field9) — varchar(255)
  • created_at (Field4) — datetime(6)
  • updated_at (Field5) — datetime(6)
  • profile_img_url (Field11) — text

member_mission (Untitled11)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (아이디) — bigint — 외래 키 → member.id — NOT NULL
  • mission_id (Key2) — bigint — 외래 키 → mission.id — NOT NULL
  • status (Field) — enum — 진행중/요청됨/미션완료
  • confirmation_code (Field4) — varchar(20) — 사장님 확인용 구분 번호
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)

member_term (Untitled7)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • term_id (Key2) — bigint — 외래 키 → term.id — NOT NULL
  • member_id (아이디) — bigint — 외래 키 → member.id — NOT NULL
  • agree (Field) — boolean

mission (Untitled2)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • store_id (Key2) — bigint — 외래 키 → store.id — NOT NULL
  • earned_point (Field) — int
  • comment (Field2) — text

owner_reply (Untitled14)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • review_id (아이디) — bigint — 외래 키 → review.member_id — NOT NULL
  • comment (Field) — text
  • created_at (Field2) — datetime(6)

point_history (Untitled8)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (아이디) — bigint — 외래 키 → member.id — NOT NULL
  • amount (Field) — bigint
  • created_at (Field2) — datetime(6)

preference (Untitled4)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • food_type_id (Key2) — bigint — 외래 키 → food_type.id — NOT NULL
  • member_id (아이디) — bigint — 외래 키 → member.id — NOT NULL

region (Untitled13)

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

review (Untitled9)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • member_id (아이디) — bigint — 외래 키 → member.id — NOT NULL — 리뷰 작성자
  • store_id (Key2) — bigint — 외래 키 → store.id — NOT NULL — 어떤 가게의 리뷰?
  • mission_id (Key3) — bigint — 외래 키 → mission.id — NOT NULL — 어떤 미션의 리뷰?
  • comment (Field) — text
  • rate (Field2) — float
  • created_at (Field3) — datetime(6)
  • updated_at (Field4) — datetime(6)

review_img (Untitled12)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • review_id (Key2) — bigint — 외래 키 → review.id — NOT NULL
  • review_img_url (Field) — text

store (Untitled3)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • region_id (Key2) — bigint — 외래 키 → region.id — NOT NULL
  • name (Field) — varchar(20)
  • address (Field2) — text
  • rate (Field3) — float
  • category (Field4) — enum
  • business_hours (Field5) — varchar(20)

term (Untitled6)

  • id (Key) — bigint — 기본 키 — NOT NULL
  • title (Field) — varchar(255)
  • body (Field2) — text
  • is_required (Field3) — boolean — 필수/선택