Fitness Reservation

Tables (4)

fitness_class

  • id — BIGINT — Primary key — NOT NULL
  • trainer_id — BIGINT — Foreign key → member.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • class_date_time — DATETIME — NOT NULL
  • capacity — INT — NOT NULL
  • version — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL

member

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

reservation

  • id — BIGINT — Primary key — NOT NULL
  • class_id — BIGINT — Foreign key → fitness_class.id — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • reserved_at — DATETIME — NOT NULL
  • cancelled_at — DATETIME

session_ticket

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • total_count — INT — NOT NULL
  • remaining_count — INT — NOT NULL
  • issued_at — DATETIME — NOT NULL