온라인 공연 예매

테이블 (9)

Hall (공연장)

  • id (공연장 아이디) — not null — 기본 키 — NOT NULL
  • hallName (공연장 이름) — not null
  • location (공연장 장소) — not null
  • totalSeat (총 좌석 수) — not null
  • createdAt (생성 날짜) — not null
  • updatedAt (수정 날짜) — not null

Order (예매)

  • id (예매 번호) — not null — 기본 키 — NOT NULL
  • userId (유저 아이디) — not null — 외래 키 → User.id — NOT NULL
  • paymentId (결제 수단 아이디) — not null — 외래 키 → Payment.id — NOT NULL
  • totalPrice (총 예매 가격) — not null
  • orderState (결제 상태) — notnull
  • createdAt (생성 날짜) — not null
  • deletedAt (삭제 날짜) — not null

OrderInfo (예매 정보)

  • id (예매 정보 아이디) — not null — 기본 키 — NOT NULL
  • orderId (예매 번호) — not null — 외래 키 → Order.id — NOT NULL
  • seatId (좌석 아이디) — not null — 외래 키 → Seat.id — NOT NULL
  • scheduleId (공연 날짜 아이디) — not null — 외래 키 → Seat.scheduleId — NOT NULL
  • showId (공연 아이디) — not null — 외래 키 → Seat.showId — NOT NULL
  • hallId (공연장 아이디) — not null — 외래 키 → Seat.hallId — NOT NULL
  • createdAt (생성 날짜) — not null

Payment (결제 수단)

  • id (결제 수단 아이디) — not null — 기본 키 — NOT NULL
  • paymentName (결제 수단 이름) — not null
  • createdAt (생성 날짜) — not null

Point (포인트)

  • id (포인트 아이디) — not null — 기본 키 — NOT NULL
  • userId (유저 아이디) — not null — 외래 키 → User.id — NOT NULL
  • pointDetrails (포인트 내역) — not null
  • reason (사유) — not null
  • totalPoint (남은 포인트) — not null
  • createdAt (생성 날짜) — not null

Schedule (공연 일정)

  • id (공연 날짜 아이디) — not null — 기본 키 — NOT NULL
  • showId (공연 아이디) — not null — 외래 키 → Show.id — NOT NULL
  • hallId (공연장 아이디) — not null — 외래 키 → Show.hallId — NOT NULL
  • scheduleDate (상영 날짜 및 시간) — not null

Seat (좌석)

  • id (좌석 아이디) — not null — 기본 키 — NOT NULL
  • scheduleId (공연 날짜 아이디) — not null — 외래 키 → Schedule.id — NOT NULL
  • showId (공연 아이디) — not null — 외래 키 → Schedule.showId — NOT NULL
  • hallId (공연장 아이디) — not null — 외래 키 → Schedule.hallId — NOT NULL
  • seatNumber (좌석 번호) — not null
  • seatStatus (좌석 상태) — notnull

Show (공연)

  • id (공연 아이디) — not null — 기본 키 — NOT NULL
  • hallId (공연장 아이디) — not null — 외래 키 → Hall.id — NOT NULL
  • showName (공연 이름) — not null
  • image (공연 이미지) — not null
  • showExplain (공연 설명) — not null
  • remainingSeat (남은 좌석 수) — not null
  • category (카테고리) — not null
  • price (공연 금액) — not null
  • createdAt (생성 날짜) — not null
  • updatedAt (수정 날짜) — not null

User (유저)

  • id (유저 아이디) — not null — 기본 키 — NOT NULL
  • email (이메일) — not null
  • password (비밀번호) — not null
  • nickName (닉네임) — not null
  • role (유저 타입) — not null
  • createdAt (유저 생성일) — not null
  • updatedAt (유저 수정일) — not null