CREATE TABLE IF NOT EXISTS posts (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    content TEXT,
    item_id INT,
    item_type VARCHAR(50),
    author VARCHAR(255) DEFAULT 'Admin',
    views INT DEFAULT 0,
    downloads INT DEFAULT 0,
    hours_played INT DEFAULT 0,
    copies_sold INT DEFAULT 0,
    price DECIMAL(10, 2) DEFAULT 0.00,
    reserves_price INT DEFAULT 0,
    can_purchase TINYINT(1) DEFAULT 0,
    posted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    last_bumped TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    last_sync TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX (item_id, item_type)
);
