baemin

Tables (16)

address (주소)

  • address_id (주소아이디) — Primary key — NOT NULL
  • member_id (멤버아이디) — Foreign key → member.member_id — NOT NULL
  • name (이름)
  • street_address (도로명주소)
  • detail_address (상세주소)
  • longitude (경도)
  • latitude (위도)

cart (장바구니)

  • cart_id (장바구니아이디) — Primary key — NOT NULL
  • member_id (멤버아이디) — Foreign key → member.member_id — NOT NULL
  • menu_id (메뉴아이디) — Foreign key → menu.menu_id — NOT NULL
  • count (수량)
  • price (가격)

cart_option_group_detail (장바구니_옵션그룹_디테일)

  • cart_option_group_detail (장바구니_옵션그룹_디테일_아이디) — Primary key — NOT NULL
  • cart_id (장바구니아이디) — Foreign key → cart.cart_id — NOT NULL
  • option_group_detail (옵션그룹_디테일_아이디) — Foreign key → option_group_detail.option_group_detail — NOT NULL

category (카테고리)

  • category_id (카테고리아이디) — Primary key — NOT NULL
  • name (이름) — ex) 중식, 한식

coupon (쿠폰)

  • coupon_id (쿠폰아이디) — Primary key — NOT NULL
  • name (이름)
  • valid_day (유효기간)

member (멤버)

  • member_id (멤버아이디) — Primary key — NOT NULL
  • nickname (닉네임)
  • image (프로필_이미지)
  • name (이름)
  • email (이메일)
  • password (패스워드)

member_coupon (멤버쿠폰)

  • member_coupon_id (멤버쿠폰아이디) — Primary key — NOT NULL
  • member_id (멤버아이디) — Foreign key → member.member_id — NOT NULL
  • coupon_id (쿠폰아이디) — Foreign key → coupon.coupon_id — NOT NULL
  • used (사용여부)

menu (메뉴)

  • menu_id (메뉴아이디) — Primary key — NOT NULL
  • restaurant_id (음식점아이디) — Foreign key → restaurant.restaurant_id — NOT NULL
  • name (메뉴이름)
  • explanation (설명)
  • price (가격)
  • image (이미지)

menu_option_group (메뉴_옵션그룹)

  • menu_option_group_id (메뉴옵션그룹아이디) — Primary key — NOT NULL
  • menu_id (메뉴아이디) — Foreign key → menu.menu_id — NOT NULL
  • option_group_id (옵션그룹아이디) — Foreign key → option_group.option_group_id — NOT NULL

option_group (옵션그룹)

  • option_group_id (옵션그룹아이디) — Primary key — NOT NULL
  • name (이름)
  • required (필수여부) — ex) 필수, 선택

option_group_detail (옵션그룹_디테일)

  • option_group_detail (옵션그룹_디테일_아이디) — Primary key — NOT NULL
  • option_group_id (옵션그룹아이디) — Foreign key → option_group.option_group_id — NOT NULL
  • name (이름) — ex) 펩시콜라 355ml
  • price (가격)

order (주문)

  • order_id (주문아이디) — Primary key — NOT NULL
  • member_id (멤버아이디) — Foreign key → member.member_id — NOT NULL
  • address (배달주소)
  • phone (전화번호)
  • to_rider (라이더요청사항)
  • to_restaurant (음식점요청사항)
  • payment (결제수단)
  • total_price (결제금액)
  • discount_price (할인금액)

order_menu (주문메뉴)

  • order_menu_id (주문메뉴아이디) — Primary key — NOT NULL
  • order_id (주문아이디) — Foreign key → order.order_id — NOT NULL
  • menu_id (메뉴아이디) — Foreign key → menu.menu_id — NOT NULL

order_menu_option_group_detail (주문메뉴_옵션그룹_디테일)

  • order_option_group_detail (주문메뉴_옵션그룹_디테일_아이디) — Primary key — NOT NULL
  • order_menu_id (주문메뉴아이디) — Foreign key → order_menu.order_menu_id — NOT NULL
  • option_group_detail (옵션그룹_디테일_아이디) — Foreign key → option_group_detail.option_group_detail — NOT NULL

restaurant (음식점)

  • restaurant_id (음식점아이디) — Primary key — NOT NULL
  • name (상호명)
  • street_address (도로명주소)
  • detail_address (상세주소)
  • longitude (경도)
  • latitude (위도)

restaurant_category (음식점_카테고리)

  • restaurant_category_id (음식점_카테고리_아이디) — Primary key — NOT NULL
  • category_id (카테고리아이디) — Foreign key → category.category_id — NOT NULL
  • restaurant_id (음식점아이디) — Foreign key → restaurant.restaurant_id — NOT NULL