<?php
// config.php - Configuration file (keep credentials secure)
// If this file doesn't exist, db.php will use defaults

return [
    'database' => [
        'host' => 'localhost',
        'dbname' => 'spartanm_systemdb',
        'username' => 'spartanm_systemdb',
        'password' => '.CA}RN-yF8yUd.WK',
        'charset' => 'utf8mb4'
    ],
    'security' => [
        'max_login_attempts' => 5,
        'lockout_duration' => 900, // 15 minutes in seconds
        'session_lifetime' => 31536000 // 1 year in seconds
    ],
    'features' => [
        'low_stock_threshold' => 5, // Alert when stock <= this number
        'items_per_page' => 50, // Pagination default
        'enable_export' => true
    ],
    'backup_sync' => [
        // Keep this value the same as backup server restore endpoint.
        'secret_key' => 'KDYOnuNhBNJO5SBew3QRFCK75m9bQd3wCXik8S81CfPtXoacLU',
        'target_url' => 'https://systembackup.spartanmnc.com/restore_from_sync.php',
        // Required only for web cron mode: sync_to_backup.php?cron=1&cron_key=...
        // Set a long random value before production usage.
        'cron_key' => 'f2f_cron_v1_Q9mT7xN2pL4rK8wH3sD6zB1cV5yJ0uF',
        // On backup server, set this to source server sync URL that can run unattended.
        // Example: https://SOURCE_DOMAIN/sync_to_backup.php?cron=1&cron_key=YOUR_SOURCE_CRON_KEY
        'source_trigger_url' => 'https://https://system.fon2fix.com.my/sync_to_backup.php?cron=1&cron_key=f2f_cron_v1_Q9mT7xN2pL4rK8wH3sD6zB1cV5yJ0uF'
    ]
];
?>
