PNU의 민족

테이블 (7)

Delivery (배달)

  • Key — 기본 키 — NOT NULL
  • delivery_person_id (배달원 아이디) — NOTNUILL — 외래 키 → User.id — NOT NULL
  • restaurant_id (식당 아이디) — NOTNULL — 외래 키 → Restaurant.id — NOT NULL
  • delivery_address (배달 주소) — NOTNULL
  • status (배달 상황) — NOTNULL

Favorite (즐겨찾기)

  • id (Key) — 기본 키 — NOT NULL
  • user_id (유저 아이디) — NOTNUILL — 외래 키 → User.id — NOT NULL
  • menu_id (메뉴 아이디) — NOTNUILL — 외래 키 → Menu.id — NOT NULL

Menu (메뉴)

  • id (Key) — 기본 키 — NOT NULL
  • restaurant_id (식당 아이디) — NOTNUILL — 외래 키 → Restaurant.id — NOT NULL
  • name (메뉴 이름) — NOTNULL
  • price (가격) — NOTNULL

Orders (주문)

  • id (Key) — 기본 키 — NOT NULL
  • customer_id (고객 아이디) — NOTNUILL — 외래 키 → User.id — NOT NULL
  • menu_id (메뉴 아이디) — NOTNUILL — 외래 키 → Menu.id — NOT NULL
  • delivery_id (배달 아이디) — NOTNUILL — 외래 키 → Delivery.Key — NOT NULL
  • status (주문 상태) — NOTNULL
  • order_time (주문 시간) — NOTNULL

Restaurant (식당)

  • id (Key) — 기본 키 — NOT NULL
  • owner_id (주인 아이디) — NOTNUILL — 외래 키 → User.id — NOT NULL
  • name (식당 이름) — NOTNULL
  • address (주소) — NOTNULL
  • cusine_type (음식 장르) — NOTNULL

Review (리뷰)

  • id (Key) — 기본 키 — NOT NULL
  • orders_id (주문 아이디) — NOTNUILL — 외래 키 → Orders.id — NOT NULL
  • customer_id (고객 아이디) — NOTNUILL — 외래 키 → User.id — NOT NULL
  • rating (점수) — NOTNULL
  • comment (리뷰 내용) — NOTNULL

User (유저)

  • id (Key) — 기본 키 — NOT NULL
  • email (이메일) — NOTNULL
  • username (유저 이름) — NOTNULL
  • passowrd (비밀번호) — NOTNULL
  • role (역할) — NOTNULL
  • phone_number (전화번호) — NOTNULL
  • service_area (서비스 지역) — NOTNULL
  • status (상태) — NOTNULL
  • address (주소) — NOTNULL