saju service
Tables (7)
Reservation (예약)
- 예약아이디 (id) — bigint — Primary key — NOT NULL
- 예약한 사용자 (user_id) — Bigint — Foreign key → User.아이디 — NOT NULL
- 예약한 상담 서비스 (service_item_id) — Bigint — Foreign key → ServiceItem.서비스아이디 — NOT NULL
- 예약일시 (reservation_time) — DateTime
- 예약상태 (status) — ENUM(RESERVED,COMPLETED,CANCELED) — NOT NULL
- 생성일 (created_at) — DateTime
- 수정일 (updated_at) — DateTime
ServiceItem (상담서비스)
- 서비스아이디 (id) — Bigint — Primary key — NOT NULL
- 서비스타입 (type) — varchar(50) — NOT NULL — saju,tarot,other
- 서비스명 (title) — varchar(255)
- 상세설명 (description) — text
- 상담시간(분단위) (duration) — int — NOT NULL
- 금액 (price) — int — NOT NULL
- 생성일 (created_at) — DateTime
- 수정일 (updated_at) — DateTime
User (유저)
- 아이디 (id) — Bigint — Primary key — NOT NULL
- 이름 (username) — varchar(100) — NOT NULL
- 이메일 (email) — varchar(150) — NOT NULL
- 비밀번호 (password) — varchar(150) — NOT NULL
- 전화번호 (phone) — varchar(50) — NOT NULL
- 역할 (role) — enum(USER,ADMIN) — NOT NULL
- 생성일 (created_at) — DateTime
- 수정일 (updated_at) — DateTime
consultations (상담결과)
- 상담 결과 id (id) — bigint — Primary key — NOT NULL
- 예약아이디 (reservation_id) — bigint — Foreign key → Reservation.예약아이디 — NOT NULL
- 상담자 이름 (counselor_name) — varchar(100)
- 상담 내용 요약 (summary) — text
- 상담 기록 저장 일시 (created_at) — DateTime
notifications (시스템알림)
- 알림 아이디 (id) — bigint — Primary key — NOT NULL
- 알림 수신자 (user_id) — Bigint — Foreign key → User.아이디 — NOT NULL
- 알림 내용 (message) — text — NOT NULL
- 전송시작 (sent_at) — DateTime
- 알림종류 (type) — Enum(reservation,cancerl,reminder)
payments (결제)
- 아이디 (id) — Primary key — NOT NULL
- 예약아이디 (reservation_id) — bigint — Foreign key → Reservation.예약아이디 — NOT NULL
- 결제금액 (amount) — int
- 결제수단 (method) — enum(card,bank,cash)
- 결제 상태 (status) — enum(paid,refund,pending)
- pg거래번호 (transaction_id) — varchar(255)
- 결제 완료 시각 (paid_at) — DateTime
- 결제 요청 시각 (created_at) — Date Time
reviews (후기)
- 후기아이디 (id) — bigint — Primary key — NOT NULL
- 후기 작성자 (user_id) — Bigint — Foreign key → User.아이디 — NOT NULL
- 후기 대상 아이디 (reservation_id) — bigint — Foreign key → Reservation.예약아이디 — NOT NULL
- 별점 (rating) — int
- 작성일시 (created_at) — DateTime