USE nirvaan;

INSERT INTO settings (skey,sval,stype,sgroup,label) VALUES
 ('payout_hold_days','7','int','payouts','Days earnings are held before payout'),
 ('tds_pct','10','int','payouts','TDS percent withheld on doctor payouts')
ON DUPLICATE KEY UPDATE sval = VALUES(sval);

-- Test accounts. Password for both: Nirvaan@2026 — change before go-live.
INSERT INTO admin_users (full_name,email,password_hash,role) VALUES
 ('Platform Admin','admin@nirvaan.in',
  '$2y$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyDPHSKuHFRy8m','superadmin')
ON DUPLICATE KEY UPDATE email = VALUES(email);

INSERT INTO doctors
 (public_slug,display_name,legal_name,email,mobile_e164,password_hash,gender,tier,
  qualification,specialities,nmc_reg_no,nmc_state_council,reg_verified,reg_verified_at,
  experience_years,languages,city,state,status,presence,
  rate_chat_paise,rate_call_paise,accepts_chat,accepts_call,commission_pct,onboarded_at)
VALUES
 ('dr-a-sharma','Dr. A. Sharma','Anand Sharma','a.sharma@example.com','+919820000001',
  '$2y$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyDPHSKuHFRy8m','male','rmp',
  'MBBS, MD (Psychiatry)','mens-sexual-health,sexual-anxiety','MMC-2011-44821','Maharashtra Medical Council',
  1,NOW(),12,'en,hi,mr','Mumbai','Maharashtra','approved','offline',
  1500,2500,1,1,30.00,NOW()),
 ('dr-r-nair','Dr. R. Nair','Radhika Nair','r.nair@example.com','+919820000002',
  '$2y$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyDPHSKuHFRy8m','female','rmp',
  'MBBS, DGO','womens-sexual-health,reproductive-health','KMC-2014-19077','Kerala Medical Council',
  1,NOW(),9,'en,hi,ml','Bengaluru','Karnataka','approved','offline',
  1800,2800,1,1,30.00,NOW())
ON DUPLICATE KEY UPDATE email = VALUES(email);
