-- ========================================================
-- e-Consular Services Portal MySQL Database Dump
-- Ready for cPanel phpMyAdmin Import
-- ========================================================

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- --------------------------------------------------------
-- Table structure for `applications`
-- --------------------------------------------------------
DROP TABLE IF EXISTS `applications`;
CREATE TABLE `applications` (
  `id` varchar(64) NOT NULL,
  `tracking_id` varchar(64) NOT NULL,
  `service_type` varchar(64) NOT NULL,
  `sub_type` varchar(64) DEFAULT NULL,
  `status` varchar(64) NOT NULL DEFAULT 'SUBMITTED',
  `full_name` varchar(255) NOT NULL,
  `passport_number` varchar(64) NOT NULL,
  `ref_number` varchar(128) DEFAULT NULL,
  `security_code` varchar(64) NOT NULL,
  `vtoken` varchar(64) DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `father_name` varchar(255) DEFAULT NULL,
  `mother_name` varchar(255) DEFAULT NULL,
  `issue_date` varchar(64) DEFAULT NULL,
  `expiry_date` varchar(64) DEFAULT NULL,
  `nationality` varchar(64) DEFAULT 'BANGLADESHI',
  `signatory_name` varchar(255) DEFAULT 'Falgunee Bagchi',
  `signatory_designation` varchar(255) DEFAULT 'First Secretary (Political)',
  `letter_snapshot` longtext DEFAULT NULL,
  `corrections` longtext DEFAULT NULL,
  `family_members` longtext DEFAULT NULL,
  `driving_license_details` longtext DEFAULT NULL,
  `attestation_details` longtext DEFAULT NULL,
  `service_data` longtext DEFAULT NULL,
  `sub_variant` varchar(64) DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `tracking_id` (`tracking_id`),
  KEY `idx_tracking_id` (`tracking_id`),
  KEY `idx_passport_number` (`passport_number`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for `applications`
INSERT INTO `applications` (`id`, `tracking_id`, `service_type`, `sub_type`, `status`, `full_name`, `passport_number`, `ref_number`, `security_code`, `vtoken`, `approved_at`, `dob`, `father_name`, `mother_name`, `issue_date`, `expiry_date`, `nationality`, `signatory_name`, `signatory_designation`, `letter_snapshot`, `corrections`, `family_members`, `driving_license_details`, `attestation_details`, `service_data`, `sub_variant`, `rejection_reason`, `created_at`, `updated_at`) VALUES ('53d5a4e9-2338-4b7e-b598-af71bd00257c', 'ECN-20261031-U1EFJ62J', 'SINGAPORE_TRAVEL', NULL, 'APPROVED', 'MOHAMMAD RAHMAN', 'A99887766', 'Ref. No.19.01.6001.403.83.234', 'SEC-8350-A22C', 'b964203ff462747b', '2026-10-31 06:24:54', '1994-08-19 18:00:00', 'MD AZIZUR RAHMAN', 'RAHIMA KHATUN', '2024-01-10', '2034-01-09', 'BANGLADESHI', 'Falgunee Bagchi', 'First Secretary (Political)', '{\"serviceId\":\"SINGAPORE_TRAVEL\",\"variantKey\":null,\"templateVersion\":2,\"blocks\":[{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This is to certify that \"},{\"text\":\"MOHAMMAD RAHMAN\",\"bold\":true},{\"text\":\", holder of Bangladesh Passport No. \"},{\"text\":\"A99887766\",\"bold\":true},{\"text\":\", is a Bangladeshi national.\"}]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This certificate is issued at the request of the applicant for submission in connection with his/her travel to Singapore. It is issued solely for this purpose and without any legal liability whatsoever on the part of the High Commission of the People\'s Republic of Bangladesh in Malaysia.\"}]}],\"renderedAt\":\"2026-10-31T06:24:54.349Z\"}', 'null', 'null', 'null', 'null', 'null', NULL, NULL, '2026-10-31 06:24:54', '2026-10-31 06:24:54');
INSERT INTO `applications` (`id`, `tracking_id`, `service_type`, `sub_type`, `status`, `full_name`, `passport_number`, `ref_number`, `security_code`, `vtoken`, `approved_at`, `dob`, `father_name`, `mother_name`, `issue_date`, `expiry_date`, `nationality`, `signatory_name`, `signatory_designation`, `letter_snapshot`, `corrections`, `family_members`, `driving_license_details`, `attestation_details`, `service_data`, `sub_variant`, `rejection_reason`, `created_at`, `updated_at`) VALUES ('a9de7994-f335-40a9-b437-656dba010e6e', 'ECN-20261026-241KQQZT38', 'SINGAPORE_TRAVEL', NULL, 'DELIVERED', 'MOHAMMAD BAITUL MOKADDES', 'A20515414', 'Ref. No.19.01.6001.403.83.222', 'SEC-64D2-7B36', '64d27b36a42dafa5', '2026-10-25 22:10:11', '1995-12-29 18:00:00', 'DALIL AHAMED', 'REJIA BEGUM', '2025-10-12', '2035-10-11', 'BANGLADESHI', 'Falgunee Bagchi', 'First Secretary (Political)', '{\"serviceId\":\"SINGAPORE_TRAVEL\",\"variantKey\":null,\"templateVersion\":2,\"blocks\":[{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This is to certify that \"},{\"text\":\"MOHAMMAD BAITUL MOKADDES\",\"bold\":true},{\"text\":\", holder of Bangladesh Passport No. \"},{\"text\":\"A20515414\",\"bold\":true},{\"text\":\", is a Bangladeshi national.\"}]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This certificate is issued at the request of the applicant for submission in connection with his/her travel to Singapore. It is issued solely for this purpose and without any legal liability whatsoever on the part of the High Commission of the People\'s Republic of Bangladesh in Malaysia.\"}]}],\"renderedAt\":\"2026-10-26T04:10:11.986Z\"}', 'null', 'null', 'null', 'null', 'null', NULL, NULL, '2026-10-31 06:00:14', '2026-10-31 06:00:14');
INSERT INTO `applications` (`id`, `tracking_id`, `service_type`, `sub_type`, `status`, `full_name`, `passport_number`, `ref_number`, `security_code`, `vtoken`, `approved_at`, `dob`, `father_name`, `mother_name`, `issue_date`, `expiry_date`, `nationality`, `signatory_name`, `signatory_designation`, `letter_snapshot`, `corrections`, `family_members`, `driving_license_details`, `attestation_details`, `service_data`, `sub_variant`, `rejection_reason`, `created_at`, `updated_at`) VALUES ('d1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'ECN-20260922-9JJ1KZ1G6T', 'SAME_PERSON', 'PASSPORT_CORRECTION', 'DELIVERED', 'Md Main Mondal', 'A22829773', 'Ref. No.19.01.6001.403.79.077', 'SEC-31CD-D313', '31cdd313fe13d4e3', '2026-09-22 01:33:27', '1990-04-19 18:00:00', 'Md Mayher Ali Mondal', 'Mst Shahara Begum', '', '2036-07-05', 'BANGLADESHI', 'Falgunee Bagchi', 'First Secretary (Political)', '{\"serviceId\":\"SAME_PERSON\",\"variantKey\":null,\"templateVersion\":6,\"blocks\":[{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This is to certify that, based on the documents submitted by the applicant, the personal particulars appearing in the following passports of \"},{\"text\":\"Md Main Mondal\",\"bold\":true},{\"text\":\", a Bangladeshi national, have been duly verified and it has been confirmed that both passports belong to the same individual: \"}]},{\"type\":\"table\",\"layout\":\"DOCUMENT_COMPARISON\",\"headers\":[\"Sl. No.\",\"Type of document\",\"Particular\'s\",\"Remarks\"],\"rows\":[[{\"lines\":[\"01.\"]},{\"lines\":[\"Passport No.\",\"A22829773 (New)\"]},{\"lines\":[\"Md Main Mondal\",\"Father\'s Name: Md Mayher Ali Mondal\",\"Mother\'s Name: Mst Shahara Begum\"]},{\"rowSpan\":2,\"lines\":[\"All passports belong to the same person\"]}],[{\"lines\":[\"02.\"]},{\"lines\":[\"Passport No.\",\"EK0404216 (Old)\"]},{\"lines\":[\"Main Mondal\",\"Father\'s Name: Mayher Ali Mondal\",\"Mother\'s Name: Shahara Begum\"]}]]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"It is further certified that the competent authority in Bangladesh corrected the personal particulars of the passport holder while issuing the new passport in order to rectify inadvertent errors in the previous passport.\"}]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This certificate is issued at the request of the applicant for submission to the Malaysian Immigration authorities, without any legal liability whatsoever on the part of the High Commission of the People\'s Republic of Bangladesh in Malaysia.\"}]}],\"renderedAt\":\"2026-09-22T07:33:28.045Z\"}', '{\"selectedFields\":[\"Name Correction\",\"Father\'s Name\",\"Mother\'s Name\"],\"customCorrections\":[],\"oldPassport\":{\"passportNumber\":\"EK0404216\",\"fullName\":\"Main Mondal\",\"dob\":\"1990-04-20\",\"fatherName\":\"Mayher Ali Mondal\",\"motherName\":\"Shahara Begum\",\"issueDate\":\"2027-03-27\",\"expiryDate\":\"\",\"nationality\":\"BANGLADESHI\"},\"newPassport\":{\"passportNumber\":\"A22829773\",\"fullName\":\"Md Main Mondal\",\"dob\":\"1990-04-20\",\"fatherName\":\"Md Mayher Ali Mondal\",\"motherName\":\"Mst Shahara Begum\",\"issueDate\":\"\",\"expiryDate\":\"2036-07-05\",\"nationality\":\"BANGLADESHI\"}}', 'null', 'null', 'null', 'null', NULL, NULL, '2026-10-30 22:23:12', '2026-10-31 05:47:21');
INSERT INTO `applications` (`id`, `tracking_id`, `service_type`, `sub_type`, `status`, `full_name`, `passport_number`, `ref_number`, `security_code`, `vtoken`, `approved_at`, `dob`, `father_name`, `mother_name`, `issue_date`, `expiry_date`, `nationality`, `signatory_name`, `signatory_designation`, `letter_snapshot`, `corrections`, `family_members`, `driving_license_details`, `attestation_details`, `service_data`, `sub_variant`, `rejection_reason`, `created_at`, `updated_at`) VALUES ('e4939375-8251-4ff2-9eb8-4751da8926bf', 'ECN-20261031-QLEZKNDF', 'SAME_PERSON', 'PASSPORT_CORRECTION', 'APPROVED', 'MD ARIFUL ISLAM', 'A11223344', 'Ref. No.19.01.6001.403.79.632', 'SEC-142C-55DE', 'f6bd7ae0943c8389', '2026-10-31 06:24:54', '1992-05-14 18:00:00', 'ABDUL JALIL', 'SURAIYA BEGUM', '', '', 'BANGLADESHI', 'Falgunee Bagchi', 'First Secretary (Political)', '{\"serviceId\":\"SAME_PERSON\",\"variantKey\":null,\"templateVersion\":6,\"blocks\":[{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This is to certify that, based on the documents submitted by the applicant, the personal particulars appearing in the following passports of \"},{\"text\":\"MD ARIFUL ISLAM\",\"bold\":true},{\"text\":\", a Bangladeshi national, have been duly verified and it has been confirmed that both passports belong to the same individual: \"}]},{\"type\":\"table\",\"layout\":\"DOCUMENT_COMPARISON\",\"headers\":[\"Sl. No.\",\"Type of document\",\"Particular\'s\",\"Remarks\"],\"rows\":[[{\"lines\":[\"01.\"]},{\"lines\":[\"Passport No.\",\"A11223344 (New)\"]},{\"lines\":[\"MD ARIFUL ISLAM\",\"Father\'s Name: ABDUL JALIL\",\"Mother\'s Name: SURAIYA BEGUM\"]},{\"rowSpan\":2,\"lines\":[\"All passports belong to the same person\"]}],[{\"lines\":[\"02.\"]},{\"lines\":[\"Passport No.\",\"B55667788 (Old)\"]},{\"lines\":[\"MD ARIFUL ISLAM\",\"Father\'s Name: ABDUL JALIL\",\"Mother\'s Name: SURAIYA BEGUM\"]}]]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"It is further certified that the competent authority in Bangladesh corrected the personal particulars of the passport holder while issuing the new passport in order to rectify inadvertent errors in the previous passport.\"}]},{\"type\":\"paragraph\",\"runs\":[{\"text\":\"This certificate is issued at the request of the applicant for submission to the Malaysian Immigration authorities, without any legal liability whatsoever on the part of the High Commission of the People\'s Republic of Bangladesh in Malaysia.\"}]}],\"renderedAt\":\"2026-10-31T06:24:54.237Z\"}', '{\"selectedFields\":[\"Name Correction\",\"Father\'s Name\",\"Mother\'s Name\"],\"customCorrections\":[],\"oldPassport\":{\"passportNumber\":\"B55667788\",\"fullName\":\"MD ARIFUL ISLAM\",\"dob\":\"1992-05-15\",\"fatherName\":\"ABDUL JALIL\",\"motherName\":\"SURAIYA BEGUM\",\"issueDate\":\"\",\"expiryDate\":\"\",\"nationality\":\"BANGLADESHI\"},\"newPassport\":{\"passportNumber\":\"A11223344\",\"fullName\":\"MD ARIFUL ISLAM\",\"dob\":\"1992-05-15\",\"fatherName\":\"ABDUL JALIL\",\"motherName\":\"SURAIYA BEGUM\",\"issueDate\":\"\",\"expiryDate\":\"\",\"nationality\":\"BANGLADESHI\"}}', 'null', 'null', 'null', 'null', NULL, NULL, '2026-10-31 06:24:54', '2026-10-31 06:24:54');

-- --------------------------------------------------------
-- Table structure for `appointments`
-- --------------------------------------------------------
DROP TABLE IF EXISTS `appointments`;
CREATE TABLE `appointments` (
  `id` varchar(64) NOT NULL,
  `application_id` varchar(64) NOT NULL,
  `appointment_date` date NOT NULL,
  `time_slot` varchar(32) NOT NULL,
  `verified_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_app_id` (`application_id`),
  CONSTRAINT `fk_appointment_application` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for `appointments`
INSERT INTO `appointments` (`id`, `application_id`, `appointment_date`, `time_slot`, `verified_at`, `created_at`) VALUES ('apt-53d5a4e9-2338-4b7e-b598-af71bd00257c', '53d5a4e9-2338-4b7e-b598-af71bd00257c', '2026-10-30 18:00:00', '11:00 AM', '2026-10-31 06:24:54', '2026-10-31 06:24:54');
INSERT INTO `appointments` (`id`, `application_id`, `appointment_date`, `time_slot`, `verified_at`, `created_at`) VALUES ('apt-a9de7994-f335-40a9-b437-656dba010e6e', 'a9de7994-f335-40a9-b437-656dba010e6e', '2026-10-25 18:00:00', '11:19 AM', '2026-10-25 21:33:24', '2026-10-31 06:00:14');
INSERT INTO `appointments` (`id`, `application_id`, `appointment_date`, `time_slot`, `verified_at`, `created_at`) VALUES ('apt-d1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', '2026-09-21 18:00:00', '01:02 PM', NULL, '2026-10-30 22:23:13');
INSERT INTO `appointments` (`id`, `application_id`, `appointment_date`, `time_slot`, `verified_at`, `created_at`) VALUES ('apt-e4939375-8251-4ff2-9eb8-4751da8926bf', 'e4939375-8251-4ff2-9eb8-4751da8926bf', '2026-10-30 18:00:00', '11:00 AM', '2026-10-31 06:24:54', '2026-10-31 06:24:54');

-- --------------------------------------------------------
-- Table structure for `transactions`
-- --------------------------------------------------------
DROP TABLE IF EXISTS `transactions`;
CREATE TABLE `transactions` (
  `id` varchar(64) NOT NULL,
  `application_id` varchar(64) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `currency` varchar(10) DEFAULT 'MYR',
  `status` varchar(32) DEFAULT 'COMPLETED',
  `payment_method` varchar(64) DEFAULT 'ONLINE',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_app_tx` (`application_id`),
  CONSTRAINT `fk_transaction_application` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for `transactions`
INSERT INTO `transactions` (`id`, `application_id`, `amount`, `currency`, `status`, `payment_method`, `created_at`) VALUES ('tx-53d5a4e9-2338-4b7e-b598-af71bd00257c', '53d5a4e9-2338-4b7e-b598-af71bd00257c', '63.00', 'MYR', 'COMPLETED', 'ONLINE', '2026-10-31 06:24:54');
INSERT INTO `transactions` (`id`, `application_id`, `amount`, `currency`, `status`, `payment_method`, `created_at`) VALUES ('tx-a9de7994-f335-40a9-b437-656dba010e6e', 'a9de7994-f335-40a9-b437-656dba010e6e', '63.00', 'MYR', 'COMPLETED', 'ONLINE', '2026-10-31 06:00:14');
INSERT INTO `transactions` (`id`, `application_id`, `amount`, `currency`, `status`, `payment_method`, `created_at`) VALUES ('tx-d1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', '63.00', 'MYR', 'COMPLETED', 'ONLINE', '2026-10-30 22:23:13');
INSERT INTO `transactions` (`id`, `application_id`, `amount`, `currency`, `status`, `payment_method`, `created_at`) VALUES ('tx-e4939375-8251-4ff2-9eb8-4751da8926bf', 'e4939375-8251-4ff2-9eb8-4751da8926bf', '63.00', 'MYR', 'COMPLETED', 'ONLINE', '2026-10-31 06:24:54');

-- --------------------------------------------------------
-- Table structure for `audit_logs`
-- --------------------------------------------------------
DROP TABLE IF EXISTS `audit_logs`;
CREATE TABLE `audit_logs` (
  `id` varchar(64) NOT NULL,
  `application_id` varchar(64) NOT NULL,
  `action` varchar(64) NOT NULL,
  `notes` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_audit_app` (`application_id`,`created_at`),
  CONSTRAINT `fk_audit_application` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for `audit_logs`
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('368365c6-6543-4972-9610-e052e461a3b6', 'a9de7994-f335-40a9-b437-656dba010e6e', 'APPROVED', NULL, '2026-10-25 22:10:11');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('384e78de-a32d-41df-8f97-93dbdf38cee8', '53d5a4e9-2338-4b7e-b598-af71bd00257c', 'APPLICATION_COUNTER_INTAKE', NULL, '2026-10-31 05:24:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('38850ab5-675a-40db-92b3-4e3c878289b7', 'a9de7994-f335-40a9-b437-656dba010e6e', 'PRINTED', NULL, '2026-10-25 22:26:06');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('38cd7e09-a1c7-4ff3-a018-9e3aed6d71b3', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'APPLICATION_COUNTER_INTAKE', NULL, '2026-09-21 23:02:10');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('3c23e39b-f157-4505-9954-c788bfaf6d69', 'e4939375-8251-4ff2-9eb8-4751da8926bf', 'COUNTER_VERIFIED', NULL, '2026-10-31 05:44:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('42f65489-bcff-421c-8b8e-c68392c26a76', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'PROCESSOR_APPROVED', NULL, '2026-09-21 23:16:08');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('478d5d72-4c32-4940-ad0d-e582fd2e1409', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'APPROVED', NULL, '2026-09-22 01:33:27');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('56dd195a-427e-4b13-ba01-23f46213cc73', '53d5a4e9-2338-4b7e-b598-af71bd00257c', 'COUNTER_VERIFIED', NULL, '2026-10-31 05:44:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('5c7d6b0a-f8fd-45c4-bc05-c2c9eea67954', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'STATUS_CHANGED_TO_CANCELLED', NULL, '2026-10-31 05:47:05');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('667162ad-09e3-407d-85f7-bcb0ca5ab3c2', '53d5a4e9-2338-4b7e-b598-af71bd00257c', 'PROCESSOR_APPROVED', NULL, '2026-10-31 05:54:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('676e1cf9-ddbd-4773-936d-6735ee58bdfc', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'STATUS_CHANGED_TO_UNDER_REVIEW', NULL, '2026-10-31 05:46:22');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('693285f2-6948-43a5-ade1-1b3e38130563', 'a9de7994-f335-40a9-b437-656dba010e6e', 'PROCESSOR_APPROVED', NULL, '2026-10-25 21:33:48');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('6db14c82-bf4a-4557-9dee-0a18c00bad3a', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'DELIVERED', NULL, '2026-09-22 02:02:45');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('88313991-ad39-404a-9af7-f7975f68af7c', 'a9de7994-f335-40a9-b437-656dba010e6e', 'SIGNATORY_CHANGED', NULL, '2026-10-25 21:32:47');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('93858395-e297-4be8-95f1-57af8a6a261b', 'a9de7994-f335-40a9-b437-656dba010e6e', 'COUNTER_VERIFIED', NULL, '2026-10-25 21:33:24');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('93c92f6f-c9a1-4d0c-9f40-c99c1f8266f6', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'STATUS_CHANGED_TO_REJECTED', NULL, '2026-10-31 05:46:44');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('c11e57df-d97f-481c-86b6-bae43dce2add', 'e4939375-8251-4ff2-9eb8-4751da8926bf', 'PROCESSOR_APPROVED', NULL, '2026-10-31 05:54:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('c2b05e82-5e37-4999-8572-aa41a6948c4b', 'a9de7994-f335-40a9-b437-656dba010e6e', 'DELIVERED', NULL, '2026-10-26 01:13:14');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('cca0cb03-73a0-46b6-8f60-6547070d62e7', 'a9de7994-f335-40a9-b437-656dba010e6e', 'APPLICATION_COUNTER_INTAKE', NULL, '2026-10-25 21:19:31');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('d34ce303-fb17-4b86-b45e-c2fd3e19155c', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'PRINTED', NULL, '2026-09-22 01:42:05');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('d86eccda-138d-489e-b572-14d586c83677', 'd1e5d17a-4135-407a-bfa3-71a64a63c3c2', 'STATUS_CHANGED_TO_DELIVERED', NULL, '2026-10-31 05:47:21');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('dbc50663-2a17-4a6f-99ff-4aa88420ed03', '53d5a4e9-2338-4b7e-b598-af71bd00257c', 'APPROVED', NULL, '2026-10-31 06:04:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('e1b4de35-0d9f-4958-a2f7-d8ced134e55f', 'e4939375-8251-4ff2-9eb8-4751da8926bf', 'APPROVED', NULL, '2026-10-31 06:04:54');
INSERT INTO `audit_logs` (`id`, `application_id`, `action`, `notes`, `created_at`) VALUES ('ef4ec0ee-4515-4397-877f-6946a4c8670c', 'e4939375-8251-4ff2-9eb8-4751da8926bf', 'APPLICATION_COUNTER_INTAKE', NULL, '2026-10-31 05:24:54');

-- --------------------------------------------------------
-- Table structure for `users`
-- --------------------------------------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` varchar(64) NOT NULL,
  `email` varchar(191) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `role` varchar(32) DEFAULT 'OFFICER',
  `referral_code` varchar(64) DEFAULT NULL,
  `referred_by` varchar(64) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `referral_code` (`referral_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

SET FOREIGN_KEY_CHECKS = 1;
