POS

Tables (34)

categories (카테고리 목록)

  • category_id (카테고리 아이디) — int — Primary key
  • store_id (매장 아이디2) — int — Foreign key → 매장_계정.store_id
  • name (카테고리 이름) — varchar

category_menu_map (카테고리 맵)

  • category_id (카테고리 아이디) — int — Foreign key → categories.category_id
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id

customer_login_logs (유저 로그인 로그)

  • login_log_id (Key) — int — Primary key — NOT NULL
  • customer_id (유저 아이디) — int — Foreign key → customers.customer_id — NOT NULL
  • registration_type_id (로그인 타입) — int — Foreign key → customers.registration_type_id — NOT NULL
  • login_attempt_time (로그인 시도 시간) — date
  • login_success (로그인 성공여부) — boolean
  • device_info (로그인 기기정보)

customer_order_history (주문 히스토리 테이블)

  • history_id (Key) — Primary key — NOT NULL
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • customer_id (유저 아이디) — Foreign key → customers.customer_id — NOT NULL
  • order_time (주문 시간)

customer_registration_type (로그인 타입)

  • registration_type_id (타입 아이디) — Primary key — NOT NULL
  • method (로그인 방법)

customer_store_favorites (즐겨 찾기 테이블)

  • customer_id (유저 아이디) — Foreign key → customers.customer_id — NOT NULL
  • store_id (매장 아이디) — Foreign key → 매장_계정.store_id

customer_visit_history (유저 방문 히스토리)

  • visit_id (아이디) — Primary key — NOT NULL
  • customer_id (유저 아이디) — Foreign key → customers.customer_id — NOT NULL
  • store_id (매장 아이디) — Foreign key → 매장_계정.store_id
  • visit_time (방문시간)

customers (유저 테이블)

  • customer_id (유저 아이디) — Primary key — NOT NULL
  • registration_type_id (로그인 타입) — Foreign key → customer_registration_type.registration_type_id — NOT NULL
  • username (닉네임)
  • email (이메일)
  • hashed_password (해쉬 비밀번호)
  • phone_number (핸드폰 번호)
  • created_at (가입일)
  • updated_at (업데이트 시간)

hall (홀 구분을 위한 테이블)

  • hall_id (홀 아이디) — int — Primary key — NOT NULL
  • store_id (매장 아이디) — int — Foreign key → 매장_계정.store_id
  • name (홀 이름) — varchar

images (이미지 목록)

  • image_id (이미지 아이디) — int — Primary key
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • image_url (이미지 주소) — varchar

menu_list (메뉴 목록)

  • menu_id (메뉴 아이디) — int — Primary key
  • store_id (매장 아이디) — Foreign key → 매장_계정.store_id
  • name (메뉴 이름) — varchar
  • price (메뉴 가격) — decimal
  • description (메뉴 설명) — TEXT
  • vat_price (부가세액) — decimal
  • is_sold_out (판매 가능 여부) — boolean
  • is_taxable (면세 / 과세) — boolean
  • created_at (메뉴 생성 시간) — DATE
  • updated_at (메뉴 수정 시간) — DATE

menu_option_group_map (메뉴 / 옵션 그룹 맵)

  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • option_group_id (옵션 그룹 아이디) — int — Foreign key → menu_option_groups.option_group_id

menu_option_groups (메뉴 추가 옵션)

  • option_group_id (옵션 그룹 아이디) — int — Primary key
  • store_id (매장 아이디) — int — Foreign key → 매장_계정.store_id
  • name (옵션 그룹 이름) — varchar
  • is_required (필수 여부) — boolean
  • max_selectable (최대 선택 가능수) — int

menu_options (메뉴 옵션)

  • option_id (옵션 아이디) — int — Primary key
  • option_group_id (옵션 그룹 아이디) — int — Foreign key → menu_option_groups.option_group_id
  • name (상세 옵션 이름) — varchar
  • price (상세 옵션 가격) — decimal
  • is_sold_out (품절 여부) — boolean

