5verdose

테이블 (24)

결제내역 (Payment)

  • 주문id (id) — Long auto_increment — 기본 키 — NOT NULL
  • 결제금액 (amount) — int — NOT NULL
  • 결제 상태 (status) — ENUM('PENDING', 'PAID', 'CANCELLED', 'COMPLETED') — NOT NULL
  • 결제 수단 (method) — ENUM('CREDIT_CARD,','BANK_TRANSFER','KAKAOPAY')
  • 거래 id (transactionId) — varchar(100)
  • 결제 시간 (paymentDate) — Timestamp — NOT NULL

구매할 재고 내역 (inventory_purchase)

  • 구매 재고 id (purchase_id) — Long auto_increment — 기본 키 — NOT NULL
  • 판매 재고 id (sale_id) — Long — 외래 키 → 판매할 재고 내역.판매 재고 id — NOT NULL
  • 구매자 가게 id (buyer_store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 매장별재고id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 구매할 재고의 이름 (inventory_name) — varchar(100)
  • 수량 (quantity) — BigDecimal
  • 희망가격 (price) — int — NOT NULL — 결제 완료 시 최종금액으로 변경
  • 구매상태 (status) — ENUM('PENDING_APPROVAL', 'isPaymentInProgress', 'confirmDelivery', 'end', 'canceled') — NOT NULL — waiting = 구매요청을 보내고 판매자의 승인을 기다리는 상태 payment = 판매자가 승인하여 결제를 해야하는 상태 canceled = 판매자가 거절한 상태 delivery = 결제하고 배송중인 상태 end…
  • 등록날짜 (created_at) — timestamp
  • 결제방법 (method) — ENUM('credit_card', 'cash', 'kakaopay')
  • 구매할 재고의 단위 (unit) — varchar(10)
  • Field

레시피 (recipe)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 메뉴id (menu_id) — Long — 외래 키 → 메뉴정보.메뉴id — NOT NULL
  • 매장별 재고 id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 수량 (quantity) — decimal(10,2)

매장 (store)

  • 매장id (id) — Long auto_increment — 기본 키 — NOT NULL
  • 유저id (user_id) — Long — 외래 키 → 사용자.유저id — NOT NULL — user의 고유한 index
  • 매장명 (name) — varchar(100)
  • 주소 (address) — varchar(200)
  • 매장전화번호 (phoneNumber) — varchar(200)
  • 주소 Point (location) — byte
  • 위도 (latitude) — double
  • 경도 (longitude) — double

매장별재고 (store_Inventory)

  • 매장별재고id (id) — Long auto_increment — 기본 키 — NOT NULL
  • 가게id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 총 수량 (quantity) — decimal(10,2)
  • 사용단위 (unit) — varchar(50)
  • 이름 (name) — varchar(200)
  • 입고날로부터의 유통기한 (expiryDate) — Integer
  • 최소수량 (min_quantity) — decimal(10,2)

매출비교테이블 (sales_comparison)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 어제날짜 (targetDate) — LocalDate
  • 어제매출 (yesterdaySales) — Integer
  • 저번주매출 (weekAgoSales) — Integer
  • 매출차이 (difference) — Integer
  • 차이 백분율 (percentageChange) — Double

메뉴 매출 건수 (menu_count)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 메뉴id (menu_id) — Long — 외래 키 → 메뉴정보.메뉴id — NOT NULL
  • 주문한 수량 (count) — int
  • 사용한 날짜 (usedDate) — Timestamp

메뉴 주문 테이블 (orders)

  • 주문id (id) — Long auto_increment — 기본 키 — NOT NULL
  • 가게id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 테이블번호 (table_number) — int
  • 총주문금액 (total_price) — int
  • 주문상태 (status) — ENUM('PAID', 'CANCELLED') DEFAULT 'PAID'
  • 주문시간 (created_at) — timestamp
  • 주문방법 (orderType) — ENUM('hall', 'coupang', 'baemin', yogiyo')

메뉴의 카테고리 (category)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 카테고리이름 (name) — varchar(100)

메뉴정보 (menu)

  • 메뉴id (id) — Long auto_increment — 기본 키 — NOT NULL
  • 카테고리 id (category_id) — Long — 외래 키 → 메뉴의 카테고리.id — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 메뉴이름 (name) — varchar(50)
  • 메뉴가격 (price) — int

사용자 (user)

  • 유저id (id) — Long auto_increment — 기본 키 — NOT NULL — user의 고유한 index
  • 이름 (name) — varchar(200)
  • 이메일 (email) — varchar(200)
  • 비밀번호 (password) — varchar(200)
  • 사업자번호 (business_number) — varchar(30)
  • 핸드폰번호 (phone_number) — varchar(30)
  • 주민번호 (ssn) — varchar(30)
  • 이메일인증 (email_verify) — varchar(30)
  • 전화번호인증 (phone_verify) — varchar(30)

수정한 재고 (modify_inventory)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장별재고id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 수정한날짜 (modify_date) — Timestamp
  • 수정한수량 (modify_quantity) — BigDecimal
  • 변경비율 (modifyRate) — BigDecimal

어제 가장 많이 수정한 재고 (top_modified_inventory)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장별재고id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 날짜 (recordDate) — LocalDate
  • 수정한양 (modifyQuantity) — BigDecimal
  • 수정한비율 (modifyRate) — BigDecimal

어제 가장 잘 팔린 메뉴 (top_selling_menu)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 메뉴id (menu_id) — Long — 외래 키 → 메뉴정보.메뉴id — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 날짜 (recordDate) — LocalDate
  • 팔린건수 (totalCount) — Long

옵션 (option)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장id (store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 옵션이름 (name) — varchar(100)
  • 옵션가격 (price) — int

옵션의 재고 사용량 (option_value)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 메뉴옵션id (option_id) — Long — 외래 키 → 옵션.id — NOT NULL
  • 매장별재고id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 사용수량 (quantity) — decimal(10,2) — NOT NULL

이메일인증정보 (email)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 인증할 이메일 (email_url) — varchar(100)
  • 인증코드 (code) — varchar(6)
  • 만료시간 (expires_at) — LocalDateTime
  • 인증여부 (verified) — boolean
  • 생성시간 (created_at) — LocalDateTime

재고 (inventory)

  • 재고id (inventory_id) — Long auto_increment — 기본 키 — NOT NULL
  • 매장별재고id (stock_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 구매날짜 (purchase_date) — timestamp
  • 유통기한 (expiry_date) — timestamp
  • 단가 (unit_price) — int
  • 수량 (quantity) — decimal(10,2)

재고 사용량 (used_inventory)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 매장별재고id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 총수량 (totalquantity) — BigDecimal
  • 사용한 날짜 (used_date) — Timestamp
  • 재고이름 (name) — varchar(100)
  • 수정이유 (status) — boolean

주문 시 선택한 옵션 (B2C_order_option)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 메뉴옵션id (option_id) — Long — 외래 키 → 옵션.id — NOT NULL
  • 주문메뉴ID (order_menu_id) — Long — 외래 키 → 주문의 메뉴.ID — NOT NULL

주문의 메뉴 (order_menu)

  • ID (id) — Long auto_increment — 기본 키 — NOT NULL
  • 주문id (order_id) — Long — 외래 키 → 메뉴 주문 테이블.주문id — NOT NULL
  • 메뉴id (menu_id) — int — 외래 키 → 메뉴정보.메뉴id — NOT NULL
  • 주문한수량 (quantity) — int
  • 단가 (price) — int

카테고리 옵션 (category_option)

  • id — Long auto_increment — 기본 키 — NOT NULL
  • 카테고리 id (category_id) — Long — 외래 키 → 메뉴의 카테고리.id — NOT NULL
  • 옵션 id (option_id) — Long — 외래 키 → 옵션.id — NOT NULL
  • Field

판매할 재고 내역 (inventory_sale)

  • 판매 재고 id (sale_id) — Long auto_increment — 기본 키 — NOT NULL
  • 매장별재료 id (store_inventory_id) — Long — 외래 키 → 매장별재고.매장별재고id — NOT NULL
  • 판매자 가게 id (seller_store_id) — Long — 외래 키 → 매장.매장id — NOT NULL
  • 수량 (quantity) — decimal(10,2) — NOT NULL — 결제 시 최종 수량으로 업데이트
  • 희망가격 (price) — int — NOT NULL — 최종 결제시 해당 금액으로 수정
  • 판매상태 (status) — ENUM('available', 'waiting', 'isPaymentPending','delivery', 'sold', 'canceled') — NOT NULL — available = 거래 가능 상태 waiting = 구매자의 결제를 기다리는 상태 delivery = 구매자에게 배송하고 배송확인을 기다리는 상태 sold = 구매자가 배송확인을 누르고 거래가 완료된 상태 ca…
  • 소개내용 (content) — text
  • 등록날짜 (created_at) — timestamp
  • 판매할 재고의 이름 (inventory_name) — varchar(100)
  • 판매하기로 결정한 요청 id (inventory__purchase_id) — Long
  • 판매자 매장 이름 (seller_store_name) — varchar(100)
  • 구매자 매장 이름 (buyer_store_name) — varchar(100)
  • 판매할 재고의 단위 (unit) — varchar(10)
  • 판매할 재고의 유통기한 (expriy_date) — LocalDate

판매할 재고의 이미지 (image)

  • 이미지id (image_id) — Long auto_increment — 기본 키 — NOT NULL
  • 판매재료id (inventory_sale_id) — Long — 외래 키 → 판매할 재고 내역.판매 재고 id — NOT NULL
  • 이미지가 저장된 경로 (url) — varchar(200)