콘서트 예약 서비스
테이블 (7)
결제 (payment)
- paymentId (payment_id) — bigint — 기본 키 — NOT NULL — 결제 PK
- reservationId (reservation_id) — bigint — 외래 키 → 예약.reservationId — NOT NULL — 예약 PK
- userId (user_id) — bigint — 외래 키 → 예약.userId — NOT NULL — 사용자 PK
- paymentPrice (payment_price) — price — NOT NULL — 결제 금액
- status — enum — NOT NULL — 결제 상태 Enum(대기, 완료)
- paidAt (paid_at) — datetime — 결제 완료일시
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시
사용자 (user)
- userId (user_id) — bigint — 기본 키 — NOT NULL — 사용자 PK
- balance — price — 잔액
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시
예약 (reservation)
- reservationId (reservation_id) — bigint — 기본 키 — NOT NULL — 예약 PK
- seatId (seat_id) — bigint — 외래 키 → 좌석.seatId — NOT NULL — 좌석 PK
- userId (user_id) — bigint — 외래 키 → 사용자.userId — NOT NULL — 사용자 PK
- status — enum — NOT NULL — 예약 상태 Enum(진행중, 완료)
- reservedAt (reserved_at) — datetime — 예약 완료 일시
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시
예약 임시 배정 (temp_reservation)
- tempReservationId (temp_reservation_id) — bigint — 기본 키 — NOT NULL — 예약 임시 배정 PK
- reservationId (reservation_id) — bigint — 외래 키 → 예약.reservationId — NOT NULL — 예약 PK
- token — string — NOT NULL — 토큰
- score — time — NOT NULL — 시간정렬값
좌석 (seat)
- seatId (seat_id) — bigint — 기본 키 — NOT NULL — 좌석 PK
- concertDateId (concert_date_id) — bigint — 외래 키 → 콘서트 날짜.concertDateId — NOT NULL — 콘서트 날짜 PK
- seatNum (seat_num) — int — NOT NULL — 좌석 번호
- isReserved (is_reserved) — boolean — NOT NULL — 예약 여부
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시
콘서트 (concert)
- concertId (concert_id) — bigint — 기본 키 — NOT NULL — 콘서트 PK
- name — varchar(50) — NOT NULL — 콘서트 명
- location — string — NOT NULL — 장소
- price — price — NOT NULL — 가격
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시
콘서트 날짜 (concert_date)
- concertDateId (concert_date_id) — bigint — 기본 키 — NOT NULL — 콘서트 날짜 PK
- concertId (concert_id) — bigint — 외래 키 → 콘서트.concertId — NOT NULL — 콘서트 PK
- concertDate (concert_date) — datetime — NOT NULL — 콘서트 일시
- seats — int — NOT NULL — 좌석 수
- createdAt (created_at) — datetime — NOT NULL — 생성 일시
- updatedAt (updated_at) — datetime — 수정 일시