tarot
Tables (9)
availability
- availability_id — BIGINT — Primary key — NOT NULL
- seller_id — BIGINT — Foreign key → seller.seller_id — NOT NULL
- weekday — TINYINT — NOT NULL — 0=일 ~ 6=토
- start_time — TIME — NOT NULL
- end_time — TIME — NOT NULL
- slot_unit_min — SMALLINT — NOT NULL — 예약 슬롯 단위(분)
- buffer_min — SMALLINT — NOT NULL — 상담 사이 여유시간(분, 예: 10~15)
- min_lead_min — SMALLINT — NOT NULL — 당일 예약 마감 기준(분 전, 예: 60)
notice
- notice_id — BIGINT — Primary key — NOT NULL
- seller_id — BIGINT — Foreign key → seller.seller_id — NOT NULL
- notice_type — ENUM('일정안내', '주의사항', '환불규정') — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — TEXT — NOT NULL
- updated_at — DATETIME — NOT NULL
payment
- payment_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservation.reservation_id — NOT NULL
- amount — INT — NOT NULL
- status — ENUM('결제대기', '결제완료', '환불완료') — NOT NULL
- paid_at — DATETIME
- refunded_at — DATETIME
- p3_transaction_id — VARCHAR(100) — point3 어댑터 참조 ID
product
- product_id — BIGINT — Primary key — NOT NULL
- seller_id — BIGINT — Foreign key → seller.seller_id — NOT NULL
- product_type — ENUM('시간제', '질문제') — NOT NULL
- name — VARCHAR(100) — NOT NULL — 상품명 (예: 30분 상담)
- duration_min — SMALLINT — 시간제 전용 — 15 / 30 / 60분 (질문제는 NULL)
- unit_price — INT — NOT NULL — 시간제=상품가, 질문제=질문 1개당 가격
- description — VARCHAR(500) — 상담 방식·범위 설명
- is_active — BOOLEAN — NOT NULL — 판매 노출 여부
- display_order — SMALLINT — NOT NULL
question_template
- template_id — BIGINT — Primary key — NOT NULL
- product_id — BIGINT — Foreign key → product.product_id — NOT NULL
- field_type — ENUM('단일선택', '서술형') — NOT NULL
- label — VARCHAR(200) — NOT NULL — 질문 문구 (예: 어떤 주제로 상담받고 싶나요?)
- options — VARCHAR(300) — 단일선택 보기, 콤마 구분 (예: 연애운,재회운,합격운,기타)
- is_required — BOOLEAN — NOT NULL
- display_order — SMALLINT — NOT NULL
reservation
- reservation_id — BIGINT — Primary key — NOT NULL
- seller_id — BIGINT — Foreign key → seller.seller_id — NOT NULL
- product_id — BIGINT — Foreign key → product.product_id — NOT NULL
- customer_name — VARCHAR(50) — NOT NULL — 닉네임 또는 이름 (실명 강제 아님)
- contact_method — ENUM('전화', '카톡') — NOT NULL
- contact_value — VARCHAR(200) — NOT NULL — 전화번호 또는 카카오ID·오픈채팅 링크
- notify_phone — VARCHAR(20) — NOT NULL — 예약 상태 안내용 연락처
- reserved_date — DATE — NOT NULL
- reserved_time — TIME — 시간제 전용 (질문제는 NULL)
- question_count — SMALLINT — 질문제 전용 (시간제는 NULL)
- amount — INT — NOT NULL — 결제 금액
- status — ENUM('승인대기', '예약확정', '거절', '진행완료') — NOT NULL
- agreed_terms — BOOLEAN — NOT NULL — 예약·취소 안내 동의
- agreed_privacy — BOOLEAN — NOT NULL — 개인정보 수집·이용 동의
- requested_at — DATETIME — NOT NULL
reservation_answer
- answer_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservation.reservation_id — NOT NULL
- question_label — VARCHAR(200) — NOT NULL — 질문 문구 스냅샷
- answer_text — TEXT — NOT NULL — 고객 응답
reservation_question_item
- item_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservation.reservation_id — NOT NULL
- seq_no — SMALLINT — NOT NULL — 순번 (1, 2 …)
- question_text — VARCHAR(300) — NOT NULL
seller
- seller_id — BIGINT — Primary key — NOT NULL
- phone_number — VARCHAR(20) — NOT NULL — 로그인 ID (전화번호)
- password_hash — VARCHAR(255) — NOT NULL — 비밀번호 해시
- display_name — VARCHAR(50) — NOT NULL — 활동명 (예: 별빛타로)
- profile_intro — VARCHAR(255) — 한줄 소개 (예: 재회·속마음·연애 전문 타로 상담)
- career_years — SMALLINT — 상담 경력(년)
- profile_image_url — VARCHAR(500) — 프로필 이미지 URL
- created_at — DATETIME — NOT NULL