-- Super-Admin Tabelle für das Admin-Portal
CREATE TABLE IF NOT EXISTS `super_admins` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `username` VARCHAR(255) NOT NULL UNIQUE,
    `email` VARCHAR(255) NOT NULL UNIQUE,
    `password` VARCHAR(255) NOT NULL,
    `is_active` TINYINT(1) DEFAULT 1,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX `idx_username` (`username`),
    INDEX `idx_email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Super-Admin erstellen
INSERT INTO `super_admins` (username, email, password, is_active) 
VALUES ('o.mankewitz.de', 'o.mankewitz.de@example.com', '$2y$10$P8iCkk0OWybSwiWJskpwZ.p2FoQeLY22rDqdeQIRXVeLIdB.SlDb.', 1);
