baegopa_Public

Tables (23)

p_ai_log (ai_log 생성)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 상품 FK (product_id) — uuid — Foreign key → p_product.상품 PK — NOT NULL — auto_increment
  • 상품설명AI (request_text) — text — NOT NULL
  • 메뉴추천AI (response_text) — text — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_cart (장바구니)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 사용자 FK (user_id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto increment
  • 가게 FK (store_id) — uuid — Foreign key → p_store.가게 PK — NOT NULL — auto_increment
  • 상태 (status) — enum — NOT NULL — enum(‘ACTIVE’,‘ORDERED’,‘ABANDONED’)
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_cart_item (장바구니 상품)

  • 장바구니 상품 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 장바구니 FK (cart_id) — uuid — Foreign key → p_cart.PK — NOT NULL — auto_increment
  • 상품 FK (product_id) — uuid — Foreign key → p_product.상품 PK — NOT NULL — auto_increment
  • 수량 (quantitiy) — int — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_cart_item_option (장바구니 옵션)

  • 장바구니 옵션 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 장바구니 상품 FK (cart_item_id) — uuid — Foreign key → p_cart_item.장바구니 상품 PK — NOT NULL — auto_increment
  • 상품 옵션 FK (product_option_id) — uuid — Foreign key → p_product_option.상품 옵션 PK — NOT NULL — auto_increment
  • 옵션 항목 FK (product_option_item_id) — uuid — Foreign key → p_product_option_item.옵션 항목 PK — NOT NULL — auto_increment
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_category (카테고리)

  • 카테고리PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 카테고리명 (name) — varchar(30) — NOT NULL — unique
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_order (주문)

  • 주문 PK (id) — uuid — Primary key — NOT NULL — auto increment
  • 사용자 FK (user_id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto increment
  • 가게 FK (store_id) — uuid — Foreign key → p_store.가게 PK — NOT NULL — auto_increment
  • 주소 FK (delivery_address_id) — uuid — Foreign key → p_user_address.주소 PK — NOT NULL — auto_increment
  • 주문번호 (order_no) — varchar(50) — NOT NULL
  • 상태 (status) — enum — NOT NULL — enum(‘PENDING’,‘PAID’,‘CANCELED’,‘COMPLETED’)
  • 요청메모 (request_memo) — varchar(255)
  • 취소사유 (canceled_reason) — varchar(255)
  • 총액 (total_amount) — int — NOT NULL
  • 주문일시 (order_date) — timestamp — NOT NULL
  • 완료일시 (completed_at) — timestamp
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_order_item (주문 상품)

  • 주문상품 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 주문 FK (order_id) — uuid — Foreign key → p_order.주문 PK — NOT NULL — auto increment
  • 상품 FK (product_id) — uuid — Foreign key → p_product.상품 PK — NOT NULL — auto_increment
  • 상품명 (product_name) — varchar(255) — NOT NULL
  • 단가 (unit_price) — decimal — NOT NULL
  • 수량 (quantitiy) — int — NOT NULL
  • 라인 총액 (line_total_amount) — int — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_order_item_option (주문 상품 옵션)

  • 주문옵션 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 주문 상품 FK (order_item_id) — uuid — Foreign key → p_order_item.주문상품 PK — NOT NULL — auto_increment
  • 옵션명 (option_name) — varchar(100) — NOT NULL
  • 옵션 항목명 (option_item_name) — varchar(100) — NOT NULL
  • 추가금액 (extra_price) — int — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_payment (결제)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 주문 FK (order_id) — uuid — Foreign key → p_order.주문 PK — NOT NULL — auto increment
  • 결제 상태 (status) — enum — NOT NULL — READY/PAID/CANCELED
  • 결제 금액 (amount) — int — NOT NULL
  • 결제일시 (paid_at) — timestamp
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_payment_log (결제 로그)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 결제 FK (payment_id) — uuid — Foreign key → p_payment.PK — NOT NULL — auto_increment
  • 상태 (status) — varchar(50)
  • 결제 key (payment_key) — varchar(255)
  • 실패 이유 (reason) — text
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_product (상품)

  • 상품 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 가게 FK (store_id) — uuid — Foreign key → p_store.가게 PK — NOT NULL — auto_increment
  • 상품명 (name) — varchar(200) — NOT NULL
  • 기본가격 (price) — int — NOT NULL
  • 상품설명 (description) — text
  • ai 사용 여부 (use_ai_description) — boolean — NOT NULL
  • 상품 이미지 (image_url) — varchar(500)
  • 품절여부 (is_sold_out) — boolean — NOT NULL
  • 노출여부 (is_hidden) — boolean
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_product_ai_log (상품 설명 ai 생성 이력)

  • 상품 ai 로그 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 상품 FK (product_id) — uuid — Foreign key → p_product.상품 PK — NOT NULL — auto_increment
  • AI 요청 프롬프트 (prompt) — timestamp — NOT NULL
  • AI 생성 결과 텍스트 (generated_text) — uuid — NOT NULL
  • 사용 모델명 (model_name) — timestamp — NOT NULL
  • 생성시각 (created_at) — uuid — NOT NULL
  • 생성자 (uuid) — timestamp

p_product_option (상품 옵션 그룹)

  • 상품 옵션 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 상품 FK (product_id) — uuid — Foreign key → p_product.상품 PK — NOT NULL — auto_increment
  • 그룹명 (name) — varchar(100) — 예: 맵기, 사이즈
  • 필수 선택 여부 (is_required) — boolean — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_product_option_item (상품 옵션 항목)

  • 옵션 항목 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 상품 옵션 FK (product_option_id) — uuid — Foreign key → p_product_option.상품 옵션 PK — NOT NULL — auto_increment
  • 옵션명 (name) — varchar(100) — NOT NULL
  • 추가 긍액 (additional_price) — int — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid — NOT NULL
  • 수정일시 (updated_at) — timestamp — NOT NULL
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp — NOT NULL
  • 삭제자 (deleted_by) — uuid

p_region (지역)

  • 지역PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 지역명 (name) — varchar(50) — NOT NULL — UK
  • 운영여부 (is_active) — boolean — NOT NULL
  • 운영영역 (geom) — geometry(MultiPoly gon, 4326) — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL

p_review (리뷰)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 주문 FK (order_id) — uuid — Foreign key → p_order.주문 PK — NOT NULL — auto increment
  • 가게 FK (store_id) — uuid — Foreign key → p_store.가게 PK — NOT NULL — auto_increment
  • 사용자 FK (user_Id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto increment
  • 리뷰칸 (content) — vachar
  • 평점 (rating) — int — NOT NULL
  • 숨김처리 (is_hidden) — boolean — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_review_image (리뷰 이미지)

  • PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 리뷰PK (review_id) — uuid — Foreign key → p_review.PK — NOT NULL — auto_increment
  • 이미지URL (image_url) — varchar — NOT NULL
  • 정렬 (sort_order) — int — NOT NULL
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_role (권한)

  • 권한 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 권한 (type) — enum — NOT NULL — enum(''ROLE_CUSTOMER', ''ROLE_OWNER', ''ROLE_MANAGER', ''ROLE_MASTER')
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid — NOT NULL
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_store (가게)

  • 가게 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 사용자 FK (user_id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto increment
  • 지역 FK (regoin_id) — uuid — Foreign key → p_region.지역PK — NOT NULL — auto_increment
  • 매장명 (name) — varchar(100) — NOT NULL
  • 매상 설명 (description) — text
  • 주소 (adress) — varchar(255) — NOT NULL
  • 좌표 (location) — geometry(Point,432 6 — NOT NULL — 좌표(Point)
  • 연락처 (phone) — varchar(20 — NOT NULL
  • 가게이미지 (image_url) — varchar(500)
  • 오픈시간 (open_time) — time
  • 마감시간 (close_time) — time
  • 상태 (status) — enum — NOT NULL — 'OPEN','CLOSED','INACTIVE'
  • 최소 배달 시간 (delivery_min_minut es) — int — NOT NULL
  • 최대 배달 시간 (delivery_max_minut es) — int — NOT NULL
  • 기본 배달비 (delivery_fee) — int — NOT NULL
  • 최소주문금액 (minimum_order_amount) — int
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_store_category (가게-카테고리 매핑)

  • 카테고리 매핑 PK (id) — uuid — Primary key — NOT NULL — auto_increment, UNIQUE
  • 카테고리 FK (category_id) — uuid — Foreign key → p_category.카테고리PK — NOT NULL — auto_increment
  • 가게 FK (store_id) — uuid — Foreign key → p_store.가게 PK — NOT NULL — auto_increment
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_user (사용자)

  • 사용자 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 로그인id (login_id) — varchar(50) — NOT NULL — unique
  • 비밀번호 (password) — varchar(255) — NOT NULL
  • 이메일 (email) — varchar(255) — NOT NULL — unique
  • 이름 (name) — varchar(50) — NOT NULL
  • 번호 (phone) — varchar(50) — NOT NULL — unique
  • 상태 (status) — enum — NOT NULL — enum('ACTIVE', 'BLOCKED', 'WITHDRAWN', 'DELETED')
  • 리프레쉬 토큰 (refreshToken) — length(500)
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid — NOT NULL
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_user_address (사용자 주소)

  • 주소 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 사용자 FK (user_id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto_increment
  • 주소 별칭 (address_name) — varchar(50) — NOT NULL
  • 수령인 전화 (phone) — varchar(20) — NOT NULL
  • 기본 주소 (address) — varcahr(255) — NOT NULL
  • 상세 주소 (detail_address) — varchar(255)
  • 위도 (latitude) — decimal(10, 7)
  • 경도 (longitude) — decimal(10, 7)
  • 기본주소 여부 (is_default) — boolean
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid — NOT NULL
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid

p_user_roles (유저 권한)

  • 유저 권한 PK (id) — uuid — Primary key — NOT NULL — auto_increment
  • 사용자 FK (user_id) — uuid — Foreign key → p_user.사용자 PK — NOT NULL — auto_increment
  • 권한 FK (role_id) — uuid — Foreign key → p_role.권한 PK — NOT NULL — auto_increment
  • 생성일시 (created_at) — timestamp — NOT NULL
  • 생성자 (created_by) — uuid — NOT NULL
  • 수정일시 (updated_at) — timestamp
  • 수정자 (updated_by) — uuid
  • 삭제일시 (deleted_at) — timestamp
  • 삭제자 (deleted_by) — uuid