-- ============================================================================
-- Admin User Seed Data
-- ============================================================================
-- Creates default admin user for development/testing
-- IMPORTANT: Change the password in production!
-- ============================================================================

USE ianntest_boxingday;

-- Insert default admin user
-- Username: admin
-- Password: Admin123!
-- Note: This is a bcrypt hash of "Admin123!" - CHANGE THIS IN PRODUCTION!
INSERT INTO admin_users (username, password_hash, role, is_active) VALUES
('admin', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYIeWEHaSuu', 'admin', TRUE)
ON DUPLICATE KEY UPDATE
    password_hash = VALUES(password_hash),
    role = VALUES(role),
    is_active = VALUES(is_active);

-- Optional: Create a moderator user
-- Username: moderator
-- Password: Mod123!
INSERT INTO admin_users (username, password_hash, role, is_active) VALUES
('moderator', '$2b$12$8K1p/a0dL6AH/IU1Oe2OHuZRwNQ5H5MKET1s1SgUv5cJMQweUm/S6', 'moderator', TRUE)
ON DUPLICATE KEY UPDATE
    password_hash = VALUES(password_hash),
    role = VALUES(role),
    is_active = VALUES(is_active);

-- ============================================================================
-- Password Generation Reference
-- ============================================================================
-- To generate new password hashes in PHP:
-- 
-- <?php
-- echo password_hash('YourPasswordHere', PASSWORD_BCRYPT, ['cost' => 12]);
-- ?>
-- 
-- Or use online bcrypt generators (for development only!)
-- ============================================================================