-- Player perk ownership and status
CREATE TABLE player_perks (
id INT AUTO_INCREMENT PRIMARY KEY,
player_uuid VARCHAR(36) NOT NULL,
perk_key VARCHAR(50) NOT NULL,
unlocked BOOLEAN DEFAULT TRUE,
active BOOLEAN DEFAULT FALSE,
unlock_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
level INT DEFAULT 1,
usage_count BIGINT DEFAULT 0,
UNIQUE KEY unique_player_perk (player_uuid, perk_key)
);
-- Player statistics and tracking
CREATE TABLE player_stats (
id INT AUTO_INCREMENT PRIMARY KEY,
player_uuid VARCHAR(36) NOT NULL,
total_perks_owned INT DEFAULT 0,
total_money_spent DECIMAL(15,2) DEFAULT 0.00,
join_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_seen TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY unique_player (player_uuid)
);