outsourcing

Tables (6)

Menu (메뉴)

  • 메뉴 ID (id) — NOTNULL — Primary key — NOT NULL
  • 가게ID (store_id) — FK — Foreign key → Store.가게ID — NOT NULL
  • 메뉴이름 (name) — NOT NULL
  • 가격 (price) — NOT NULL
  • 생성일시 (createdAt) — NOT NULL
  • 수정일시 (updatedAt)
  • 삭제 여부 (deleteFlag)

Order (주문)

  • 주문 ID (id) — PK — Primary key — NOT NULL
  • 주문한 회원 (user_id) — FK — Foreign key → User.회원 ID — NOT NULL
  • 주문한 가게 (store_id) — FK — Foreign key → Store.가게ID — NOT NULL
  • 수락여부 (accepted) — NOT NULL
  • 상태 (status) — NOT NULL
  • 총금액 (totalPrice) — NOT NULL

OrderItem (주문상세)

  • 주문상세 ID (id) — PK — Primary key — NOT NULL
  • 주문 ID (order_id) — FK — Foreign key → Order.주문 ID — NOT NULL
  • 메뉴 ID (id2) — NOTNULL — Foreign key → Menu.메뉴 ID — NOT NULL
  • 수량 (count) — NOT NULL

Review (리뷰)

  • 리뷰 ID (id) — PK — Primary key — NOT NULL
  • 주문 ID (order_id) — PK — Foreign key → Order.주문 ID — NOT NULL
  • 별점 (rate) — NOT NULL
  • 리뷰 (comments)

Store (가게)

  • 가게ID (id) — PK — Primary key — NOT NULL
  • 사장 ID (owner_id) — FK — Foreign key → User.회원 ID — NOT NULL
  • 가게이름 (name) — NOT NULL
  • 가게 주소 (address) — NOT NULL
  • 가게 번호 (phone) — NOT NULL
  • 카테고리 (category) — NOT NULL
  • 시작시간 (openTime) — NOT NULL
  • 종료시간 (closeTime) — NOT NULL
  • 평점 (rating)
  • 폐점 여부 (closedFlag)
  • 생성일시 (createdAt) — NOT NULL
  • 수정일시 (updatedAt)
  • 최소금액 (minPrice) — NOT NULL

User (회원)

  • 회원 ID (id) — PK — Primary key — NOT NULL
  • 이름 (name) — NOT NULL
  • 이메일 (email) — NOT NULL, UNIQUE
  • 비밀번호 (password) — NOT NULL
  • 전화번호 (phone) — NOT NULL
  • 주소 (address) — NOT NULL
  • 권한 (userRole) — NOT NULL
  • 생성일시 (createdAt) — NOT NULL
  • 수정일시 (updatedAt)
  • 삭제여부 (deleteFlag)