menu_reviews (메뉴 리뷰 테이블)

  • review_id (Key) — Primary key — NOT NULL
  • customer_id (유저 아이디) — Foreign key → customers.customer_id — NOT NULL
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • comment (코멘트)
  • rating (별점)
  • created_at (생성시간)
  • updated_at (수정시간)

menu_stock (재고 관리 테이블)

  • stock_id (재고 아이디) — int — Primary key
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • quantity (재고 수량) — int

menu_stock_log (재고 관리 로그)

  • log_id (재고 로그 아이디) — int — Primary key — NOT NULL
  • stock_id (재고 아이디) — int — Foreign key → menu_stock.stock_id
  • reason_id (변경 사유 아이디) — int — Foreign key → stock_change_reasons.reason_id — NOT NULL
  • change_quantity (변동 수량) — int
  • remaining_quantity (조정 후 재고) — int
  • created_at (조정 시간) — DATE

order_discounrts (주문 할인 내역 테이블)

  • order_discount_id (오더 할인 아이디) — int — Primary key — NOT NULL
  • discount_id (할인 아이디2) — int — Foreign key → 할인.할인 아이디
  • order_item_id (주문 항목의 아이디) — int — Foreign key → order_items.order_item_id
  • name (할인 이름)
  • discount_price (decima)

order_items (주문 항목 정보)

  • order_item_id (주문 항목의 아이디) — int — Primary key
  • order_id (오더 아이디) — int — Foreign key → orders.order_id — NOT NULL
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • name (메뉴 이름) — varchar
  • quantity (수량) — int
  • price (개별 항목 가격) — decimal
  • cooking_status (조리 상태 표시) — ENUM
  • customer_request (요청사항) — text
  • created_at (주문 항목 생성 시간) — date
  • updated_at (주문 항목 업데이트 시간) — date
  • discount_price (할인금액) — decimal
  • final_price (최종 결제 금액) — decimal

orders (주문 내역)

  • order_id (오더 아이디) — int — Primary key — NOT NULL
  • table_id (테이블 아이디) — int — Foreign key → table_info.table_id — NOT NULL
  • total_price (주문의 총금액) — decimal
  • total_discount (총 할인 금액) — decimal
  • final_price (최종 결제 금액) — decimal
  • business_date (영업일) — date
  • created_at (주문 생성 시간) — date
  • updated_at (주문이 마지막으로 업데이트된 시간) — date
  • Field

payment_history (결제 내역 테이블)

  • payment_history_id (결제 아이디) — Primary key — NOT NULL
  • order_item_id (주문 항목의 아이디) — int — Foreign key → order_items.order_item_id
  • order_id (오더 아이디) — int — Foreign key → order_items.order_id — NOT NULL
  • payment_status (결제 상태) — ENUM
  • is_full_payment (전체 결제 여부) — boolean
  • created_at (결제 생성 시간) — date
  • updated_at (결제 업데이트 시간) — date
  • completed_at (결제 완료 시간) — date
  • payment_method_id (결제 방식 아이디) — int — Foreign key → payment_methods.payment_method_id — NOT NULL

payment_logs (결제 트랜잭션 변경 로그)

  • payment_log_id (결제 로그 아이디) — int — Primary key — NOT NULL
  • payment_history_id (결제 아이디) — int — Foreign key → payment_history.payment_history_id — NOT NULL
  • order_item_id (주문 항목의 아이디) — int — Foreign key → payment_history.order_item_id
  • order_id (오더 아이디) — int — Foreign key → payment_history.order_id — NOT NULL
  • payment_status (결제 상태) — ENUM
  • log_created_at (로그 생성 시간) — date

payment_methods (결제 방법 리스트)

  • payment_method_id (결제 방식 아이디) — int — Primary key — NOT NULL
  • name ("CASH", "CARD") — varchar

