reservation
Tables (11)
CATEGORYS (카테고리)
- category_id (PK) — BIGINT
- name (이름)
- isActive (상태값)
- store_id (PK2) — BIGINT — Foreign key → STORES.store_id — NOT NULL
ChatMessages (채팅메세지)
- id (Key) — Primary key — NOT NULL
- created_at (Field)
- content (Field2)
- sender_id (Field3)
- read_states (Field4)
- sender_type (Field5)
- chatroom_Id (Key2) — Foreign key → ChatRoom.id — NOT NULL
ChatRoom (채팅방)
- id (Key) — Primary key — NOT NULL
- user_id (Field2)
- storeid (Field)
PAYMENT (결제/환불)
- payment_id (Key) — BIGINT — Primary key — NOT NULL
- amount (Field) — INT
- status (Field2) — VARCHAR(20)
- type (Field3) — VARCHAR(20)
- payment_method (Field4) — VARCHAR(50)
- pg_transaction_no (Field5) — VARCHAR(40)
- requested_at (Field6) — TIMESTAMP
- processed_at (Field7) — TIMESTAMP
- refunded_at (Field8) — TIMESTAMP
- fail_reason (Field9) — VARCHAR(100)
- memo (Field10) — VARCHAR(100)
- created_at (Field11) — TIMESTAMP
- updated_at (Field12) — TIMESTAMP
- reservation_id (FK) — BIGINT — Foreign key → RESERVATION_HDR.reservation_id — NOT NULL
PRODUCTS (서비스)
- service_id (PK) — BIGINT — Primary key — NOT NULL
- name (서비스명) — VARCHAR(255)
- description (서비스 소개) — TEXT
- category (카테고리) — VARCHAR(100)
- price (가격) — INT
- created_at (생성 시간) — TIMESTAMP
- update_at (수정 시간) — TIMESTAMP
- is_active (상태값) — ENUM('PENDING', 'CONFIRMED', 'CANCELLED')
- store_id (PK2) — BIGINT — Foreign key → STORES.store_id — NOT NULL
RESERVATION_DTL (예약 상세 정보)
- reservation_id (PK) — BIGINT — Foreign key → RESERVATION_HDR.reservation_id — NOT NULL
- special_requests (요청 사항) — TEXT
- cancellation_policy (취소 정책) — VARCHAR(100)
RESERVATION_HDR (예약 기본 정보)
- reservation_id (PK) — BIGINT — Primary key — NOT NULL
- date (예약 날짜) — DATE
- time (예약 시간) — TIME
- status (예약 상태) — VARCHAR(20)
- created_at (생성 시간) — TIMESTAMP
- update_at (수정 시간) — TIMESTAMP
- is_active (상태값) — ENUM('PENDING', 'CONFIRMED', 'CANCELLED')
- user_id (PK, 사용자 아이디) — BIGINT — Foreign key → USERS.user_id — NOT NULL
- service_id (PK2) — BIGINT — Foreign key → PRODUCTS.service_id — NOT NULL
RESERVATION_HISTORY (예약 상태 변경 이력)
- history_id (PK) — BIGINT — Primary key — NOT NULL
- changed_by (수정자) — BIGINT
- status_before (이전 상태) — VARCHAR
- status_after (변경 상태) — VARCHAR
- changed_at (변경 시간) — TIMESTAMP
- reason (사유) — VARCHAR
- reservation_id (FK) — BIGINT — Foreign key → RESERVATION_HDR.reservation_id — NOT NULL
STORES (가게)
- store_id (PK) — BIGINT — Primary key — NOT NULL
- name (가게명) — DATE
- owner_name (담당자) — TIME
- phone_number (가게 연락처) — VARCHAR(20)
- address (가게 주소) — VARCHAR(500)
- description (가게 소개) — TEXT
- category (카테고리) — VARCHAR(100)
- biz_registration_numbe (사업자등록번호) — VARCHAR(20)
- created_at (생성 시간) — TIMESTAMP
- updated_at (수정 시간) — TIMESTAMP
- is_approved (승인 여부) — BOOLEAN
STORE_OPERATION_HOURS (가게 영업 시간)
- id (Key) — BIGINT — Primary key — NOT NULL
- store_id (FK) — BIGINT — Foreign key → STORES.store_id — NOT NULL
- day_of_week (요일) — TINYINT
- start_time (영업시작시간) — TIME
- end_time (영업종료시간) — TIME
- slot_duration (단위 시간(분)) — INT
- is_active (운영 여부)
- created_at (생성 시간) — TIMESTAMP
- updated_at (수정 시간) — TIMESTAMP
USERS (사용자)
- user_id (PK, 사용자 아이디) — BIGINT — Primary key — NOT NULL
- email (이메일) — VARCHAR(255)
- password (비밀번호) — VARCHAR(255)
- name (이름) — VARCHAR(100)
- phone_number (연락처) — VARCHAR(20)
- created_at (생성 시간) — TIMESTAMP
- update_at (수정 시간) — TIMESTAMP
- is_active (상태값) — ENUM('PENDING', 'CONFIRMED', 'CANCELLED')