iPho-ERD

Tables (6)

Event

  • event_id (Key) — UUID — Primary key — NOT NULL
  • title (Field) — VARCHAR
  • description (Field2) — VARCHAR
  • date (Field3) — TIMESTAMP
  • location (Field4) — VARCHAR
  • start_time (Field5) — TIMESTAMP
  • end_time (Field6) — TIMESTAMP

Notification

  • notification_id — UUID — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → User.user_id — NOT NULL
  • type — ENUM
  • messgae (Field) — TEXT
  • status — ENUM

Payment

  • payment_id — UUID — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → User.user_id — NOT NULL
  • ticket_id — UUID — Foreign key → Ticket.ticket_id — NOT NULL
  • method — ENUM
  • amount — DECIMAL
  • status — ENUM
  • date — TIMESTAMP

Seat (seat)

  • seat_id — UUID — Primary key — NOT NULL
  • event_id (Key) — UUID — Foreign key → Event.event_id — NOT NULL
  • seat_number — VARCHAR
  • status — ENUM
  • price — DECIMAL

Ticket

  • ticket_id — UUID — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → User.user_id — NOT NULL
  • seat_id — UUID — Foreign key → Seat.seat_id — NOT NULL
  • event_id (Key) — UUID — Foreign key → Event.event_id — NOT NULL
  • status — ENUM
  • reservation_time — TIMESTAMP
  • expiration_time — TIMESTAMP

User

  • user_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR
  • password — VARCHAR
  • name — VARCHAR
  • phone_number — VARCHAR
  • role — ENUM