CREATE TABLE dandexte_users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    role ENUM('super_admin', 'admin', 'editor', 'attendee') NOT NULL
);

CREATE TABLE dandexte_events (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    description TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE dandexte_event_content (
    id INT AUTO_INCREMENT PRIMARY KEY,
    event_id INT,
    content_type ENUM('agenda', 'speakers', 'sessions', 'downloads') NOT NULL,
    content_data TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (event_id) REFERENCES dandexte_events(id) ON DELETE CASCADE
);
