-- SQL to create a user_admin account
-- This role can only confirm payments (no access to reports, settings, users, etc.)

-- Create a user_admin account (change the password hash as needed)
-- Default password: admin123 (you should change this!)
INSERT INTO users (username, email, password, full_name, phone, role, status, created_at)
VALUES (
    'payment_admin',
    'payment_admin@example.com',
    '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -- password: password
    'Payment Administrator',
    '0700000000',
    'user_admin',
    'approved',
    NOW()
);

-- Alternative: Update an existing user to user_admin role
-- UPDATE users SET role = 'user_admin' WHERE username = 'your_username';

-- Note: The user_admin role has the following restrictions:
-- 1. Can only access the Payments page in admin panel
-- 2. Cannot see financial reports
-- 3. Cannot manage users, lands, settings, or activity logs
-- 4. Their main function is to confirm that payments have been made
