hali

Tables (11)

Bell_Log

  • bell_id — BIGINT
  • round_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • is_success — BOOLEAN — NOT NULL
  • pressed_at — DATETIME

Card

  • card_id — BIGINT
  • fruit_type — ENUM('STRAWBERRY','BANANA','PLUM','LIME') — NOT NULL
  • fruit_count — TINYINT — NOT NULL

Deck

  • deck_id — BIGINT
  • game_id — BIGINT — NOT NULL
  • created_at — DATETIME

DeckCardDistribution

  • dist_id — BIGINT
  • deck_id — BIGINT — NOT NULL
  • card_id — BIGINT — NOT NULL
  • user_id — BIGINT
  • round_id — BIGINT
  • position — INT

Game

  • game_id — BIGINT
  • room_id — BIGINT — NOT NULL
  • started_at — DATETIME
  • ended_at — DATETIME
  • status — ENUM('PLAYING','FINISHED')
  • total_rounds — INT

GameResult

  • result_id — BIGINT
  • game_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • rank — TINYINT
  • cards_left — INT
  • exp_gain — INT
  • banana_gain — BIGINT

Room

  • room_id — BIGINT
  • host_user_id — BIGINT — NOT NULL
  • room_type — ENUM('PUBLIC','PRIVATE')
  • room_password — VARCHAR(64)
  • max_players — TINYINT — NOT NULL
  • status — ENUM('WAITING','PLAYING','CLOSED')
  • created_at — DATETIME

RoomPlayer

  • room_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Primary key — NOT NULL
  • is_ready — BOOLEAN
  • is_host — BOOLEAN
  • joined_at — DATETIME

Round

  • round_id — BIGINT
  • game_id — BIGINT — NOT NULL
  • round_no — INT — NOT NULL
  • started_at — DATETIME
  • ended_at — DATETIME
  • winner_user_id — BIGINT

RoundState

  • round_state_id — BIGINT
  • round_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • card_shown — VARCHAR(50)
  • cards_remaining — INT
  • reveal_time — DATETIME

User

  • user_id — BIGINT
  • nickname — VARCHAR(50) — NOT NULL
  • password_hash — VARCHAR(255)
  • gender — ENUM('M','F','OTHER')
  • exp — INT
  • lvl — INT
  • banana — BIGINT
  • created_at — DATETIME
  • last_login — DATETIME
  • status — ENUM('ACTIVE','BANNED','DELETED')