-- Create first SYSTEM_ADMIN user
-- Password: Admin@123 (BCrypt hashed)

INSERT INTO saas_db.users (
    email, 
    password, 
    user_type, 
    role, 
    tenant_id, 
    status, 
    first_name, 
    last_name,
    created_at,
    updated_at
) VALUES (
    'superadmin@system.com',
    '$2a$10$kZ8QhGqLxGxQEKYJ0ZRHAuWwT5PqH/TfB2l5jTZhkTJX8u8YvZDG2',  -- Admin@123
    'SYSTEM_ADMIN',
    'SUPER_ADMIN',
    NULL,
    'ACTIVE',
    'Super',
    'Admin',
    NOW(),
    NOW()
);

-- Verify the user was created
SELECT id, email, user_type, role, first_name, last_name, status, created_at 
FROM saas_db.users 
WHERE email = 'superadmin@system.com';
