
CREATE TABLE IF NOT EXISTS draft_sessions (
  id VARCHAR(32) PRIMARY KEY,
  league_id VARCHAR(64),
  league_name VARCHAR(191),
  rookie_year INT,
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS teams (
  id VARCHAR(32) PRIMARY KEY,
  session_id VARCHAR(32),
  name VARCHAR(191)
);

CREATE TABLE IF NOT EXISTS team_auth (
  team_id VARCHAR(32) PRIMARY KEY,
  pin_hash VARCHAR(255)
);

CREATE TABLE IF NOT EXISTS picks (
  id VARCHAR(32) PRIMARY KEY,
  session_id VARCHAR(32),
  pick_no INT,
  team_id VARCHAR(32),
  player_name VARCHAR(191),
  status ENUM('OPEN','PENDING','CONFIRMED') DEFAULT 'OPEN'
);
