-- Wijzigen naar de database voor shared hosting met jouw eigen gegevens
USE ID201584_tiggo;

-- Tabellen voor shared hosting (prefix: smoelboek_)

CREATE TABLE IF NOT EXISTS smoelboek_admins (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(100) NOT NULL,
    last_name VARCHAR(100) NOT NULL,
    email VARCHAR(150) NOT NULL UNIQUE,
    password_hash VARCHAR(255) NOT NULL,
    is_active TINYINT(1) NOT NULL DEFAULT 1,
    reset_token_hash VARCHAR(255) DEFAULT NULL,
    reset_expires_at DATETIME DEFAULT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS smoelboek_colleagues (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(100) NOT NULL,
    last_name VARCHAR(100) NOT NULL,
    city VARCHAR(120) NOT NULL,
    gender ENUM('Man','Vrouw','X') NOT NULL DEFAULT 'X',
    hobbies TEXT,
    photo VARCHAR(255) DEFAULT NULL,
    is_active TINYINT(1) NOT NULL DEFAULT 1,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

-- Geef een admin in met jouw eigen gegevens
INSERT INTO smoelboek_admins (first_name, last_name, email, password_hash)
VALUES ('Tiggo', 'Vinnis', 'tiggo.vinnis@outlook.com', '$2y$10$EhCbuZ7SU8x0R5EBrUvwcOfK3SscGQMyZfeGaf6MPSxfu380ZI2ee');