tes-- Add slot game table to existing casino database
CREATE TABLE IF NOT EXISTS game_results (
  id INT PRIMARY KEY AUTO_INCREMENT,
  player_id INT NOT NULL,
  agent_id INT,
  game_type VARCHAR(50) DEFAULT 'slots',
  bet_amount DECIMAL(10,2) NOT NULL,
  win_amount DECIMAL(10,2) DEFAULT 0.00,
  result_symbols JSON NOT NULL,
  house_edge_amount DECIMAL(10,2) DEFAULT 0.00,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (player_id) REFERENCES users(id) ON DELETE CASCADE,
  FOREIGN KEY (agent_id) REFERENCES users(id) ON DELETE SET NULL,
  INDEX idx_player_date (player_id, created_at),
  INDEX idx_agent_date (agent_id, created_at)
);
