-- Default settings
INSERT INTO settings (`key`,`value`,`type`) VALUES
('auth_mode','token','string'),
('token_expiry_hours','72','int'),
('token_max_attempt','2','int'),
('idle_timeout_minutes','10','int'),
('resume_policy','resume_allowed','string')
ON DUPLICATE KEY UPDATE value=VALUES(value), type=VALUES(type);

-- Demo token (DEMO_TOKEN)
INSERT INTO candidate_tokens (token, candidate_name, campaign_name, expires_at)
VALUES ('DEMO_TOKEN', 'Andri (Demo)', 'Rekrutmen Demo', DATE_ADD(NOW(), INTERVAL 72 HOUR))
ON DUPLICATE KEY UPDATE expires_at=VALUES(expires_at);
