test

Tables (12)

account

  • user_id — BIGINT — Primary key — NOT NULL
  • account_code — VARCHAR(50)
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • password_fail_count — INT
  • status — VARCHAR(20) — NOT NULL
  • is_subscription — BOOLEAN
  • last_login_at — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

batch_execution_log

  • batch_id — VARCHAR(100) — Primary key — NOT NULL
  • batch_type — VARCHAR(50) — NOT NULL
  • started_at — DATETIME — NOT NULL
  • ended_at — DATETIME
  • status — VARCHAR(20) — NOT NULL
  • duration_seconds — INT
  • total_count — INT
  • success_count — INT
  • fail_count — INT
  • error_message — TEXT
  • error_details — TEXT
  • executed_by — VARCHAR(100) — NOT NULL
  • retry_count — INT
  • created_at — DATETIME

gx_class_info

  • class_info_id — BIGINT — Primary key — NOT NULL
  • class_name — VARCHAR(100)
  • instructor_id — BIGINT — Foreign key → account.user_id
  • start_time — TIME
  • end_time — TIME
  • day_of_week — INT
  • max_capacity — INT
  • min_capacity — INT
  • required_count — INT
  • created_at — DATETIME
  • updated_at — DATETIME

gx_reservation

  • reservation_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • session_id — BIGINT — Foreign key → gx_session.session_id — NOT NULL
  • membership_id — BIGINT — Foreign key → membership.membership_id
  • deducted_count — INT
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME
  • updated_at — DATETIME

gx_session

  • session_id — BIGINT — Primary key — NOT NULL
  • class_info_id — BIGINT — Foreign key → gx_class_info.class_info_id — NOT NULL
  • session_date — DATE — NOT NULL
  • start_time — DATETIME — NOT NULL
  • end_time — DATETIME — NOT NULL
  • reservation_count — INT
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME
  • updated_at — DATETIME

gx_waitlist

  • waitlist_id — BIGINT — Primary key — NOT NULL
  • session_id — BIGINT — Foreign key → gx_session.session_id — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • waitlist_order — INT — NOT NULL
  • created_at — DATETIME

ledger_integrity_check

  • check_id — BIGINT — Primary key — NOT NULL
  • batch_execution_id — VARCHAR(100) — NOT NULL
  • membership_id — BIGINT — Foreign key → membership.membership_id — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • ledger_sum — INT — NOT NULL
  • actual_balance — INT — NOT NULL
  • difference — INT — NOT NULL
  • check_status — VARCHAR(20) — NOT NULL
  • error_message — TEXT
  • adjusted_by — VARCHAR(100)
  • adjusted_at — DATETIME
  • adjustment_note — TEXT
  • checked_at — DATETIME

membership

  • membership_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • payment_id — BIGINT — Foreign key → payment.payment_id
  • status — VARCHAR(20) — NOT NULL
  • start_date — DATE — NOT NULL
  • end_date — DATE — NOT NULL
  • issued_at — DATETIME
  • initial_count — INT — NOT NULL
  • remaining_count — INT — NOT NULL
  • is_subscription — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

membership_ledger

  • ledger_id — BIGINT — Primary key — NOT NULL
  • membership_id — BIGINT — Foreign key → membership.membership_id — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • transaction_type — VARCHAR(50) — NOT NULL
  • transaction_amount — INT — NOT NULL
  • balance_after — INT — NOT NULL
  • session_id — BIGINT — Foreign key → gx_session.session_id
  • reservation_id — BIGINT — Foreign key → gx_reservation.reservation_id
  • payment_id — BIGINT — Foreign key → payment.payment_id
  • batch_id — VARCHAR(100)
  • reference_ledger_id — BIGINT — Foreign key → membership_ledger.ledger_id
  • description — VARCHAR(500)
  • created_by — VARCHAR(100) — NOT NULL
  • created_at — DATETIME

payment

  • payment_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • payment_method — VARCHAR(50)
  • amount — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • membership_count — INT
  • paid_at — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

user_penalty

  • penalty_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • penalty_count — INT
  • start_date — DATE
  • end_date — DATE
  • created_at — DATETIME
  • updated_at — DATETIME

user_profile

  • user_id — BIGINT — Foreign key → account.user_id — NOT NULL
  • user_name — VARCHAR(100)
  • phone_number — VARCHAR(20)