stock_change_reasons (재고 변동 사유 테이블)

  • reason_id (변경 사유 아이디) — int — Primary key — NOT NULL
  • store_id (매장 아이디) — int — Foreign key → 매장_계정.store_id
  • name (변동 사유 이름) — varchar

table_grouop_map (테이블 그룹 매핑 테이블)

  • table_id (테이블 아이디) — int — Foreign key → table_info.table_id — NOT NULL
  • group_id (그룹 아이디) — int — Foreign key → table_group.group_id — NOT NULL

table_group (테이블 그룹)

  • group_id (그룹 아이디) — int — Primary key — NOT NULL

table_info (테이블 정보)

  • table_id (테이블 아이디) — int — Primary key — NOT NULL
  • hall_id (홀 아이디) — int — Foreign key → hall.hall_id — NOT NULL
  • name (테이블 이름) — varchar
  • pos_x (x 포지션) — int
  • pos_y (Field) — int
  • width (테이블 길이) — int
  • height (테이블 높이) — int
  • current_order_id (현재 주문 아이디) — int
  • table_status ("AVAILABLE", "OCCUPIED","UNAVAILABLE",)

videos (메뉴 별 영상 목록)

  • video_id (비디오 아이디) — int — Primary key — NOT NULL
  • menu_id (메뉴 아이디) — int — Foreign key → menu_list.menu_id
  • video_url (비디오 주소) — varchar

매장 로그인 로그 (매장 로그인 기록)

  • 로그 아이디 — Primary key — NOT NULL
  • 매장_아이디 (매장 아이디) — Foreign key → 매장_계정.store_id
  • 로그인 시도 시간
  • 로그인 성공 여부
  • 아이피 주소 (로그인에 사용된 ip 주소)
  • 장치 정보 (로그인시 사용된 장치)

매장 비밀번호 변경 로그 (Untitled)

  • 비밀번호 변경 로그 아이디 — Primary key — NOT NULL
  • 매장_아이디 (매장 아이디) — Foreign key → 매장_계정.store_id
  • 변경 시간 (비밀번호 변경시간)
  • 아이피 주소 (비밀번호 변경에 사용된 ip 주소)
  • 장치 정보 (로그인시 사용된 장치)

매장_계정 (지점 계정)

  • store_id (매장 아이디) — Primary key
  • 매장_이름 (매장 이름)
  • 비밀번호
  • 사업자 번호 (사업자 등록 번호)
  • 계정 생성시간
  • 계정 업데이트 시간 (계정 정보 업데이트 시간)
  • 계정 활성화 여부

주문 항목 별 옵션 (주문항목 옵션)

  • order_item_option_id (주문 옵션 고유 ID) — Primary key
  • order_item_id (주문 항목의 아이디) — int — Foreign key → order_items.order_item_id
  • quantity (옵션 수량) — int
  • price (옵션 가격) — decimal
  • created_at (주문 옵션 생성시간) — date
  • updated_at (주문 옵션 업데이트 시간) — date

포스 정보 (포스기 정보 테이블)

  • 포스 아이디 — Primary key — NOT NULL
  • 매장_아이디 (매장 아이디) — Foreign key → 매장_계정.store_id
  • 시리얼 넘버 (포스기 시리얼넘버)

할인 (할인 목록)

  • 할인 아이디 — int — Primary key
  • 매장_아이디 (매장 아이디) — Foreign key → 매장_계정.store_id
  • 할인 이름 — varchar
  • 할인 타입 — ENUM
  • 할인 금액 또는 퍼센트 (할인 금액 또는 %) — DECIMAL
  • 자동 할인 여부 — BOOLEAN
  • 할인 시작 기간 — DATE
  • 할인 종료 기간 — DATE
  • 할인 적용 요일 — SET
  • 할인 적용 시작 시간 — TIME
  • 할인 적용 종료 시간 — TIME