-- =====================================================
-- VIRUS - ADVANCE MULTY FIND PORTAL
-- Domain: thepanonline.com
-- Server: 94.136.186.140
-- =====================================================


-- NOTE: Database is already created via cPanel as `thepanonline_find`
-- Just select it and import this SQL file
USE `thepanonline_find`;

-- =====================================================
-- 1. ADMIN USERS
-- =====================================================
CREATE TABLE `admin_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `mobile` varchar(15) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `role` enum('superadmin','admin','operator') DEFAULT 'admin',
  `status` enum('active','inactive') DEFAULT 'active',
  `last_login` datetime DEFAULT NULL,
  `last_ip` varchar(45) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Default admin (password: admin@123)
INSERT INTO `admin_users` (`name`, `email`, `mobile`, `password`, `role`) VALUES
('Super Admin', 'admin@thepanonline.com', '9999999999', '$2b$10$A4bTKxv3A9wOlGruecE7fOIxnDV3RuHJR0JfDJKdXJES5SM5NOOmC', 'superadmin');

-- =====================================================
-- 2. PARTNERS (Your Users - Tier 3)
-- =====================================================
CREATE TABLE `partners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `password` varchar(255) NOT NULL,
  `company` varchar(150) DEFAULT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `pincode` varchar(10) DEFAULT NULL,
  `api_key` varchar(64) NOT NULL,
  `api_status` enum('active','inactive') DEFAULT 'active',
  `balance` decimal(12,2) DEFAULT 0.00,
  `min_balance` decimal(10,2) DEFAULT 50.00,
  `status` enum('active','inactive','suspended','pending') DEFAULT 'active',
  `email_verified` tinyint(1) DEFAULT 0,
  `mobile_verified` tinyint(1) DEFAULT 0,
  `telegram_chat_id` varchar(50) DEFAULT NULL,
  `notify_telegram` tinyint(1) DEFAULT 0,
  `notify_email` tinyint(1) DEFAULT 1,
  `last_login` datetime DEFAULT NULL,
  `last_ip` varchar(45) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `api_key` (`api_key`),
  KEY `mobile` (`mobile`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 3. SERVICES (Multi-service ready)
-- =====================================================
CREATE TABLE `services` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `parent_cost` decimal(10,2) NOT NULL DEFAULT 35.00,
  `parent_penalty` decimal(10,2) DEFAULT 3.00,
  `default_user_rate` decimal(10,2) NOT NULL DEFAULT 50.00,
  `parent_api_endpoint` varchar(255) DEFAULT NULL,
  `parent_status_endpoint` varchar(255) DEFAULT NULL,
  `webhook_endpoint` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `icon` varchar(50) DEFAULT 'fa-id-card',
  `sort_order` int(5) DEFAULT 0,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `services` (`code`, `name`, `description`, `parent_cost`, `parent_penalty`, `default_user_rate`, `parent_api_endpoint`, `parent_status_endpoint`, `webhook_endpoint`, `status`, `icon`, `sort_order`) VALUES
('PAN_FIND', 'PAN Find (Aadhaar to PAN)', 'Find PAN number using Aadhaar', 35.00, 3.00, 50.00, 'https://find.vlefastpan.in/api/submit.php', 'https://find.vlefastpan.in/api/status.php', '/api/parent_webhook.php', 'active', 'fa-id-card', 1),
('AADHAAR_VERIFY', 'Aadhaar Verification', 'Verify Aadhaar number', 5.00, 0.00, 10.00, '', '', '', 'inactive', 'fa-check-circle', 2),
('VOTER_FIND', 'Voter ID Find', 'Find Voter ID details', 15.00, 2.00, 25.00, '', '', '', 'inactive', 'fa-vote-yea', 3),
('DL_FIND', 'Driving License Find', 'Find DL details', 20.00, 2.00, 35.00, '', '', '', 'inactive', 'fa-id-badge', 4);

-- =====================================================
-- 4. PARTNER RATES (Per-user custom rate)
-- =====================================================
CREATE TABLE `partner_rates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `rate` decimal(10,2) NOT NULL,
  `refund_policy` enum('full','penalty_pass','custom') DEFAULT 'full',
  `custom_refund_amount` decimal(10,2) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partner_service` (`partner_id`,`service_id`),
  KEY `service_id` (`service_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 5. PARTNER WEBHOOKS (Callback URLs)
-- =====================================================
CREATE TABLE `partner_webhooks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `webhook_url` varchar(500) NOT NULL,
  `secret_key` varchar(64) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `last_response` text DEFAULT NULL,
  `last_status_code` int(5) DEFAULT NULL,
  `total_sent` int(11) DEFAULT 0,
  `total_failed` int(11) DEFAULT 0,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partner_id` (`partner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 6. PAN JOBS (Main jobs table)
-- =====================================================
CREATE TABLE `pan_jobs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(50) NOT NULL,
  `partner_id` int(11) NOT NULL,
  `service_id` int(11) DEFAULT 1,
  `service_code` varchar(50) DEFAULT 'PAN_FIND',
  `name` varchar(150) NOT NULL,
  `aadhaar` varchar(12) NOT NULL,
  `dob` varchar(20) DEFAULT NULL,
  `father_name` varchar(150) DEFAULT NULL,
  `pincode` varchar(10) DEFAULT NULL,
  `external_job_id` varchar(50) DEFAULT NULL,
  `external_status` varchar(30) DEFAULT NULL,
  `external_response` text DEFAULT NULL,
  `pan_number` varchar(15) DEFAULT NULL,
  `status` enum('pending','processing','completed','rejected','refunded') DEFAULT 'pending',
  `remarks` text DEFAULT NULL,
  `user_charged` decimal(10,2) NOT NULL,
  `parent_cost` decimal(10,2) NOT NULL,
  `profit` decimal(10,2) DEFAULT 0.00,
  `refund_to_user` decimal(10,2) DEFAULT 0.00,
  `refund_from_parent` decimal(10,2) DEFAULT 0.00,
  `refunded_at` datetime DEFAULT NULL,
  `webhook_sent` tinyint(1) DEFAULT 0,
  `webhook_attempts` int(5) DEFAULT 0,
  `webhook_last_response` text DEFAULT NULL,
  `submitted_via` enum('api','portal') DEFAULT 'api',
  `ip_address` varchar(45) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_id` (`order_id`),
  KEY `partner_id` (`partner_id`),
  KEY `aadhaar` (`aadhaar`),
  KEY `status` (`status`),
  KEY `external_job_id` (`external_job_id`),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 7. WALLET TRANSACTIONS
-- =====================================================
CREATE TABLE `wallet_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `order_id` varchar(50) NOT NULL,
  `job_id` int(11) DEFAULT NULL,
  `service` varchar(50) DEFAULT 'WALLET',
  `type` enum('credit','debit') NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `old_balance` decimal(12,2) NOT NULL,
  `new_balance` decimal(12,2) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `ref_id` varchar(100) DEFAULT NULL,
  `txn_id` varchar(100) DEFAULT NULL,
  `gateway` varchar(50) DEFAULT NULL,
  `status` enum('success','pending','process','failed','refund') DEFAULT 'success',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `partner_id` (`partner_id`),
  KEY `order_id` (`order_id`),
  KEY `status` (`status`),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 8. ONLINE PAYMENT ORDERS (TheMonkeyPay)
-- =====================================================
CREATE TABLE `online_payment_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(50) NOT NULL,
  `partner_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `gateway` varchar(50) DEFAULT 'monkeypay_1',
  `gateway_order_id` varchar(100) DEFAULT NULL,
  `qr_code` longtext DEFAULT NULL,
  `upi_intent` varchar(500) DEFAULT NULL,
  `utr` varchar(100) DEFAULT NULL,
  `status` enum('pending','processing','success','failed','cancelled','expired') DEFAULT 'pending',
  `gateway_response` text DEFAULT NULL,
  `verified_at` datetime DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_id` (`order_id`),
  KEY `partner_id` (`partner_id`),
  KEY `status` (`status`),
  KEY `utr` (`utr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 9. OFFLINE RECHARGE REQUESTS
-- =====================================================
CREATE TABLE `offline_recharge_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `utr` varchar(100) NOT NULL,
  `payment_method` varchar(50) DEFAULT 'Bank Transfer',
  `payment_date` datetime DEFAULT NULL,
  `screenshot` varchar(255) DEFAULT NULL,
  `user_remarks` text DEFAULT NULL,
  `admin_remarks` text DEFAULT NULL,
  `verified_amount` decimal(10,2) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `processed_by` int(11) DEFAULT NULL,
  `processed_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `utr` (`utr`),
  KEY `partner_id` (`partner_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 10. PARENT API CONFIG (find.vlefastpan.in)
-- =====================================================
CREATE TABLE `parent_api_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_code` varchar(50) NOT NULL,
  `api_url` varchar(255) NOT NULL,
  `status_url` varchar(255) NOT NULL,
  `api_key` varchar(255) NOT NULL,
  `parent_cost` decimal(10,2) NOT NULL DEFAULT 35.00,
  `parent_penalty` decimal(10,2) DEFAULT 3.00,
  `webhook_secret` varchar(100) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `service_code` (`service_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `parent_api_config` (`service_code`, `api_url`, `status_url`, `api_key`, `parent_cost`, `parent_penalty`, `webhook_secret`) VALUES
('PAN_FIND', 'https://find.vlefastpan.in/api/submit.php', 'https://find.vlefastpan.in/api/status.php', '8007add19c66128fb181d15f2f8ba4ec', 35.00, 3.00, 'WEBHOOK_SECRET_CHANGE_ME');

-- =====================================================
-- 11. SYSTEM SETTINGS (All ON/OFF toggles)
-- =====================================================
CREATE TABLE `system_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `setting_type` enum('text','number','boolean','json','password') DEFAULT 'text',
  `category` varchar(50) DEFAULT 'general',
  `description` varchar(255) DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_key` (`setting_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `system_settings` (`setting_key`, `setting_value`, `setting_type`, `category`, `description`) VALUES
('site_name', 'VIRUS - ADVANCE MULTY FIND PORTAL', 'text', 'general', 'Site brand name'),
('site_brand_short', 'VIRUS PORTAL', 'text', 'general', 'Short brand'),
('site_domain', 'thepanonline.com', 'text', 'general', 'Primary domain'),
('site_email', 'admin@thepanonline.com', 'text', 'general', 'Admin email'),
('site_mobile', '9999999999', 'text', 'general', 'Support mobile'),
('site_color', 'indigo', 'text', 'general', 'Theme color'),
('maintenance_mode', '0', 'boolean', 'general', 'Maintenance mode'),
('registration_open', '1', 'boolean', 'general', 'Allow new registrations'),
('public_status_check', '1', 'boolean', 'general', 'Public status check page'),
('auto_sync_parent', '1', 'boolean', 'parent_api', 'Auto sync with parent API'),
('parent_webhook_enabled', '1', 'boolean', 'parent_api', 'Enable parent webhook'),
('cron_fallback_enabled', '1', 'boolean', 'parent_api', 'Enable cron fallback sync'),
('cron_interval_minutes', '2', 'number', 'parent_api', 'Cron interval in minutes'),
('auto_refund_enabled', '1', 'boolean', 'refund', 'Auto refund on rejection'),
('default_refund_policy', 'full', 'text', 'refund', 'full / penalty_pass / custom'),
('webhook_to_users', '1', 'boolean', 'webhook', 'Send webhooks to users'),
('webhook_retry_attempts', '3', 'number', 'webhook', 'Webhook retry count'),
('telegram_notify', '0', 'boolean', 'notification', 'Telegram notifications'),
('telegram_bot_token', '', 'password', 'notification', 'Telegram bot token'),
('email_notify', '1', 'boolean', 'notification', 'Email notifications'),
('low_balance_alert', '100', 'number', 'notification', 'Low balance threshold'),
('bulk_upload_enabled', '1', 'boolean', 'features', 'Enable bulk upload'),
('bulk_upload_limit', '100', 'number', 'features', 'Max records per bulk'),
('api_rate_limit_per_min', '60', 'number', 'api', 'API rate limit per minute'),
('duplicate_aadhaar_check', '0', 'boolean', 'features', 'Block duplicate Aadhaar in 24hrs'),
('monkeypay_gateway_url', 'themonkeypay.in', 'text', 'payment', 'TheMonkeyPay URL'),
('monkeypay_token_1', '7cddce13235f699b19bc2d37e21645e3', 'password', 'payment', 'Primary token'),
('monkeypay_token_2', '8ee985fc719e23b27d9d7aba1aebb0de19fc8e49edc20b3d', 'password', 'payment', 'Backup token'),
('monkeypay_token_3', '', 'password', 'payment', 'Token 3'),
('monkeypay_token_4', '', 'password', 'payment', 'Token 4'),
('monkeypay_username', '6200969381', 'text', 'payment', 'MonkeyPay username'),
('min_recharge_amount', '50', 'number', 'payment', 'Minimum recharge'),
('max_recharge_amount', '50000', 'number', 'payment', 'Maximum recharge'),
('bank_name', 'HDFC Bank', 'text', 'payment', 'Bank name for offline'),
('bank_account', 'XXXXXX5678', 'text', 'payment', 'Bank account'),
('bank_ifsc', 'HDFC0001234', 'text', 'payment', 'Bank IFSC'),
('bank_holder', 'VIRUS PORTAL', 'text', 'payment', 'Account holder name'),
('smtp_host', 'smtp-relay.brevo.com', 'text', 'email', 'SMTP host'),
('smtp_port', '587', 'number', 'email', 'SMTP port'),
('smtp_username', '', 'text', 'email', 'SMTP username'),
('smtp_password', '', 'password', 'email', 'SMTP password'),
('smtp_from', 'noreply@thepanonline.com', 'text', 'email', 'From email');

-- =====================================================
-- 12. API CALL LOGS
-- =====================================================
CREATE TABLE `api_call_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) DEFAULT NULL,
  `endpoint` varchar(100) NOT NULL,
  `method` varchar(10) DEFAULT 'POST',
  `request_data` text DEFAULT NULL,
  `response_data` text DEFAULT NULL,
  `response_code` int(5) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `execution_time` decimal(10,4) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `partner_id` (`partner_id`),
  KEY `endpoint` (`endpoint`),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 13. WEBHOOK LOGS
-- =====================================================
CREATE TABLE `webhook_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `job_id` int(11) DEFAULT NULL,
  `webhook_url` varchar(500) NOT NULL,
  `payload` text DEFAULT NULL,
  `response` text DEFAULT NULL,
  `response_code` int(5) DEFAULT NULL,
  `attempt_number` int(3) DEFAULT 1,
  `status` enum('success','failed') DEFAULT 'failed',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `partner_id` (`partner_id`),
  KEY `job_id` (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 14. CRON LOGS
-- =====================================================
CREATE TABLE `cron_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cron_name` varchar(50) NOT NULL,
  `status` enum('success','failed','running') DEFAULT 'running',
  `records_processed` int(11) DEFAULT 0,
  `execution_time` decimal(10,4) DEFAULT NULL,
  `message` text DEFAULT NULL,
  `started_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `completed_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cron_name` (`cron_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 15. ACTIVITY LOGS (Audit trail)
-- =====================================================
CREATE TABLE `activity_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_type` enum('partner','admin') NOT NULL,
  `user_id` int(11) NOT NULL,
  `action` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_type_id` (`user_type`,`user_id`),
  KEY `action` (`action`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 16. LOGIN LOGS
-- =====================================================
CREATE TABLE `login_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_type` enum('partner','admin') NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `status` enum('success','failed') NOT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_type_id` (`user_type`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- 17. PARTNER IP WHITELIST
-- =====================================================
CREATE TABLE `partner_ip_whitelist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partner_id` int(11) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `label` varchar(100) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partner_ip` (`partner_id`,`ip_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- =====================================================
-- SAMPLE PARTNER (for testing)
-- Password: test@123
-- =====================================================
INSERT INTO `partners` (`name`, `email`, `mobile`, `password`, `company`, `api_key`, `balance`, `status`) VALUES
('Demo Partner', 'demo@thepanonline.com', '9876543210', '$2b$10$yf8LsUW90A.huy9wIdcovexD3ECtFCDkQZngYNQqhugBzNdWwFOK2', 'Demo Company', MD5(CONCAT('demo', UNIX_TIMESTAMP())), 1000.00, 'active');

INSERT INTO `partner_rates` (`partner_id`, `service_id`, `rate`, `refund_policy`) VALUES
(1, 1, 50.00, 'full'),
(1, 2, 10.00, 'full'),
(1, 3, 25.00, 'full'),
(1, 4, 35.00, 'full');

-- =====================================================
-- END OF DATABASE SCHEMA
-- =====================================================
