-- Table structure for table `client_communication_attachments`
--

CREATE TABLE `client_communication_attachments` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `communication_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `storage_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mime_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `size` int NOT NULL COMMENT 'Size in bytes',
  `disk` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'local',
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `client_communication_attachments_communication_id_foreign` (`communication_id`),
  CONSTRAINT `client_communication_attachments_communication_id_foreign` FOREIGN KEY (`communication_id`) REFERENCES `client_communications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `client_communication_attachments`
--


--
-- Table structure for table `client_communications`
--

CREATE TABLE `client_communications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_contact_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `initiated_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `job_order_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('email','call','meeting','note','document') COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `direction` enum('inbound','outbound') COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_time` timestamp NOT NULL,
  `needs_follow_up` tinyint(1) NOT NULL DEFAULT '0',
  `follow_up_date` timestamp NULL DEFAULT NULL,
  `follow_up_notes` text COLLATE utf8mb4_unicode_ci,
  `metadata` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `client_communications_company_id_foreign` (`company_id`),
  KEY `client_communications_company_contact_id_foreign` (`company_contact_id`),
  KEY `client_communications_initiated_by_foreign` (`initiated_by`),
  KEY `client_communications_job_order_id_foreign` (`job_order_id`),
  CONSTRAINT `client_communications_company_contact_id_foreign` FOREIGN KEY (`company_contact_id`) REFERENCES `company_contacts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `client_communications_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `client_communications_initiated_by_foreign` FOREIGN KEY (`initiated_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `client_communications_job_order_id_foreign` FOREIGN KEY (`job_order_id`) REFERENCES `job_orders` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `client_communications`
--


--
-- Table structure for table `collateral_files`
--

CREATE TABLE `collateral_files` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_files_collateral_id_foreign` (`collateral_id`),
  CONSTRAINT `collateral_files_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_files`
--


--
-- Table structure for table `collateral_liens`
--

CREATE TABLE `collateral_liens` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lien_registered` tinyint(1) NOT NULL DEFAULT '0',
  `authority` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reference_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `registration_date` date DEFAULT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_liens_collateral_id_foreign` (`collateral_id`),
  CONSTRAINT `collateral_liens_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_liens`
--


--
-- Table structure for table `collateral_queries`
--

CREATE TABLE `collateral_queries` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `query_type` enum('damaged','missing','lost','stolen','impounded') COLLATE utf8mb4_unicode_ci NOT NULL,
  `reported_date` date NOT NULL,
  `reported_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `incident_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `resolution_status` enum('open','resolved') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
  `resolution_notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_queries_reported_by_foreign` (`reported_by`),
  KEY `collateral_queries_collateral_id_foreign` (`collateral_id`),
  KEY `collateral_queries_submission_id_foreign` (`submission_id`),
  CONSTRAINT `collateral_queries_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_queries_reported_by_foreign` FOREIGN KEY (`reported_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_queries_submission_id_foreign` FOREIGN KEY (`submission_id`) REFERENCES `collateral_submissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_queries`
--


--
-- Table structure for table `collateral_releases`
--

CREATE TABLE `collateral_releases` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `release_type` enum('collected_by_client','collected_by_staff','submitted_for_removal','collected_after_removal','collected_without_removal') COLLATE utf8mb4_unicode_ci NOT NULL,
  `collected_by_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_details` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `release_date` date DEFAULT NULL,
  `approval_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `approved_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `high_risk_flag` tinyint(1) NOT NULL DEFAULT '0',
  `risk_justification` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_releases_approved_by_foreign` (`approved_by`),
  KEY `collateral_releases_submission_id_foreign` (`submission_id`),
  CONSTRAINT `collateral_releases_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `employees` (`id`) ON DELETE SET NULL,
  CONSTRAINT `collateral_releases_submission_id_foreign` FOREIGN KEY (`submission_id`) REFERENCES `collateral_submissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_releases`
--


--
-- Table structure for table `collateral_status_logs`
--

CREATE TABLE `collateral_status_logs` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `old_value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `new_value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `changed_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_status_logs_collateral_id_foreign` (`collateral_id`),
  KEY `collateral_status_logs_changed_by_foreign` (`changed_by`),
  CONSTRAINT `collateral_status_logs_changed_by_foreign` FOREIGN KEY (`changed_by`) REFERENCES `employees` (`id`) ON DELETE SET NULL,
  CONSTRAINT `collateral_status_logs_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_status_logs`
--


--
-- Table structure for table `collateral_submissions`
--

CREATE TABLE `collateral_submissions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_date` date NOT NULL,
  `submitted_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `status` enum('pending','verified','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_submissions_collateral_id_foreign` (`collateral_id`),
  KEY `collateral_submissions_submitted_by_foreign` (`submitted_by`),
  CONSTRAINT `collateral_submissions_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_submissions_submitted_by_foreign` FOREIGN KEY (`submitted_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_submissions`
--


--
-- Table structure for table `collateral_types`
--

CREATE TABLE `collateral_types` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `collateral_types_name_unique` (`name`),
  UNIQUE KEY `collateral_types_code_unique` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_types`
--


--
-- Table structure for table `collateral_valuations`
--

CREATE TABLE `collateral_valuations` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `market_value` decimal(18,2) DEFAULT NULL,
  `forced_sale_value` decimal(18,2) DEFAULT NULL,
  `insurance_value` decimal(18,2) DEFAULT NULL,
  `valuation_date` date NOT NULL,
  `valuer` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_valuations_collateral_id_foreign` (`collateral_id`),
  KEY `collateral_valuations_submission_id_foreign` (`submission_id`),
  CONSTRAINT `collateral_valuations_collateral_id_foreign` FOREIGN KEY (`collateral_id`) REFERENCES `collaterals` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_valuations_submission_id_foreign` FOREIGN KEY (`submission_id`) REFERENCES `collateral_submissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_valuations`
--


--
-- Table structure for table `collateral_vaults`
--

CREATE TABLE `collateral_vaults` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `vault_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stored` tinyint(1) NOT NULL DEFAULT '0',
  `vault_location` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `storage_date` date DEFAULT NULL,
  `custodian_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `released` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `collateral_vaults_vault_id_foreign` (`vault_id`),
  KEY `collateral_vaults_custodian_id_foreign` (`custodian_id`),
  KEY `collateral_vaults_submission_id_foreign` (`submission_id`),
  CONSTRAINT `collateral_vaults_custodian_id_foreign` FOREIGN KEY (`custodian_id`) REFERENCES `employees` (`id`) ON DELETE SET NULL,
  CONSTRAINT `collateral_vaults_submission_id_foreign` FOREIGN KEY (`submission_id`) REFERENCES `collateral_submissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_vaults_vault_id_foreign` FOREIGN KEY (`vault_id`) REFERENCES `vaults` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_vaults`
--


--
-- Table structure for table `collateral_verifications`
--

CREATE TABLE `collateral_verifications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `verification_date` date DEFAULT NULL,
  `verified_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('pending','verified','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `collateral_verifications_verified_by_foreign` (`verified_by`),
  KEY `collateral_verifications_submission_id_foreign` (`submission_id`),
  CONSTRAINT `collateral_verifications_submission_id_foreign` FOREIGN KEY (`submission_id`) REFERENCES `collateral_submissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collateral_verifications_verified_by_foreign` FOREIGN KEY (`verified_by`) REFERENCES `employees` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collateral_verifications`
--


--
-- Table structure for table `collaterals`
--

CREATE TABLE `collaterals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `collateral_reference` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `staff_in_charge_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `collateral_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner_phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `owner_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `national_id_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `owner_relationship` enum('self','guarantor','third_party') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'self',
  `monitoring_status` enum('active','damaged','missing','stolen','impounded') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `status` enum('pending','active','review','released','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `release_status` enum('not_released','collected_by_client','collected_by_staff','submitted_for_removal','collected_after_removal','collected_without_removal') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'not_released',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `collaterals_collateral_reference_unique` (`collateral_reference`),
  KEY `collaterals_collateral_type_id_foreign` (`collateral_type_id`),
  KEY `collaterals_staff_in_charge_id_foreign` (`staff_in_charge_id`),
  CONSTRAINT `collaterals_collateral_type_id_foreign` FOREIGN KEY (`collateral_type_id`) REFERENCES `collateral_types` (`id`) ON DELETE CASCADE,
  CONSTRAINT `collaterals_staff_in_charge_id_foreign` FOREIGN KEY (`staff_in_charge_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `collaterals`
--


--
-- Table structure for table `commission_structures`
--

CREATE TABLE `commission_structures` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `commission_type` enum('recruiter_placement','recruiter_temp','candidate_finder','referral') COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('percentage','fixed_amount') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'percentage',
  `amount` decimal(20,2) DEFAULT NULL,
  `calculation_basis` enum('placement_fee','salary','duration') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'placement_fee',
  `rules` json DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `commission_structures_organisation_id_foreign` (`organisation_id`),
  CONSTRAINT `commission_structures_organisation_id_foreign` FOREIGN KEY (`organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `commission_structures`
--


--
-- Table structure for table `communication_attachments`
--

CREATE TABLE `communication_attachments` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `communication_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `storage_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `communication_attachments_communication_id_foreign` (`communication_id`),
  CONSTRAINT `communication_attachments_communication_id_foreign` FOREIGN KEY (`communication_id`) REFERENCES `communications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `communication_attachments`
--


--
-- Table structure for table `communication_templates`
--

CREATE TABLE `communication_templates` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `communication_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `variables` json DEFAULT NULL COMMENT 'Available template variables',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `is_system` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `communication_templates_communication_type_id_foreign` (`communication_type_id`),
  CONSTRAINT `communication_templates_communication_type_id_foreign` FOREIGN KEY (`communication_type_id`) REFERENCES `communication_types` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `communication_templates`
--


--
-- Table structure for table `communication_types`
--

CREATE TABLE `communication_types` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `communication_types_organisation_id_foreign` (`organisation_id`),
  CONSTRAINT `communication_types_organisation_id_foreign` FOREIGN KEY (`organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `communication_types`
--


--
-- Table structure for table `communications`
--

CREATE TABLE `communications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `communication_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `candidate_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `initiated_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `direction` enum('inbound','outbound') COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('sent','delivered','read','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sent',
  `is_important` tinyint(1) NOT NULL DEFAULT '0',
  `scheduled_at` timestamp NULL DEFAULT NULL,
  `sent_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `communications_communication_type_id_foreign` (`communication_type_id`),
  KEY `communications_candidate_id_foreign` (`candidate_id`),
  KEY `communications_initiated_by_foreign` (`initiated_by`),
  CONSTRAINT `communications_candidate_id_foreign` FOREIGN KEY (`candidate_id`) REFERENCES `candidates` (`id`) ON DELETE CASCADE,
  CONSTRAINT `communications_communication_type_id_foreign` FOREIGN KEY (`communication_type_id`) REFERENCES `communication_types` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `communications_initiated_by_foreign` FOREIGN KEY (`initiated_by`) REFERENCES `employees` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `communications`
--


--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `legal_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `industry` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `company_size` enum('1-10','11-50','51-200','201-500','501-1000','1001-5000','5001+') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('active','inactive','lead','blacklisted') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `companies_organisation_id_name_index` (`organisation_id`,`name`),
  KEY `companies_organisation_id_status_index` (`organisation_id`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `companies`
--


--
-- Table structure for table `company_addresses`
--

CREATE TABLE `company_addresses` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `street_address_1` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `street_address_2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `postal_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_addresses_company_id_foreign` (`company_id`),
  CONSTRAINT `company_addresses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_addresses`
--


--
-- Table structure for table `company_contacts`
--

CREATE TABLE `company_contacts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `position` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `preferred_communication_methods` json DEFAULT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `company_contacts_company_id_foreign` (`company_id`),
  KEY `company_contacts_user_id_foreign` (`user_id`),
  CONSTRAINT `company_contacts_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `company_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_contacts`
--


--
-- Table structure for table `contract_amendments`
--

CREATE TABLE `contract_amendments` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contract_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amendment_type` enum('Term Extension','Payment Holiday','Rate Change','Top-up') COLLATE utf8mb4_unicode_ci NOT NULL,
  `effective_date` date NOT NULL,
  `details` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `approved_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_amendments_contract_id_foreign` (`contract_id`),
  KEY `contract_amendments_approved_by_foreign` (`approved_by`),
  CONSTRAINT `contract_amendments_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `employees` (`id`),
  CONSTRAINT `contract_amendments_contract_id_foreign` FOREIGN KEY (`contract_id`) REFERENCES `financing_contracts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contract_amendments`
--


--
-- Table structure for table `contract_terms`
--

CREATE TABLE `contract_terms` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `job_order_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contract_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('direct-hire','contract','temp-to-perm','master') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'direct-hire',
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `terms` text COLLATE utf8mb4_unicode_ci,
  `payment_terms` text COLLATE utf8mb4_unicode_ci,
  `termination_terms` text COLLATE utf8mb4_unicode_ci,
  `status` enum('draft','active','expired','terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `signed_date` date DEFAULT NULL,
  `signed_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `document_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `contract_terms_contract_number_unique` (`contract_number`),
  KEY `contract_terms_job_order_id_foreign` (`job_order_id`),
  KEY `contract_terms_company_id_foreign` (`company_id`),
  KEY `contract_terms_signed_by_foreign` (`signed_by`),
  CONSTRAINT `contract_terms_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contract_terms_job_order_id_foreign` FOREIGN KEY (`job_order_id`) REFERENCES `job_orders` (`id`) ON DELETE SET NULL,
  CONSTRAINT `contract_terms_signed_by_foreign` FOREIGN KEY (`signed_by`) REFERENCES `employees` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contract_terms`
--


--
-- Table structure for table `contracts`
--

CREATE TABLE `contracts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `project_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contracts`
--


--
-- Table structure for table `corporate_buyers`
--

CREATE TABLE `corporate_buyers` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `accountName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `referenceNumber` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `accountNo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phoneNo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `corporate_buyers`
--


--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `countries_country_name_unique` (`country_name`),
  UNIQUE KEY `countries_country_code_unique` (`country_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `countries`
--

INSERT INTO `countries` VALUES ('01f922af-b10e-4d2a-96b7-2a6afdf7f06f','Denmark','DK','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('093a5c36-adb4-4f92-ba37-97ca2577ccb2','Jordan','JO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('09a7b0d4-3fea-4212-ab80-5794169e2471','Ireland','IE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('0ac2f5f2-01b7-45a9-a669-b2b2e1318822','El Salvador','SV','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('0d8fea27-d43f-4ff4-96d4-14cafce23530','Pakistan','PK','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('0dafcd5e-becd-4cb2-91b9-95ecfb138112','Djibouti','DJ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('1073da29-648f-4e14-9293-8c44685b5865','Algeria','DZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('15c49ab8-d56e-46f8-8579-2726fe46e362','Grenada','GD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('1631ab07-10b3-4ce0-a8dc-66bdd711e4cd','Singapore','SG','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('16b4eb79-bddb-41bb-851f-b39f09c0a0f9','United Arab Emirates','AE','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('175741d5-2f9e-468c-9eff-e40acf44b30b','Armenia','AM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('18775260-80f8-41e5-94f0-782c753105ec','Dominican Republic','DO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('1aaf2dba-78e8-48f7-9218-ae9dfb3c9d26','Tunisia','TN','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('1bd5499a-8622-4935-9435-7a6b403454db','Ethiopia','ET','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('1ebfb20d-c7d0-471a-8fda-8dd8e92c00d5','Chile','CL','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('1fd9f344-e4e7-4382-9bb7-4e4616ae2260','Venezuela','VE','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('201b4ee7-f189-4663-8596-32cd6eddcdd0','Chad','TD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2037b727-eca0-4472-a043-64b6743263aa','Luxembourg','LU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2106c05f-0f3f-4421-916b-5f8822389a90','Andorra','AD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2290f385-2896-4a9a-a265-506f05cac426','Marshall Islands','MH','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('231368ef-ca80-4c84-b679-26b0ef8146ac','Côte d\'Ivoire','CI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2510dc03-0874-4e36-ade8-fa55a1740ac2','Syria','SY','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('2698a07e-646e-4daf-a346-8d5242e2b7d2','Timor-Leste','TL','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('26abd7aa-acd3-42fa-a0c3-866553681833','Niger','NE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2ab57570-ac47-4da4-890c-26570d0f4be3','Zambia','ZM','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('2e7eaa58-9f8b-46c3-ae5d-d84da9f79b93','Albania','AL','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('2f9475e1-4e60-4c72-8c1b-e24d7c213d4d','Antigua and Barbuda','AG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('30c696c3-c89f-4d2c-9db7-a4ea10b173b2','Gambia','GM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('30ed8f2c-6dc8-48cf-a66c-c12aadbe26c9','Lao People\'s Democratic Republic','LA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('336ee965-8760-401c-b505-68ceafd58a5c','Turkmenistan','TM','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('337830dd-035a-4cb0-a0c4-0275d870201a','Germany','DE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('34114d06-512f-4e80-abd3-4bc928b74daf','Sierra Leone','SL','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('3433e9da-b7b9-4922-a18b-3870de3f0c59','Antarctica','AQ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('343a88fc-c141-4ec6-9dea-03bddffd2565','Paraguay','PY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('34fdc89a-f945-4dd9-874a-cbb3cae847a3','Tuvalu','TV','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('374cc075-4dce-4008-a757-ce0a53f74cd9','Anguilla','AI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('38f98ddf-6a74-4854-84f5-212b7e09b6ce','Austria','AT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('38fd71ef-2809-4893-a147-4e6d9da6cdb9','Lithuania','LT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('39736f75-a9b8-480d-b65a-4cd968febdd2','Korea (South)','KR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('39d11921-0393-4b51-82a1-e5843b37c60e','Libya','LY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('39ecac1f-da78-4f10-8c8e-a0d7f1ac1be9','Mozambique','MZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('3abb57c1-31b3-4d60-a5fc-497c08cb8749','Nepal','NP','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('3bf3ff14-8bfd-438a-9599-814823d4fb5a','Sudan','SD','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('3c2a74c8-9e19-4ee4-bd9a-079a59e25fd2','Australia','AU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('3d8b393e-a496-40d2-b1d6-f1ba52664a25','Comoros','KM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('3ec97c9a-01e2-4044-b3d7-7ad2dc19530f','Kazakhstan','KZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('3fa3dcd0-96dd-44ab-951a-fa1ab3454ce9','Tonga','TO','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('40077fbd-0879-4be4-9e87-4f25bcc113cb','Nauru','NR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('40b21963-880e-4bd7-a4e7-70f517055fb7','South Africa','ZA','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('4146aa45-e98f-421b-87cb-6e31ffe3581d','Uruguay','UY','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('4216f63e-c030-456a-a3f2-8c41f47289bc','Bahamas','BS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('44328af8-8d6d-46cf-9e2f-a45e1766a1eb','Sri Lanka','LK','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('4500f2f9-5930-429d-82c0-cc1175396e92','Angola','AO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('4771b7d3-4d9b-471f-909b-3dc1e3dec650','Thailand','TH','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('4807e1ae-6c03-4d09-ad87-43a2edf3b271','Japan','JP','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('4a1defa2-869e-4dd2-a068-db842630764d','Mali','ML','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('4bdd3a47-d659-4eba-abb5-a371884b2650','Italy','IT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('4c404ceb-a126-4e18-8ed2-51a67f89ea9e','Guinea-Bissau','GW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('513146b7-07b3-4b9b-a820-96f3dfde5da2','Bangladesh','BD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5271bae8-551b-4597-a589-2547c1e897da','Poland','PL','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('52c71c74-961c-4c61-9b45-57b1108ba24e','Sweden','SE','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('55978366-a0c8-49d3-9db1-01398936c269','Eritrea','ER','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('55a0321c-651f-4b32-81cc-e375bf557c3f','Micronesia','FM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5608cc91-dbb8-4055-b8b9-66feea8aca98','Samoa','WS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5614e66e-9ae1-4eff-982c-c34ef7eaa248','Nigeria','NG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5638a5e6-469d-4a87-8615-46edc80d690b','Bolivia','BO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('58aca5f2-af6d-40f2-8da3-22428c40cda4','Palestine','PS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5b3f1286-b53d-413e-9c7e-be70ab1b5ca9','Guatemala','GT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5ccf097e-c0d0-49a6-b5d2-2c42ed7f4568','Portugal','PT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5cd7219e-f93f-4627-a9d3-f969f86db93b','Canada','CA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5cf25fb2-d89b-47a2-aad5-d90e6e0b0273','Mongolia','MN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5e72fb38-03ad-4d03-87ca-31d6d6639ade','France','FR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5e7801d6-565b-47b6-915e-22999608529c','Bahrain','BH','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5e85550d-bb00-448f-9b67-68a79a27c566','Madagascar','MG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('5f5bbbdc-a119-4962-a429-973321126963','Montenegro','ME','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('606ec01c-afcd-44b2-b861-4cd079dc05e3','Haiti','HT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('60ad6049-738b-47ab-88a6-06438df5081d','Somalia','SO','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('61922c2e-616e-4345-af64-e6602b51488b','Latvia','LV','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('62f135fa-851d-4925-96b8-051223549a0d','Cuba','CU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('63b09b26-d845-4501-a0f4-5fc712c38187','Slovenia','SI','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('6512ba5b-e07b-4d81-b3d6-2fa801bd55c3','Czechia','CZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('666728a4-4cf4-4035-a7d1-48e37817baf4','Fiji','FJ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('671a3e61-a6dd-47c3-b58c-4479b58bf3c6','Tanzania','TZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('68a3ae22-670a-4b6d-aa09-9fd8d9994af0','Cayman Islands','KY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('68e40365-7c61-4f1c-99c0-8f03c1803951','China','CN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('69371e3e-1c9f-4dce-89c1-fc596de288e3','Costa Rica','CR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('6a015f56-78c3-465c-86cf-3aef91300a43','Jamaica','JM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('6d28ad17-0a98-41e8-aea8-9b4fa70374f8','Azerbaijan','AZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('708a79b4-159d-487b-9826-0910b4c0054d','Morocco','MA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('710fd6d0-a98a-4dfe-b7b9-9e9c0cb9dc88','Saint Kitts and Nevis','KN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('711228bd-06bf-47b4-a507-ef9d4dc0968b','Cabo Verde','CV','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('729c3b2a-65b3-410b-a65c-e24cc1dd10fb','Zimbabwe','ZW','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('75457631-fcfa-489e-956a-8da3612a89f5','Kenya','KE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('758f8816-4a66-40a7-9a6f-e8ca390e9fd8','Uzbekistan','UZ','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('75b65e6d-d0a9-44d7-ab51-488eae12880f','Tajikistan','TJ','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('76f5beee-a418-4972-bc09-e3451c990f16','Belize','BZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('7a136c53-afa9-48b6-bb16-8553b62fdfd5','Gabon','GA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('7ac44570-4537-405d-8916-c5e37aa3007f','South Sudan','SS','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('7b56bea4-86a8-4af4-82fe-2d2e4c274448','Taiwan','TW','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('7cb46ad9-69c8-492a-a7d5-2dc95abcbbbc','Greece','GR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('7d007e32-30fa-43de-9f7d-51afb4487632','Colombia','CO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('7d9a9ed5-7cd6-4a7c-970e-2df65698874f','Honduras','HN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('7f7543c5-9423-47a7-aa78-0d350bf984fd','Myanmar','MM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8039a4ed-e450-46c5-adbd-67c4be689674','Cyprus','CY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8143a5e2-cbf3-4737-8479-7d6970d74d4e','Bosnia and Herzegovina','BA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('833db412-4d8d-4516-bd49-75250c228c8a','Central African Republic','CF','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8554ea49-d871-4bfb-89bc-075e8b2eb823','Palau','PW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('85db4f01-060e-4695-91cf-7ed707cc315f','Trinidad and Tobago','TT','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('868d12df-9606-46b1-9e9b-346e6c5f4928','Uganda','UG','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('87511977-7aec-4f18-a03d-e21a05db74bd','Estonia','EE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8adb1999-2cb2-4a7f-9a1a-d1980f088eba','Congo','CG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8cc1dfb0-1cd9-44d4-9951-696f825e4d75','New Zealand','NZ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8d55555f-7d78-43b6-9782-3f76a3720642','Lesotho','LS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8d7d8ead-52c9-46f8-b65a-b2d0605ac018','Romania','RO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('8dc70f17-e3ca-4f01-987e-c730e72f9cc5','Togo','TG','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('90cd70cd-f80a-49a9-947a-fc536a5e8f86','Slovakia','SK','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('915f5c0d-c850-4c71-a4b8-c0ff8cf9e930','Switzerland','CH','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('92b8b8f3-05f2-4c38-bfaf-0592856f76a0','Lebanon','LB','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('932bd369-467b-4dee-b71e-13506a197599','Saudi Arabia','SA','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('96886832-dd1d-49c0-962e-a9e82d4f535b','Moldova','MD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('969f7352-8776-4c8a-a697-03f44be229cb','Rwanda','RW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('9981d4a8-a54e-47a4-8b2d-e15bae3ff044','Kyrgyzstan','KG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('9b1046ea-8da8-4b7b-8426-987310929050','Equatorial Guinea','GQ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('9d462842-ac2f-4848-85a8-de2e24612fde','Botswana','BW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('9d89a1a6-044c-48d1-95d4-8ae0d228c423','Saint Vincent and the Grenadines','VC','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a116236c-6f50-49d4-a6ee-1de2f7a4eaaa','Peru','PE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a6184df4-bf8c-441d-a3b7-983ed83fc554','Qatar','QA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a64faf73-0537-4367-9778-7512d796f640','Guyana','GY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a6d26325-3e10-436e-b947-5397c560f73e','Bermuda','BM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a86866e1-363e-450d-afba-a7d8b4a135ac','Netherlands','NL','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('a917fbc1-0e8f-4521-9fa3-a589da0cc3c9','United States','US','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('a9b690b2-76b0-49ee-9246-4aa2f447ffbe','Dominica','DM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('aa134067-0657-4868-9e5b-2d716a157179','Croatia','HR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('aa5f409a-3fe3-4ba4-bf25-eb32bb650ec1','Georgia','GE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b12ed726-3cef-4160-b810-5842fa883a00','Namibia','NA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b24b1a36-80ef-448f-a638-1130691601b0','Norway','NO','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b3f4c14a-2af1-4f0c-aeae-c2c1d28e3b34','Congo (Democratic Republic of the)','CD','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b4e4100d-d0f4-408d-baaa-8668089fe89e','Guinea','GN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b4fecfef-9ce5-48ed-a617-5701d091a9c4','Argentina','AR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b57e83f1-1ed3-4c30-bee4-18d986f85b22','Russia','RU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b58ab343-f47d-45dd-9eac-54d605f08080','Finland','FI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b7554868-26e3-441b-bc97-a92f74db9c04','Philippines','PH','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b9334165-4182-4b55-afcc-460de3870573','Iceland','IS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('b949ab13-a00a-48f3-be33-5385cc66fe48','Brunei Darussalam','BN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('bae961b6-b63d-47a8-a101-4e995427b9f6','Liechtenstein','LI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('be5c9c44-f92e-4e1d-b3a9-47bc5eb73e47','Iran','IR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('bfca0a2c-9b75-48b1-b3f5-a819f3aa9c5a','Ghana','GH','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('c0fd6e00-017e-4954-97a5-902d384f586d','San Marino','SM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('c272d4ba-55e0-4a7d-9499-46e9244b7446','Serbia','RS','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('c3609267-4a47-4bad-9387-6d6cafb7741b','United Kingdom','GB','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('c4864aba-4d5f-43cc-8c66-45aa35db159a','Solomon Islands','SB','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('c6a2c9e8-e1a2-485a-9378-6dd55700d0fc','Malaysia','MY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('c7bf7274-29c1-400f-b4b5-f58c7b9908d3','Monaco','MC','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('ca31d935-8cea-4af2-a971-adf99582b4d2','Barbados','BB','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('cbf115e4-46ed-40b5-b286-58f3efc855a6','Mauritius','MU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('cd36eeb3-9422-4926-bb71-d96648130a9d','Liberia','LR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('cd883f12-164f-43e8-b6d4-daa8ee42324b','Kuwait','KW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('cef0693b-d8f2-4d80-bb06-4f3babc697d4','Kiribati','KI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d13cb220-a398-4e37-9355-13064ffb1d9f','Sao Tome and Principe','ST','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d17f3f5b-177a-4281-a80e-f49752561f8f','Mauritania','MR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d31ee556-6dee-42a0-916e-ba8190194d91','Cambodia','KH','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d4c7316c-4b1c-41ca-b7c7-3b66d97bfa75','Nicaragua','NI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d694e254-a724-42b5-8798-84918ce8e929','Benin','BJ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d74576f6-d640-42db-825a-cbf7c101795e','Vanuatu','VU','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('d9215c11-c892-48c8-9b9f-04e278871378','Bhutan','BT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('d9ea0522-bc71-44d6-b517-5c2269471ed0','Egypt','EG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('dac600c4-f2e9-495b-9f4a-3b74ad4a5208','Ukraine','UA','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('ddf5fb86-c6f0-48d4-b27c-b0f91c10a7ac','Iraq','IQ','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('de60ffbc-6300-46c8-820a-5376c08b151e','Saint Lucia','LC','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('e3246593-827b-423e-934b-ddd4786059e9','Seychelles','SC','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('e37fa7b9-163b-4b6a-bdce-37139b538c0d','Hungary','HU','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('e48b481b-8522-4846-9d86-1d6a3aa7ec97','Aruba','AW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('e5fd4699-0ce8-4654-bf1a-a940858f207a','Yemen','YE','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('ea27713b-8a04-48d6-bebf-f1011f319ccc','Ecuador','EC','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('eb2de70d-466e-428b-a9d2-2448f77444d9','Vietnam','VN','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('ec27e055-18c0-4ea7-9c1d-01744000b24c','Senegal','SN','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('edd9f7a4-4e0f-48d5-8cc7-d024a3b75f99','Indonesia','ID','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('ee8bc780-456c-4a87-8b05-0ede57d8617a','Spain','ES','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('eed22c1e-b359-460e-afdc-14291a7311a4','Bulgaria','BG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('eef3b837-8fd4-488a-9739-fcdf2185c2d4','Brazil','BR','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f020e5ca-ab66-40cf-86ac-b40ea90460bb','Suricountry_name','SR','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('f02be7de-219e-40c2-b0a2-e930f0a03619','Malta','MT','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f127dfa5-86f0-4ebd-9894-2c0ab94405e0','Turkey','TR','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('f13cdc8b-dd9c-44d5-b6d3-469b3d7f66f2','American Samoa','AS','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f21fd089-0f06-4d5e-be40-7acc22846108','Afghanistan','AF','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f287bada-8c4a-4e0f-aa83-d6bd6dd821e8','Oman','OM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f30b9773-798f-48a2-b34c-05b5ffd1ed10','Israel','IL','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f330e1de-9717-4d38-b48d-5938a283f3cd','Malawi','MW','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f694add2-b803-4b13-82ad-5860b5eb531b','Burkina Faso','BF','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f8a89f68-5835-4a77-a6a0-722742c16b79','Belgium','BE','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f8b4a957-7dd4-4f52-8efb-7acc22c5b69a','Belarus','BY','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f8e54183-9e7d-4ee9-a3d0-2c4e79ee983d','Panama','PA','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('f979bcbf-26be-4cee-9d03-972505668e1b','Maldives','MV','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('fa473c92-b1f1-47db-9b2a-bf34253d4839','India','IN','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('fb68c14e-ad41-4f3a-8abe-4efd2ef29c6f','Burundi','BI','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('fc58e024-d011-4e70-89aa-0f1e04bcae86','Cameroon','CM','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('fdc8dcba-a3bc-4644-812c-74724d005e5c','Papua New Guinea','PG','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL),('fdf8cc07-4970-41d9-8089-ba0b4f1b4d13','Mexico','MX','2026-01-20 02:08:19','2026-01-20 02:08:19',NULL);

--
-- Table structure for table `credit_notes`
--

CREATE TABLE `credit_notes` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `return_request_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credit_note_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `issue_date` date NOT NULL,
  `total_amount` decimal(12,2) NOT NULL,
  `status` enum('draft','issued','applied','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `reason` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `credit_notes_credit_note_number_unique` (`credit_note_number`),
  KEY `credit_notes_invoice_id_foreign` (`invoice_id`),
  KEY `credit_notes_return_request_id_foreign` (`return_request_id`),
  CONSTRAINT `credit_notes_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `sale_invoices` (`id`),
  CONSTRAINT `credit_notes_return_request_id_foreign` FOREIGN KEY (`return_request_id`) REFERENCES `return_orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `credit_notes`
--


--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_base_currency` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `currencies_code_unique` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` VALUES ('0dedd890-3cdc-43ef-a08d-b25123f19e28','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Tanzania Shillings','TZS',1,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10'),('53842f32-c752-4fa6-991c-28b35f4cc86c','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','United States Dollars','USD',0,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10');

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('individual','organisation') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'individual',
  `organization_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `salutation` enum('Mr','Mrs','Ms','Miss','Dr','Prof','Rev') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Mr',
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `other_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `industry` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `headquarters_address` text COLLATE utf8mb4_unicode_ci,
  `billing_address` text COLLATE utf8mb4_unicode_ci,
  `shipping_address` text COLLATE utf8mb4_unicode_ci,
  `payment_terms` enum('DOR','Net7','Net30','Net60','Net90','Prepaid','COD','CIA','EOM','Custom') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'DOR-Due on Receipt, Net due at end of X days, COD-Cash on Delivery, CIA-Cash In Advance, EOM-End of Month',
  `credit_limit` decimal(10,2) DEFAULT NULL,
  `status` enum('active','inactive','suspended') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `bank_details` text COLLATE utf8mb4_unicode_ci,
  `tin` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` enum('USD','EUR','GBP') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `customers_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--


--
-- Table structure for table `daily_account_summations`
--

CREATE TABLE `daily_account_summations` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `chart_of_account_id` bigint unsigned NOT NULL,
  `account_sub_category_id` bigint unsigned DEFAULT NULL,
  `fiscal_year_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(30,2) NOT NULL DEFAULT '0.00',
  `currency_rate` decimal(15,4) NOT NULL DEFAULT '1.0000',
  `base_currency_amount` decimal(20,4) GENERATED ALWAYS AS ((`amount` * `currency_rate`)) STORED,
  `transaction_date` date NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `daily_account_summations_chart_of_account_id_foreign` (`chart_of_account_id`),
  KEY `daily_account_summations_account_sub_category_id_foreign` (`account_sub_category_id`),
  CONSTRAINT `daily_account_summations_account_sub_category_id_foreign` FOREIGN KEY (`account_sub_category_id`) REFERENCES `account_sub_categories` (`id`),
  CONSTRAINT `daily_account_summations_chart_of_account_id_foreign` FOREIGN KEY (`chart_of_account_id`) REFERENCES `chart_of_accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `daily_account_summations`
--


--
-- Table structure for table `deduction_types`
--

CREATE TABLE `deduction_types` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_tax` tinyint(1) NOT NULL DEFAULT '0',
  `frequency` enum('One-Time','Monthly','Yearly') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Monthly',
  `account_id` bigint unsigned DEFAULT NULL,
  `calculation_method` enum('amount','percent') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'amount',
  `deduction_is` enum('mandatory','optional','adjustable') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'mandatory',
  `auto_apply` tinyint(1) NOT NULL DEFAULT '0',
  `default_value` decimal(20,2) NOT NULL DEFAULT '0.00',
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `deduction_types_account_id_foreign` (`account_id`),
  CONSTRAINT `deduction_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `chart_of_accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deduction_types`
--

INSERT INTO `deduction_types` VALUES ('06cadc77-50c6-4fd8-9446-65706b02e556','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Transport Allowance',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('0a2b485a-5a49-47f9-b621-9c880404dacf','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Other Deduction',0,'One-Time',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('0d386687-e099-4f98-9812-36c40968caca','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Health Insurance (NHIF)',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('22933b2c-f8da-4719-a571-f12a0a1fce2c','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Medical Allowance',0,'Yearly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('25b023fb-e2e1-439e-bc9e-ab3c01829e21','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Phone Allowance',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('38d3ad00-1f9c-49c3-bfba-cfdd02ed626d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','NSSF Contribution',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('3dce8bdf-9f90-469b-be16-0e75faef643d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Meal Allowance',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('495dcb5c-48ac-442f-9ee5-9b6ec585d01e','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Housing Allowance',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('58e00bc6-6581-4ce9-96bd-ea475a0219bb','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Salary Advance',0,'One-Time',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('82ff9e0f-0413-4320-969c-bc04a8c1dd4a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Pension Contribution',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('9fed48b7-aba3-4671-af39-029b1dc908d6','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Education Allowance',0,'Yearly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('acb06285-6679-4e65-8f39-26a10d4e31e5','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Union Contribution',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('bce34003-0620-46ca-89f9-1f82b3cfed64','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Overtime',0,'One-Time',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','PAYE (Income Tax)',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('dc9a2f6f-27cc-491b-9c8e-f9a41b42b631','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Loan Repayment',0,'Monthly',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('f1170465-a3af-4e4d-adb1-85d89647f8c1','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','TPAWU',0,'Monthly',15,'amount','mandatory',1,0.00,NULL,'2026-01-20 12:28:58','2026-01-20 12:28:58',NULL),('f25b328e-3888-45d2-8737-8002c1a79ed2','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','Travel Allowance',0,'One-Time',NULL,'amount','mandatory',0,0.00,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10',NULL);

--
-- Table structure for table `default_accounts`
--

CREATE TABLE `default_accounts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_sub_category_id` bigint unsigned DEFAULT NULL,
  `chart_of_account_id` bigint unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_org_account_type` (`organisation_id`,`account_type`),
  KEY `default_accounts_account_sub_category_id_foreign` (`account_sub_category_id`),
  KEY `default_accounts_chart_of_account_id_foreign` (`chart_of_account_id`),
  CONSTRAINT `default_accounts_account_sub_category_id_foreign` FOREIGN KEY (`account_sub_category_id`) REFERENCES `account_sub_categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `default_accounts_chart_of_account_id_foreign` FOREIGN KEY (`chart_of_account_id`) REFERENCES `chart_of_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `default_accounts_organisation_id_foreign` FOREIGN KEY (`organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `default_accounts`
--


--
-- Table structure for table `defects`
--

CREATE TABLE `defects` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quality_check_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `defect_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `severity` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` int NOT NULL,
  `action_taken` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `defects_organisation_id_foreign` (`organisation_id`),
  KEY `defects_quality_check_id_foreign` (`quality_check_id`),
  CONSTRAINT `defects_organisation_id_foreign` FOREIGN KEY (`organisation_id`) REFERENCES `organisations` (`id`),
  CONSTRAINT `defects_quality_check_id_foreign` FOREIGN KEY (`quality_check_id`) REFERENCES `production_quality_checks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `defects`
--


--
-- Table structure for table `deliveries`
--

CREATE TABLE `deliveries` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `order_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `delivery_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `delivery_date` date NOT NULL,
  `delivery_method` enum('Truck','Courier','Motorbike','Company Vehicle','Pickup by Customer','On-Site','Remote','Workshop') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tracking_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `carrier_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `delivery_address_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `route_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipped_by` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `delivered_by` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `signature_path` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('draft','ready_for_pickup','shipped','in_transit','delivered','returned','confirmed','disputed','failed','canceled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `canceled_at` timestamp NULL DEFAULT NULL,
  `shipped_at` timestamp NULL DEFAULT NULL,
  `returned_at` timestamp NULL DEFAULT NULL,
  `delivered_at` timestamp NULL DEFAULT NULL,
  `confirmed_at` timestamp NULL DEFAULT NULL,
  `disputed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `deliveries_delivery_number_unique` (`delivery_number`),
  KEY `deliveries_order_id_foreign` (`order_id`),
  KEY `deliveries_delivered_by_foreign` (`delivered_by`),
  KEY `deliveries_created_by_foreign` (`created_by`),
  KEY `deliveries_shipped_by_foreign` (`shipped_by`),
  KEY `deliveries_warehouse_id_foreign` (`warehouse_id`),
  KEY `deliveries_carrier_id_foreign` (`carrier_id`),
  CONSTRAINT `deliveries_carrier_id_foreign` FOREIGN KEY (`carrier_id`) REFERENCES `trucks` (`id`),
  CONSTRAINT `deliveries_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `deliveries_delivered_by_foreign` FOREIGN KEY (`delivered_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `deliveries_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `sale_orders` (`id`) ON DELETE CASCADE,
  CONSTRAINT `deliveries_shipped_by_foreign` FOREIGN KEY (`shipped_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `deliveries_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deliveries`
--


--
-- Table structure for table `delivery_attempts`
--

CREATE TABLE `delivery_attempts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `shipment_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempt_date` date NOT NULL,
  `status` enum('FAILED','PARTIAL') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'FAILED',
  `reason` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notes` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `attempted_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `delivery_attempts_shipment_id_foreign` (`shipment_id`),
  KEY `delivery_attempts_attempted_by_foreign` (`attempted_by`),
  CONSTRAINT `delivery_attempts_attempted_by_foreign` FOREIGN KEY (`attempted_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `delivery_attempts_shipment_id_foreign` FOREIGN KEY (`shipment_id`) REFERENCES `shipments` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `delivery_attempts`
--


--
-- Table structure for table `delivery_lines`
--

CREATE TABLE `delivery_lines` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `delivery_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `order_line_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uom_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity_delivered` decimal(10,2) NOT NULL,
  `quantity_returned` decimal(10,2) DEFAULT NULL,
  `condition` enum('Good','Damaged') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Good',
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `delivery_lines_delivery_id_foreign` (`delivery_id`),
  KEY `delivery_lines_order_line_id_foreign` (`order_line_id`),
  KEY `delivery_lines_item_id_foreign` (`item_id`),
  KEY `delivery_lines_uom_id_foreign` (`uom_id`),
  CONSTRAINT `delivery_lines_delivery_id_foreign` FOREIGN KEY (`delivery_id`) REFERENCES `deliveries` (`id`) ON DELETE CASCADE,
  CONSTRAINT `delivery_lines_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`),
  CONSTRAINT `delivery_lines_order_line_id_foreign` FOREIGN KEY (`order_line_id`) REFERENCES `order_lines` (`id`) ON DELETE CASCADE,
  CONSTRAINT `delivery_lines_uom_id_foreign` FOREIGN KEY (`uom_id`) REFERENCES `unit_of_measures` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `delivery_lines`
--


--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `head_employee_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_department_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` VALUES ('02e593a7-ebd7-4949-b1b8-bdf6baa8844a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Information and Communication Technology','Information and Communication Technology','2026-01-20 12:19:50','2026-01-20 12:19:50',NULL),('11c684dc-8412-4c9a-bce4-c4260956045d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Operation and Transport','Operation and Transport','2026-01-20 16:49:26','2026-01-20 16:49:26',NULL),('2c06ffdc-0994-4f1e-b7be-89ea7056fad5','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'SRCUSS – D1','GHJHGDFJHGU','2026-01-22 13:42:19','2026-01-22 13:42:42','2026-01-22 13:42:42'),('759d125f-0504-4210-860b-aa5a7e3234c0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Audit','Audit','2026-01-20 12:22:43','2026-01-20 12:22:43',NULL),('b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Human Resource and Administration','Human Resource and Administration','2026-01-20 12:22:11','2026-01-20 12:22:11',NULL),('c0bca84b-69ed-4aa4-b25b-89040836c567','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Accounts','Account','2026-03-10 21:55:09','2026-03-20 10:40:08','2026-03-20 10:40:08'),('c4cdef40-63ec-45db-b1b2-4864e6af1784','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Accounts','Account','2026-01-20 02:08:20','2026-01-20 02:08:20',NULL),('ee8e9b63-032e-49ca-94c1-471c51b94f48','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,NULL,'Procurement and Supply','Procurement and Supply','2026-01-20 12:21:09','2026-01-20 12:21:09',NULL);

--
-- Table structure for table `depreciation_records`
--

CREATE TABLE `depreciation_records` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `asset_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `calculation_date` date NOT NULL,
  `current_value` decimal(18,2) NOT NULL,
  `depreciation_amount` decimal(18,2) NOT NULL,
  `accumulated_depreciation` decimal(18,2) NOT NULL,
  `net_book_value` decimal(18,2) NOT NULL,
  `method` enum('straight_line','declining_balance') COLLATE utf8mb4_unicode_ci NOT NULL,
  `depreciation_rate` decimal(5,2) NOT NULL,
  `status` enum('Calculated','Posted','Reversed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Calculated',
  `notes` text COLLATE utf8mb4_unicode_ci,
  `unique_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `depreciation_records_asset_id_foreign` (`asset_id`),
  CONSTRAINT `depreciation_records_asset_id_foreign` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `depreciation_records`
--


--
-- Table structure for table `designations`
--

CREATE TABLE `designations` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `designation_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `designations_department_id_foreign` (`department_id`),
  CONSTRAINT `designations_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `designations`
--

INSERT INTO `designations` VALUES ('0d07ec22-6f9c-4472-83aa-e7037a22d532','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','11c684dc-8412-4c9a-bce4-c4260956045d','Zonal Manager','Zonal Manager','2026-01-21 09:10:25','2026-01-21 09:10:25',NULL),('1334f6c9-ba92-4d16-9122-9b7d84905d28','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','Security Guard','Security Guard','2026-01-21 09:12:44','2026-01-21 09:12:44',NULL),('2570de6e-430e-4000-b727-d4ba7458f806','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','Office Cleaner','Office Cleaner','2026-01-21 09:20:38','2026-01-21 09:20:38',NULL),('2b667163-4234-46a5-be18-33bb04d91da0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','OS','Office Supervisor','2026-01-21 09:09:45','2026-01-21 09:09:45',NULL),('3851cc29-63a7-429b-a5c3-209a349988f4','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','11c684dc-8412-4c9a-bce4-c4260956045d','Estate Officer','Estate Officer','2026-01-21 09:13:31','2026-01-21 09:13:31',NULL),('53ff1e3e-dcf8-4db9-845c-165715d968b5','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','11c684dc-8412-4c9a-bce4-c4260956045d','Operation & Transport Manager','Operation and Transport Manager','2026-01-20 16:50:19','2026-01-20 16:50:19',NULL),('65f19ba8-7c26-46d2-92f8-19b8d4f7fb2e','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','Mwangalizi wa Ofisi_DSM','Mwangalizi wa Ofisi_DSM','2026-03-28 11:33:54','2026-03-28 11:33:54',NULL),('6bd78016-e491-47b7-825d-83905a27f2d9','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','General Manager','General Manager','2026-01-20 12:27:50','2026-01-20 12:27:50',NULL),('6c8a081f-e750-49d0-b609-e6c2ef1f9036','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','759d125f-0504-4210-860b-aa5a7e3234c0','Chief Internal Auditor','Chief Internal Auditor','2026-01-20 12:27:19','2026-01-20 12:27:19',NULL),('73a1edf3-dc81-4af8-b2e7-862eee4acb31','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','PS','Personal Secretay','2026-01-21 09:11:01','2026-01-21 09:11:01',NULL),('84652bfc-15d1-43f1-8a1b-dbc45fb72e75','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','ee8e9b63-032e-49ca-94c1-471c51b94f48','Store Keeper','Store Keeper','2026-01-21 09:18:27','2026-01-21 09:18:27',NULL),('89e7a23c-c415-451f-b753-2ceab2051012','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','Hr & Administration Manager','Hr & Administration Manager','2026-01-20 16:47:43','2026-01-20 16:47:43',NULL),('adc8b598-06f0-4286-a11d-c45ce5a4e5f0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','02e593a7-ebd7-4949-b1b8-bdf6baa8844a','IT Officer','ICT Officer','2026-01-20 12:24:00','2026-01-20 12:24:19',NULL),('baa5d666-a262-4918-a4c5-81a4d1d79411','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','c4cdef40-63ec-45db-b1b2-4864e6af1784','Assistant Accountant','Assistant Accountant','2026-01-21 09:17:59','2026-01-21 09:17:59',NULL),('cc63b1c6-d384-40a0-be80-2fc038b8360e','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','11c684dc-8412-4c9a-bce4-c4260956045d','Extension Officer','Extension Officer','2026-01-21 09:19:29','2026-01-21 09:19:29',NULL),('d982aa7b-8b1b-4061-b973-214812f964fb','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','ee8e9b63-032e-49ca-94c1-471c51b94f48','Procurement and Supply Officer','Procurement and Supply Officer','2026-01-20 12:25:26','2026-01-20 12:25:26',NULL),('f2fc0c62-ef2b-4a7e-9f64-7373362afa9a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','c4cdef40-63ec-45db-b1b2-4864e6af1784','Chief Accountant','Chief Accountant','2026-01-20 12:26:27','2026-01-20 12:26:44',NULL),('f70758e2-c758-4584-8379-988acc55408d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','b75eb4df-23d1-4f95-b0dd-fd76ef7a30b3','Office attendant','Office attendant','2026-01-21 09:20:06','2026-01-21 09:20:06',NULL),('f9b50f3f-fb3e-471a-a870-31399c1f3c4a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','c4cdef40-63ec-45db-b1b2-4864e6af1784','Cashier','Cashier','2026-01-21 09:11:55','2026-01-21 09:11:55',NULL),('fa54abc8-a873-436c-91fd-ac4de9134c67','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','11c684dc-8412-4c9a-bce4-c4260956045d','Driver','Driver','2026-01-21 09:11:29','2026-01-21 09:11:29',NULL),('ffe28d16-be0a-4de8-8d3f-4e4b47edb6ee','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','c4cdef40-63ec-45db-b1b2-4864e6af1784','Wakala wa Benki na Mitandao','Wakala wa Benki na Mitandao','2026-03-28 11:26:40','2026-03-28 11:26:40',NULL);

--
-- Table structure for table `disciplinary_actions`
--

CREATE TABLE `disciplinary_actions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `action_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `action_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `disciplinary_actions_employee_id_foreign` (`employee_id`),
  CONSTRAINT `disciplinary_actions_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `disciplinary_actions`
--


--
-- Table structure for table `discounts`
--

CREATE TABLE `discounts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `discount_type` enum('percentage','fixed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'percentage',
  `discount_value` decimal(10,2) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `discounts_item_id_foreign` (`item_id`),
  CONSTRAINT `discounts_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `discounts`
--


--
-- Table structure for table `disposal_approvals`
--

CREATE TABLE `disposal_approvals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `asset_disposal_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approver_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approval_level` int NOT NULL,
  `status` enum('Pending','Approved','Rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `comments` text COLLATE utf8mb4_unicode_ci,
  `action_date` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `disposal_approvals_asset_disposal_id_foreign` (`asset_disposal_id`),
  KEY `disposal_approvals_approver_id_foreign` (`approver_id`),
  CONSTRAINT `disposal_approvals_approver_id_foreign` FOREIGN KEY (`approver_id`) REFERENCES `employees` (`id`),
  CONSTRAINT `disposal_approvals_asset_disposal_id_foreign` FOREIGN KEY (`asset_disposal_id`) REFERENCES `asset_disposals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `disposal_approvals`
--


--
-- Table structure for table `districts`
--

CREATE TABLE `districts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `region_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `districts_region_id_foreign` (`region_id`),
  CONSTRAINT `districts_region_id_foreign` FOREIGN KEY (`region_id`) REFERENCES `regions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `districts`
--


--
-- Table structure for table `document_conversions`
--

CREATE TABLE `document_conversions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `converted_file_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `target_format` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('pending','processing','completed','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `error_message` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `document_conversions_original_file_id_foreign` (`original_file_id`),
  KEY `document_conversions_converted_file_id_foreign` (`converted_file_id`),
  CONSTRAINT `document_conversions_converted_file_id_foreign` FOREIGN KEY (`converted_file_id`) REFERENCES `files` (`id`),
  CONSTRAINT `document_conversions_original_file_id_foreign` FOREIGN KEY (`original_file_id`) REFERENCES `files` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_conversions`
--


--
-- Table structure for table `document_ocr_data`
--

CREATE TABLE `document_ocr_data` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `extracted_text` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `metadata` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `document_ocr_data_file_id_foreign` (`file_id`),
  CONSTRAINT `document_ocr_data_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_ocr_data`
--


--
-- Table structure for table `documents`
--

CREATE TABLE `documents` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `documentable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `documentable_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `uploaded_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `metadata` json DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `documents_documentable_type_documentable_id_index` (`documentable_type`,`documentable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `documents`
--


--
-- Table structure for table `drivers`
--

CREATE TABLE `drivers` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `license_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `drivers_employee_id_foreign` (`employee_id`),
  CONSTRAINT `drivers_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `drivers`
--


--
-- Table structure for table `education_levels`
--

CREATE TABLE `education_levels` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `level` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `education_levels`
--


--
-- Table structure for table `employee_allowances`
--

CREATE TABLE `employee_allowances` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `allowance_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` decimal(20,2) DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_allowances_employee_id_foreign` (`employee_id`),
  KEY `employee_allowances_allowance_type_id_foreign` (`allowance_type_id`),
  CONSTRAINT `employee_allowances_allowance_type_id_foreign` FOREIGN KEY (`allowance_type_id`) REFERENCES `allowance_types` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_allowances_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_allowances`
--

INSERT INTO `employee_allowances` VALUES ('0cb10501-26aa-4e61-be87-577f9f97b404','0ce29044-b626-407b-8000-d0ec38b721d4','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-01-20',NULL,'2026-01-20 17:10:35','2026-01-20 17:10:35'),('1018dca3-c981-4983-bec8-fde210da2c83','4d11e3ed-b531-4199-bf1d-b184e8b50514','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-28',NULL,'2026-03-28 08:59:21','2026-03-28 08:59:21'),('1476cbd6-58f6-43e5-835f-0e3c9a8d499b','8da02e05-26aa-45cb-bbfd-54dc0896cb23','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-03-25',NULL,'2026-03-25 09:47:21','2026-03-25 09:47:21'),('1a4b9fe6-841b-4c76-973a-ada2796c1d40','0ce29044-b626-407b-8000-d0ec38b721d4','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-01-20',NULL,'2026-01-20 17:10:35','2026-01-20 17:10:35'),('321bca67-47f6-401b-bfcf-ca5d74459e09','3de7c572-94cb-4a65-b30e-ba55d6c94893','c8189025-5578-48fa-b7a5-c670b13dbda9',50000.00,'active','2026-01-21',NULL,'2026-01-21 08:46:21','2026-01-21 08:46:21'),('36e508c4-6769-4915-b796-790c7213f93b','e0f5cdb7-b25a-4836-a385-9aca149a0658','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-03-25',NULL,'2026-03-25 09:39:07','2026-03-25 09:39:07'),('3e4ac6b9-1157-468e-8a5f-ff63d6292676','7615b56e-429a-4d5c-afed-4aa410ad6065','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-25',NULL,'2026-03-25 09:13:19','2026-03-25 09:13:19'),('401df220-5c58-4f31-9021-be8a68bc0554','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',100000.00,'active','2026-01-20',NULL,'2026-01-20 16:42:13','2026-01-20 16:42:13'),('42d1577a-5d6d-4894-9438-4d5ad2e1e01e','0ce29044-b626-407b-8000-d0ec38b721d4','45f563ed-c8b9-417f-84f4-f59e6ca06a3f',150000.00,'active','2026-01-20',NULL,'2026-01-20 17:10:35','2026-01-20 17:10:35'),('50a7c8bd-4eaa-4653-a8b9-8a6d5a67b73d','e0f5cdb7-b25a-4836-a385-9aca149a0658','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-25',NULL,'2026-03-25 09:39:07','2026-03-25 09:39:07'),('55d6b9af-ad7f-4edf-8d80-2f73cb259a9f','6b060b16-6f4c-438a-900b-bfc1ffa59037','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-28',NULL,'2026-03-28 11:28:16','2026-03-28 11:28:16'),('5f00d868-7d3d-4c35-91b6-2a615bb00360','8da02e05-26aa-45cb-bbfd-54dc0896cb23','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-25',NULL,'2026-03-25 09:47:21','2026-03-25 09:47:21'),('62dbae0c-b381-432d-b0c5-5ca9910a6a58','3de7c572-94cb-4a65-b30e-ba55d6c94893','45f563ed-c8b9-417f-84f4-f59e6ca06a3f',200000.00,'active','2026-01-21',NULL,'2026-01-21 08:46:21','2026-01-21 08:46:21'),('6519cae0-2820-40dc-92d3-ccda0bf28ff6','981f4aa5-af80-492d-9275-6a63c2dd2e7a','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-01-21',NULL,'2026-01-21 09:47:11','2026-01-21 09:47:11'),('660513fe-f2ee-4f6a-a1fe-57c4373efc12','981f4aa5-af80-492d-9275-6a63c2dd2e7a','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-01-21',NULL,'2026-01-21 09:47:11','2026-01-21 09:47:11'),('724ea316-0c74-4476-af86-c5ecc54eda35','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','45f563ed-c8b9-417f-84f4-f59e6ca06a3f',200000.00,'active','2026-01-20',NULL,'2026-01-20 16:42:13','2026-01-20 16:42:13'),('727379cc-93a1-435f-966d-6b358b6f2688','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-01-22',NULL,'2026-01-22 13:26:01','2026-01-22 13:26:01'),('7f7bc692-9cd9-426a-ace5-5298ccb691fc','7615b56e-429a-4d5c-afed-4aa410ad6065','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-03-25',NULL,'2026-03-25 09:13:19','2026-03-25 09:13:19'),('850d71f6-5209-4526-b555-baca2133a629','32b66d4d-b771-4092-8897-c827b37e1d1d','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-01-21',NULL,'2026-01-21 09:56:11','2026-01-21 09:56:11'),('8ccb7863-b35b-4b38-8399-388d48a1ba99','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','c8189025-5578-48fa-b7a5-c670b13dbda9',60000.00,'active','2026-01-20',NULL,'2026-01-20 16:42:13','2026-01-20 16:42:13'),('8e4446d9-7b58-4092-93d7-7b10a1ebbaad','c4eaf525-c9e9-465b-a06b-a40f9979dee0','45f563ed-c8b9-417f-84f4-f59e6ca06a3f',200000.00,'active','2026-01-21',NULL,'2026-01-21 08:59:47','2026-01-21 08:59:47'),('8f515649-e148-4943-904a-f71d25814381','19620d50-9361-419d-b9af-b1ffca33c082','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-03-23',NULL,'2026-03-23 16:38:10','2026-03-23 16:38:10'),('a0484b5c-22c3-484f-afb4-5c851f173ef7','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-01-22',NULL,'2026-01-22 13:26:01','2026-01-22 13:26:01'),('bb01c0c2-e37c-4bdf-8546-85bc547424f7','3de7c572-94cb-4a65-b30e-ba55d6c94893','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',80000.00,'active','2026-01-21',NULL,'2026-01-21 08:46:21','2026-01-21 08:46:21'),('cebcb9c1-4837-429f-b06b-7c1dec1231a0','ee29c4ea-996d-4700-923c-b211ebed5d1c','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-01-21',NULL,'2026-01-21 09:46:43','2026-01-21 09:46:43'),('d3cdc129-13e3-4735-b70b-68cec4566a23','c4eaf525-c9e9-465b-a06b-a40f9979dee0','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',80000.00,'active','2026-01-21',NULL,'2026-01-21 08:59:47','2026-01-21 08:59:47'),('ebb3ddf2-2d3f-4d7f-9063-7dce2db51152','32b66d4d-b771-4092-8897-c827b37e1d1d','c8189025-5578-48fa-b7a5-c670b13dbda9',40000.00,'active','2026-01-21',NULL,'2026-01-21 09:56:11','2026-01-21 09:56:11'),('f05a38b7-a834-4429-b613-2166f9c4c385','4d11e3ed-b531-4199-bf1d-b184e8b50514','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-03-28',NULL,'2026-03-28 08:59:21','2026-03-28 08:59:21'),('fc2992b9-68ef-4428-a5c9-b338cfc16458','c4eaf525-c9e9-465b-a06b-a40f9979dee0','c8189025-5578-48fa-b7a5-c670b13dbda9',50000.00,'active','2026-01-21',NULL,'2026-01-21 08:59:47','2026-01-21 08:59:47'),('ff2f584d-8994-4121-b48a-f33136cca96e','19620d50-9361-419d-b9af-b1ffca33c082','81e2c578-3d4e-4e23-bf3b-f7afeddc419f',60000.00,'active','2026-03-23',NULL,'2026-03-23 16:38:10','2026-03-23 16:38:10');

--
-- Table structure for table `employee_awards`
--

CREATE TABLE `employee_awards` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `award_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `award_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_awards_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_awards_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_awards`
--


--
-- Table structure for table `employee_certifications`
--

CREATE TABLE `employee_certifications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `certification_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `certifying_body` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_obtained` date NOT NULL,
  `details` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_certifications_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_certifications_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_certifications`
--


--
-- Table structure for table `employee_deductions`
--

CREATE TABLE `employee_deductions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `deduction_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` decimal(20,2) DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_deductions_deduction_type_id_foreign` (`deduction_type_id`),
  KEY `employee_deductions_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_deductions_deduction_type_id_foreign` FOREIGN KEY (`deduction_type_id`) REFERENCES `deduction_types` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_deductions_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_deductions`
--

INSERT INTO `employee_deductions` VALUES ('0389de1a-40d2-4ddf-8cfd-7d3498477271','c5e5b9f4-02de-4ed0-9e82-c5c4a521ffc8','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:10:48','2026-03-28 10:10:48'),('0990c185-202d-49b8-ac2d-839000894b66','4d11e3ed-b531-4199-bf1d-b184e8b50514','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',65763.00,'active','2026-03-28 08:59:21','2026-03-28 08:59:21'),('0d3b242c-69c0-4ce4-b7b4-4062c7d7dfed','87e9a262-4599-404f-939f-52a2f96e73c0','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:07:32','2026-03-28 09:07:32'),('102b13e2-7b4f-4291-bb0c-281cd4b022aa','38299f6f-f7a0-4a56-992e-0801c3465bee','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',29025.00,'active','2026-03-28 08:14:10','2026-03-28 08:14:10'),('163e24f3-8ec6-43e6-a00c-20455d405999','c002a3a9-59d3-4a70-83e4-cd4de7ff3120','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:25:38','2026-03-28 10:25:38'),('193649e7-1592-4b8d-92de-d122d5af43a1','87e9a262-4599-404f-939f-52a2f96e73c0','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:07:32','2026-03-28 09:07:32'),('1e9291e8-311e-46b9-ae0b-abacdb4dac5b','da920bce-a137-4294-b25f-dc2754ed00a9','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:29:22','2026-03-28 10:29:22'),('2050d912-3406-4d62-b261-1f92934eea05','b22d4a77-aa25-46c8-9468-51ef5afcabea','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',34373.00,'active','2026-01-20 16:06:52','2026-01-20 16:06:52'),('20a1bf34-6a66-4c1e-aa95-3eb7bae1fc85','2ace294d-a1ba-4d55-8431-5f6c8c001575','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:20:45','2026-03-28 09:20:45'),('244105c7-a0df-4d78-81cc-33e0d0ba8659','7615b56e-429a-4d5c-afed-4aa410ad6065','f1170465-a3af-4e4d-adb1-85d89647f8c1',13064.00,'active','2026-03-25 09:13:19','2026-03-25 09:13:19'),('263837e3-2a69-426a-b2b5-34e0d31b2a31','fdfac28a-3300-4fd9-ae21-757f66952b3b','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:15:34','2026-03-28 10:15:34'),('2933df4c-3db9-4297-b980-a8cf6777cd86','3de7c572-94cb-4a65-b30e-ba55d6c94893','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',124350.00,'active','2026-01-21 08:46:21','2026-01-21 08:46:21'),('2e4a9599-0de4-4e8d-95ef-478e9a68a413','0ce29044-b626-407b-8000-d0ec38b721d4','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',34373.00,'active','2026-01-20 17:10:35','2026-01-20 17:10:35'),('30f28798-21ad-4ac2-882a-5ca9b434f9d8','9ee05e5c-a7e5-4435-bdcd-89a38c1ea864','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 08:06:48','2026-03-28 08:06:48'),('38ee963e-ba9c-44d5-9c66-530c1f2fd281','e7b2c658-b5c8-42c7-947a-96a2a42e2a63','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:44:45','2026-03-28 09:44:45'),('3a57f488-1493-4d3f-9967-71201924c6f9','c5e5b9f4-02de-4ed0-9e82-c5c4a521ffc8','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:10:48','2026-03-28 10:10:48'),('3b4b582b-231c-49e7-9855-15c94f283ef5','b9b7c65d-1f3e-49f1-9cc2-89a6e4fbf6c7','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:13:06','2026-03-28 09:13:06'),('3f9cafb7-b89d-4c42-b5f9-91aef979f96a','4d11e3ed-b531-4199-bf1d-b184e8b50514','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',34373.00,'active','2026-03-28 08:59:21','2026-03-28 08:59:21'),('451a19d2-70f3-4537-98f9-24b6572a1c58','e8387630-4ccf-4ad5-ace9-ef996b9d5f13','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',58050.00,'active','2026-03-28 11:35:14','2026-03-28 11:35:14'),('48370400-d035-4ed9-8324-c3045bd2a94b','da920bce-a137-4294-b25f-dc2754ed00a9','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:29:22','2026-03-28 10:29:22'),('49182972-0b79-495e-9ba1-d7ae8e8226a5','981f4aa5-af80-492d-9275-6a63c2dd2e7a','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',9747.00,'active','2026-01-21 09:47:11','2026-01-21 09:47:11'),('4be562c1-d76a-45f2-b3cc-02026f4cb8ba','e0f5cdb7-b25a-4836-a385-9aca149a0658','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',51256.00,'active','2026-03-25 09:39:07','2026-03-25 09:39:07'),('4ccabc17-db58-4417-98e8-8e22fc1f00a3','e0f5cdb7-b25a-4836-a385-9aca149a0658','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',75143.00,'active','2026-03-25 09:39:07','2026-03-25 09:39:07'),('504b0ab2-eea3-45f2-adf5-e74a19218e76','8da02e05-26aa-45cb-bbfd-54dc0896cb23','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',27021.00,'active','2026-03-25 09:47:21','2026-03-25 09:47:21'),('505c5d9b-4440-46e9-b203-8c056d87e9fc','87e9a262-4599-404f-939f-52a2f96e73c0','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:07:32','2026-03-28 09:07:32'),('530cff5c-059d-48b6-860d-792fcc58e2ef','a47afd69-6fca-4b9f-9aa1-662a460cb8fa','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:55:40','2026-03-28 09:55:40'),('55741f80-e874-4d7c-8e50-7a66ea3c2cdb','38299f6f-f7a0-4a56-992e-0801c3465bee','f1170465-a3af-4e4d-adb1-85d89647f8c1',5805.00,'active','2026-03-28 08:14:10','2026-03-28 08:14:10'),('563645a6-cd49-42c4-91ed-c959ec77081f','32b66d4d-b771-4092-8897-c827b37e1d1d','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',44806.00,'active','2026-01-21 09:56:11','2026-01-21 09:56:11'),('5b95c730-0590-408e-a201-7dbcffeee845','83e663a1-ab0b-43f1-a51a-5b8c7da1c5f1','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 08:37:13','2026-03-28 08:37:13'),('5be6c5eb-8f3e-4e61-8d42-fdf5e65b61c1','b9b7c65d-1f3e-49f1-9cc2-89a6e4fbf6c7','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:13:06','2026-03-28 09:13:06'),('5ee87d20-9b6e-4e9f-b18d-023f060c512a','32b66d4d-b771-4092-8897-c827b37e1d1d','f1170465-a3af-4e4d-adb1-85d89647f8c1',8961.00,'active','2026-01-21 09:56:11','2026-01-21 09:56:11'),('61671c69-05a9-4bb8-b182-3421cb205db6','ee29c4ea-996d-4700-923c-b211ebed5d1c','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',55033.00,'active','2026-01-21 09:46:43','2026-01-21 09:46:43'),('65c65538-9ef9-45b3-a66e-402f2e5b0257','d7f48a45-6fef-4fc8-b6a0-7a2de5a994b6','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:52:20','2026-03-28 09:52:20'),('6693bc86-2fbb-4919-a334-9cd243861a14','ee29c4ea-996d-4700-923c-b211ebed5d1c','f1170465-a3af-4e4d-adb1-85d89647f8c1',11007.00,'active','2026-01-21 09:46:43','2026-01-21 09:46:43'),('6d52b4aa-9ae6-47ca-881f-7402e32f2855','7615b56e-429a-4d5c-afed-4aa410ad6065','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',33577.00,'active','2026-03-25 09:13:19','2026-03-25 09:13:19'),('6f21aeb3-dd88-465e-992b-91ff56d8101c','b22d4a77-aa25-46c8-9468-51ef5afcabea','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',65763.00,'active','2026-01-20 16:06:52','2026-01-20 16:06:52'),('7101174b-bbb2-4acc-b470-0c7f3981d468','11bc2a55-e7ed-46b7-9c03-aa9db4edce76','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:18:22','2026-03-28 10:18:22'),('733f6bd7-f02b-4089-9c87-113c940a5717','da920bce-a137-4294-b25f-dc2754ed00a9','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:29:22','2026-03-28 10:29:22'),('7449a544-d82b-4577-a7eb-7ae38037d659','e284b1b2-4827-4fd2-bfac-667ba388503c','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 08:52:16','2026-03-28 08:52:16'),('792d9632-8245-4110-94b8-21523e23fc18','4d11e3ed-b531-4199-bf1d-b184e8b50514','f1170465-a3af-4e4d-adb1-85d89647f8c1',13153.00,'active','2026-03-28 08:59:21','2026-03-28 08:59:21'),('7a8ee7a5-bcbe-4fc7-a278-b4eb8bd00380','8da02e05-26aa-45cb-bbfd-54dc0896cb23','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',61678.00,'active','2026-03-25 09:47:21','2026-03-25 09:47:21'),('7ab438e0-c619-43ae-920a-54b3328c4729','e284b1b2-4827-4fd2-bfac-667ba388503c','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 08:52:16','2026-03-28 08:52:16'),('805f2434-0355-4b8a-a936-5d3026f2c7bc','d7f48a45-6fef-4fc8-b6a0-7a2de5a994b6','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:52:20','2026-03-28 09:52:20'),('81389f4d-57e0-4ed4-9aeb-aa0a1856eb40','2ace294d-a1ba-4d55-8431-5f6c8c001575','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:20:45','2026-03-28 09:20:45'),('81c3768a-b61d-4a47-a24e-644e36d2f641','8a900fc0-37b9-4c0c-af6b-726f95ca22c7','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:17:21','2026-03-28 09:17:21'),('857199ac-52d0-4d55-aa9e-5bfdc36fee73','8a900fc0-37b9-4c0c-af6b-726f95ca22c7','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:17:21','2026-03-28 09:17:21'),('94515d62-3061-48c5-916b-87b4050b834b','3eb8d5ea-6c38-45dd-a4fd-e2804cb51709','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:09:10','2026-03-28 09:09:10'),('952c358d-fd63-4daa-bdb5-3eea60bb099c','8bfd9388-5103-4907-825e-6eddc7eb80b6','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:22:12','2026-03-28 10:22:12'),('978c7200-e8ec-4638-9915-f71a208cd046','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',65763.00,'active','2026-01-22 13:26:01','2026-01-22 13:26:01'),('988a6bf5-7c33-47de-88d2-c7c0761ab813','c5e5b9f4-02de-4ed0-9e82-c5c4a521ffc8','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:10:48','2026-03-28 10:10:48'),('9afc407d-6654-47b6-ac33-4b21bd21ba15','c4eaf525-c9e9-465b-a06b-a40f9979dee0','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',124350.00,'active','2026-01-21 08:59:47','2026-01-21 08:59:47'),('9e4e1fbd-d044-4d98-957e-beee77b566c7','11bc2a55-e7ed-46b7-9c03-aa9db4edce76','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:18:22','2026-03-28 10:18:22'),('a0b00390-e6bf-4abe-963c-4ec24d13fa06','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','f1170465-a3af-4e4d-adb1-85d89647f8c1',13153.00,'active','2026-01-22 13:26:01','2026-01-22 13:26:01'),('a1ed66fe-aa9c-4df2-810d-7a97b817f182','83e663a1-ab0b-43f1-a51a-5b8c7da1c5f1','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 08:37:13','2026-03-28 08:37:13'),('a5fc7c4d-a70c-49e8-99f7-0580bca547ea','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',140000.00,'active','2026-01-20 16:42:13','2026-01-20 16:42:13'),('a5fe7d22-ff23-4ba6-9493-3bed7a911072','8bfd9388-5103-4907-825e-6eddc7eb80b6','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:22:12','2026-03-28 10:22:12'),('af66edbc-58e3-4003-8a8c-e58ff34230d5','981f4aa5-af80-492d-9275-6a63c2dd2e7a','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',43538.00,'active','2026-01-21 09:47:11','2026-01-21 09:47:11'),('b0e2e055-b0de-4a2a-8e1b-1692fa89f209','11bc2a55-e7ed-46b7-9c03-aa9db4edce76','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:18:22','2026-03-28 10:18:22'),('b11f5697-38dc-4003-9f6a-ea8a763f119d','cf3296c3-8deb-4e6c-af8b-183a669a492d','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:40:41','2026-03-28 09:40:41'),('b1392c48-0a09-4384-904f-a8da089af2b2','e7b2c658-b5c8-42c7-947a-96a2a42e2a63','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:44:45','2026-03-28 09:44:45'),('b2475e4a-66f8-4ebf-a1d5-baf1193753bc','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','f1170465-a3af-4e4d-adb1-85d89647f8c1',28000.00,'active','2026-01-20 16:42:13','2026-01-20 16:42:13'),('b4164a5c-0492-4c81-8cd1-71152e1dd048','3eb8d5ea-6c38-45dd-a4fd-e2804cb51709','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:09:10','2026-03-28 09:09:10'),('b5489a3c-986e-4c89-a050-1cc01b1176fa','7615b56e-429a-4d5c-afed-4aa410ad6065','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',65321.00,'active','2026-03-25 09:13:19','2026-03-25 09:13:19'),('b664934f-fa11-4ded-b062-eee3ad3b602d','c4eaf525-c9e9-465b-a06b-a40f9979dee0','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',109489.00,'active','2026-01-21 08:59:47','2026-01-21 08:59:47'),('b79a6889-36f1-4b85-a179-1208011faa19','b22d4a77-aa25-46c8-9468-51ef5afcabea','f1170465-a3af-4e4d-adb1-85d89647f8c1',13153.00,'active','2026-01-20 16:06:52','2026-01-20 16:06:52'),('ba28c9ce-41d1-4993-bfd4-7d81dfb4daf2','ee29c4ea-996d-4700-923c-b211ebed5d1c','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',18024.00,'active','2026-01-21 09:46:43','2026-01-21 09:46:43'),('bcafa280-e763-418b-8a83-9615e207413b','e8387630-4ccf-4ad5-ace9-ef996b9d5f13','f1170465-a3af-4e4d-adb1-85d89647f8c1',11610.00,'active','2026-03-28 11:35:14','2026-03-28 11:35:14'),('bdbade78-2e20-4e35-bd13-3340c6caef85','19620d50-9361-419d-b9af-b1ffca33c082','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',93918.00,'active','2026-03-23 16:38:10','2026-03-23 16:38:10'),('c59cecb1-ba34-4d80-944b-80f3dbfcf067','19620d50-9361-419d-b9af-b1ffca33c082','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',89316.00,'active','2026-03-23 16:38:10','2026-03-23 16:38:10'),('c6c499bc-a4f0-431b-8304-5ec8bd56faa9','d7f48a45-6fef-4fc8-b6a0-7a2de5a994b6','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:52:20','2026-03-28 09:52:20'),('c9714b3d-2cbf-4f81-88ab-f62d8f48aa6e','8da02e05-26aa-45cb-bbfd-54dc0896cb23','f1170465-a3af-4e4d-adb1-85d89647f8c1',12336.00,'active','2026-03-25 09:47:21','2026-03-25 09:47:21'),('c9882a06-c326-43d9-91a0-a9a09515071f','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',206000.00,'active','2026-01-20 16:42:13','2026-01-20 16:42:13'),('ca06f998-8401-4281-93f4-b626d993eeb6','2ace294d-a1ba-4d55-8431-5f6c8c001575','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 09:20:45','2026-03-28 09:20:45'),('ca478cac-207b-4b27-b439-ce2d27c44a7e','c4eaf525-c9e9-465b-a06b-a40f9979dee0','f1170465-a3af-4e4d-adb1-85d89647f8c1',21898.00,'active','2026-01-21 08:59:47','2026-01-21 08:59:47'),('caeb0bf4-d94a-4093-a6d1-249fa926f4bb','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',34373.00,'active','2026-01-22 13:26:01','2026-01-22 13:26:01'),('cc4168a0-014c-454f-b2d1-0c6d78e4f6a2','c002a3a9-59d3-4a70-83e4-cd4de7ff3120','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 10:25:38','2026-03-28 10:25:38'),('ccd00fb4-08b5-42a8-90b1-edaa0c54926f','cf3296c3-8deb-4e6c-af8b-183a669a492d','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2447.00,'active','2026-03-28 09:40:41','2026-03-28 09:40:41'),('ccd825ef-df22-408c-8506-0ff6be821945','9ee05e5c-a7e5-4435-bdcd-89a38c1ea864','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 08:06:48','2026-03-28 08:06:48'),('cfec662d-9c66-41e8-87ea-f669ce26d0ee','8a900fc0-37b9-4c0c-af6b-726f95ca22c7','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:17:21','2026-03-28 09:17:21'),('d099bd5f-b892-4c06-bace-9f23050e5eb9','70a5e13a-e631-4e23-97e4-ffc99fecce86','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',37152.00,'active','2026-03-28 08:35:59','2026-03-28 08:35:59'),('d4535cf8-2742-4b96-92f5-250870cc1bb7','b9b7c65d-1f3e-49f1-9cc2-89a6e4fbf6c7','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:13:06','2026-03-28 09:13:06'),('d4fc1892-a57c-4e3e-8a60-0e608adf701b','70a5e13a-e631-4e23-97e4-ffc99fecce86','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',5149.00,'active','2026-03-28 08:35:59','2026-03-28 08:35:59'),('d715e76e-82e5-4d95-ac50-556d8483032f','e0f5cdb7-b25a-4836-a385-9aca149a0658','f1170465-a3af-4e4d-adb1-85d89647f8c1',15029.00,'active','2026-03-25 09:39:07','2026-03-25 09:39:07'),('d9b982b7-4e6d-40ab-9878-aa7da9d95c00','fdfac28a-3300-4fd9-ae21-757f66952b3b','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:15:34','2026-03-28 10:15:34'),('d9df7401-525b-494e-82cf-1b550a138bb7','3eb8d5ea-6c38-45dd-a4fd-e2804cb51709','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:09:10','2026-03-28 09:09:10'),('da50f014-f1c6-413a-becb-784575328e1d','70a5e13a-e631-4e23-97e4-ffc99fecce86','f1170465-a3af-4e4d-adb1-85d89647f8c1',7430.00,'active','2026-03-28 08:35:59','2026-03-28 08:35:59'),('dbd06287-06cb-4e53-b88e-cc3bbb94c059','e284b1b2-4827-4fd2-bfac-667ba388503c','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 08:52:16','2026-03-28 08:52:16'),('de1640a6-83ff-4102-8d37-aca25d409330','e8387630-4ccf-4ad5-ace9-ef996b9d5f13','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',20490.00,'active','2026-03-28 11:35:14','2026-03-28 11:35:14'),('e1b93577-ec5c-4a7b-9ba2-d68beee90aa3','9ee05e5c-a7e5-4435-bdcd-89a38c1ea864','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 08:06:48','2026-03-28 08:06:48'),('e3b99263-a47e-46a4-b318-2aa970570b0e','3de7c572-94cb-4a65-b30e-ba55d6c94893','1044a75b-b48f-44a9-82de-07c1e7a6a9a1',109489.00,'active','2026-01-21 08:46:21','2026-01-21 08:46:21'),('e5c59fcf-28f3-4967-aace-d3295ff6c57e','e7b2c658-b5c8-42c7-947a-96a2a42e2a63','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:44:45','2026-03-28 09:44:45'),('e6ca3c18-acd1-4ad2-b561-8f1f3ba2bb77','83e663a1-ab0b-43f1-a51a-5b8c7da1c5f1','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 08:37:13','2026-03-28 08:37:13'),('ea6a4ddb-a72f-454e-828b-730df6fdf9b4','8bfd9388-5103-4907-825e-6eddc7eb80b6','cb05eca5-cfb0-45d1-8e16-f9dc50f3e1d0',2474.00,'active','2026-03-28 10:22:12','2026-03-28 10:22:12'),('ecf6b989-fddf-4214-a6cc-e677a90d8403','a47afd69-6fca-4b9f-9aa1-662a460cb8fa','38d3ad00-1f9c-49c3-bfba-cfdd02ed626d',33437.00,'active','2026-03-28 09:55:40','2026-03-28 09:55:40'),('ed86b8eb-e635-46fc-80f8-e162de086948','19620d50-9361-419d-b9af-b1ffca33c082','f1170465-a3af-4e4d-adb1-85d89647f8c1',18784.00,'active','2026-03-23 16:38:10','2026-03-23 16:38:10'),('f13e450b-9a38-4d65-852a-182e5401cce4','3de7c572-94cb-4a65-b30e-ba55d6c94893','f1170465-a3af-4e4d-adb1-85d89647f8c1',21898.00,'active','2026-01-21 08:46:21','2026-01-21 08:46:21'),('f3f4ab59-2dd3-475b-88d5-68e7435d71b2','fdfac28a-3300-4fd9-ae21-757f66952b3b','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:15:34','2026-03-28 10:15:34'),('f545cc8f-7cf3-4c45-b8a1-98c55ee02c03','981f4aa5-af80-492d-9275-6a63c2dd2e7a','f1170465-a3af-4e4d-adb1-85d89647f8c1',8708.00,'active','2026-01-21 09:47:11','2026-01-21 09:47:11'),('f6746dee-2347-42f6-b835-0c2860cef96a','32b66d4d-b771-4092-8897-c827b37e1d1d','08e4769c-1dd0-4d34-8e0e-797a00a4d56b',10660.00,'active','2026-01-21 09:56:11','2026-01-21 09:56:11'),('fa08a4af-a5d5-42eb-8e79-e728e69290f9','cf3296c3-8deb-4e6c-af8b-183a669a492d','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 09:40:41','2026-03-28 09:40:41'),('fc260f17-ae20-4c9f-995a-6206825e0226','c002a3a9-59d3-4a70-83e4-cd4de7ff3120','f1170465-a3af-4e4d-adb1-85d89647f8c1',6687.00,'active','2026-03-28 10:25:38','2026-03-28 10:25:38');

--
-- Table structure for table `employee_dependants`
--

CREATE TABLE `employee_dependants` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dependent_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `relationship` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_of_birth` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_dependants_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_dependants_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_dependants`
--


--
-- Table structure for table `employee_documents`
--

CREATE TABLE `employee_documents` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `document_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `document_url` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_documents_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_documents_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_documents`
--


--
-- Table structure for table `employee_insurances`
--

CREATE TABLE `employee_insurances` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `insurance_provider_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `policy_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `coverage_start_date` date NOT NULL,
  `coverage_end_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_insurances_employee_id_foreign` (`employee_id`),
  KEY `employee_insurances_insurance_provider_id_foreign` (`insurance_provider_id`),
  CONSTRAINT `employee_insurances_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_insurances_insurance_provider_id_foreign` FOREIGN KEY (`insurance_provider_id`) REFERENCES `insurance_providers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_insurances`
--


--
-- Table structure for table `employee_leaves`
--

CREATE TABLE `employee_leaves` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `leave_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `reason` text COLLATE utf8mb4_unicode_ci,
  `status` enum('Pending','Approved','Rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_leaves_employee_id_foreign` (`employee_id`),
  KEY `employee_leaves_leave_type_id_foreign` (`leave_type_id`),
  CONSTRAINT `employee_leaves_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_leaves_leave_type_id_foreign` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_leaves`
--


--
-- Table structure for table `employee_loans`
--

CREATE TABLE `employee_loans` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `balance` decimal(15,2) NOT NULL DEFAULT '0.00',
  `installment_amount` decimal(15,2) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `status` enum('requested','approved','disbursed','active','closed','defaulted') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'requested',
  `disbursed_at` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_loans_employee_id_foreign` (`employee_id`),
  KEY `employee_loans_type_id_foreign` (`type_id`),
  CONSTRAINT `employee_loans_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_loans_type_id_foreign` FOREIGN KEY (`type_id`) REFERENCES `loan_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_loans`
--


--
-- Table structure for table `employee_overtimes`
--

CREATE TABLE `employee_overtimes` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `hours` decimal(8,2) NOT NULL,
  `rate` decimal(15,2) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_overtimes_employee_id_date_index` (`employee_id`,`date`),
  CONSTRAINT `employee_overtimes_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_overtimes`
--


--
-- Table structure for table `employee_reimbursements`
--

CREATE TABLE `employee_reimbursements` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `reimbursement_type_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `reimbursement_date` date NOT NULL,
  `details` text COLLATE utf8mb4_unicode_ci,
  `status` enum('Pending','Approved','Rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_reimbursements_employee_id_foreign` (`employee_id`),
  KEY `employee_reimbursements_reimbursement_type_id_foreign` (`reimbursement_type_id`),
  CONSTRAINT `employee_reimbursements_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_reimbursements_reimbursement_type_id_foreign` FOREIGN KEY (`reimbursement_type_id`) REFERENCES `reimbursement_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_reimbursements`
--


--
-- Table structure for table `employee_salary_structures`
--

CREATE TABLE `employee_salary_structures` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `salary_structure_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `base_salary` decimal(15,2) NOT NULL DEFAULT '0.00',
  `effective_from` date NOT NULL,
  `effective_to` date DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_salary_structures_employee_id_index` (`employee_id`),
  KEY `employee_salary_structures_salary_structure_id_index` (`salary_structure_id`),
  KEY `employee_salary_structures_effective_from_index` (`effective_from`),
  KEY `employee_salary_structures_effective_to_index` (`effective_to`),
  CONSTRAINT `employee_salary_structures_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_salary_structures_salary_structure_id_foreign` FOREIGN KEY (`salary_structure_id`) REFERENCES `salary_structures` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_salary_structures`
--

INSERT INTO `employee_salary_structures` VALUES ('03f43bb9-da14-4999-9f3f-f61f5c708cbf','3eb8d5ea-6c38-45dd-a4fd-e2804cb51709','6a22adb0-c0ce-4de1-871d-df76c1cf2615',334368.00,'2026-03-28',NULL,'active','2026-03-28 08:20:57','2026-03-28 08:20:57',NULL),('05c2b428-69e4-4461-846b-07b43383f7bc','d7f48a45-6fef-4fc8-b6a0-7a2de5a994b6','0761baec-c2b4-46fa-b480-0ac5d7a36806',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:52:20','2026-03-28 09:52:20',NULL),('23b8fb0a-1072-48b9-bc38-6c53064483bc','32b66d4d-b771-4092-8897-c827b37e1d1d','110cfbfe-01ce-4213-bf58-e6f129b93be7',448058.00,'2026-01-21',NULL,'active','2026-01-21 09:56:11','2026-01-21 09:56:11',NULL),('345be790-b6dd-43f1-bde0-6a51b9462802','8bfd9388-5103-4907-825e-6eddc7eb80b6','a88e79ac-b1fc-41ab-a4e3-38448714f332',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:22:12','2026-03-28 10:22:12',NULL),('3c00e237-bf37-42a1-8e0f-a50b4f40ebeb','d2fc8698-04df-4591-8c9e-72124f6bf94e','34c5305c-997b-42d3-9424-6e2c5419eacf',657627.00,'2026-01-20',NULL,'active','2026-01-20 16:57:29','2026-01-20 16:57:29',NULL),('3d50b773-b93d-45b6-b830-fb43d885af38','87e9a262-4599-404f-939f-52a2f96e73c0','079dbf55-261d-409b-8fab-884d15b48b0b',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:07:32','2026-03-28 09:07:32',NULL),('43bfb448-2fbb-4a70-84cc-7385f3d020ff','7615b56e-429a-4d5c-afed-4aa410ad6065','8322b7b1-5702-47d3-a43d-3de3aef60a66',653208.00,'2026-03-25',NULL,'active','2026-03-25 09:13:19','2026-03-25 09:13:19',NULL),('45b81875-809b-4cc6-abb2-ea55e6b781d6','8da02e05-26aa-45cb-bbfd-54dc0896cb23','5dce9633-606f-464b-b036-ef7fb3d271e3',616781.00,'2026-03-25',NULL,'active','2026-03-25 09:47:21','2026-03-25 09:47:21',NULL),('4bd36843-373e-4fe4-af58-d2b013451dc1','ae5cffdf-ca73-4ef7-bfac-610c18644912','1e51402f-9eea-4eeb-b46b-297252481909',250000.00,'2026-03-28',NULL,'active','2026-03-28 11:14:13','2026-03-28 11:14:13',NULL),('4c7eaf5d-99fa-4cfc-9393-1eefe419e57f','96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','b053c22f-567a-45fa-8d19-7ee142b28fa1',1400000.00,'2026-01-20',NULL,'active','2026-01-20 16:42:13','2026-01-20 16:42:13',NULL),('5012eb43-3e93-4529-9121-e48eab6a7862','e8387630-4ccf-4ad5-ace9-ef996b9d5f13','2f86156e-7bfd-47d7-9f37-1707f347045c',580500.00,'2026-03-28',NULL,'active','2026-03-28 10:34:51','2026-03-28 10:34:51',NULL),('57023fbb-4367-40e0-9ee1-648c442f02d0','2ace294d-a1ba-4d55-8431-5f6c8c001575','6dc66e08-eed7-4f3b-aab2-b305731c9994',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:20:45','2026-03-28 09:20:45',NULL),('5703a1ad-022f-4a0d-b493-65418bba9dd7','3de7c572-94cb-4a65-b30e-ba55d6c94893','0b4c3c30-afcb-4cf4-ba03-79fe8d409d7d',1094888.00,'2026-01-21',NULL,'active','2026-01-21 08:46:21','2026-01-21 08:46:21',NULL),('59a57480-78d7-46cf-a996-af9495f9b375','83e663a1-ab0b-43f1-a51a-5b8c7da1c5f1','69675274-50af-45de-ad94-8f4f6bd85cac',334368.00,'2026-03-28',NULL,'active','2026-03-28 08:29:44','2026-03-28 08:29:44',NULL),('59c6a52d-bbd5-4b3f-ab51-bf39f6b37f69','1035d30f-a9e7-40de-bdfb-d8dfca74bf22','5363e2b7-8e9c-4e4a-9404-561a224e3449',657627.00,'2026-01-22',NULL,'active','2026-01-22 13:26:01','2026-01-22 13:26:01',NULL),('5c2db450-31fe-4eba-96d9-79aa5c4c4ffd','c4eaf525-c9e9-465b-a06b-a40f9979dee0','dab4f876-0adf-436c-bc41-1b7c74998bee',1094888.00,'2026-01-21',NULL,'active','2026-01-21 08:59:47','2026-01-21 08:59:47',NULL),('5eb8115a-aeb4-43a5-b425-6189ba247bdc','9ee05e5c-a7e5-4435-bdcd-89a38c1ea864','6e91af17-5625-46cb-9d99-ab2919c5a364',334368.00,'2026-03-28',NULL,'active','2026-03-28 08:06:48','2026-03-28 08:06:48',NULL),('66fad9fe-611d-4834-b39c-e916fb27b925','70a5e13a-e631-4e23-97e4-ffc99fecce86','120bed8b-2edc-42aa-acd0-e86c14548389',371520.00,'2026-03-25',NULL,'active','2026-03-25 10:02:23','2026-03-25 10:02:23',NULL),('69ec9db1-6c8a-4f12-a1a1-7827916ed3e7','dcd443ee-31f4-475e-a170-66c860e46abb','84fd0360-5326-4ad4-b595-7c038c8480ab',350000.00,'2026-01-21',NULL,'active','2026-01-21 12:43:05','2026-01-21 12:43:05',NULL),('746133bf-bc85-4078-8fb1-7e8cf593272b','c002a3a9-59d3-4a70-83e4-cd4de7ff3120','bd17fdd3-2034-4281-b505-7da70c675772',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:25:38','2026-03-28 10:25:38',NULL),('7685efc9-2840-4344-b750-207848051bed','0ce29044-b626-407b-8000-d0ec38b721d4','e518599c-0c07-4947-980f-154cdb9049e9',657627.00,'2026-01-20',NULL,'active','2026-01-20 17:10:35','2026-01-20 17:10:35',NULL),('7d731dc8-d619-4d6b-a163-ef96666d0847','ee29c4ea-996d-4700-923c-b211ebed5d1c','3d560a52-5d03-4618-9470-47101e4b4a2f',550333.00,'2026-01-21',NULL,'active','2026-01-21 09:46:43','2026-01-21 09:46:43',NULL),('83ec6957-76bb-4d3b-83bb-3f54110ba6c1','38299f6f-f7a0-4a56-992e-0801c3465bee','6498fbe8-3bfc-43dc-a1cf-7e46c115f165',290250.00,'2026-03-28',NULL,'active','2026-03-28 08:14:10','2026-03-28 08:14:10',NULL),('88879e03-7aaa-4123-8890-b59f875ec98b','98c2d0b8-3b99-4124-86cd-e7ebdcbf2008','85e80c2a-78aa-4e17-9e27-7078dd0f3828',299925.00,'2026-03-28',NULL,'active','2026-03-28 10:38:01','2026-03-28 10:38:01',NULL),('88ea7af7-2d0c-487b-9b05-73dbf1113108','c46baf4c-948f-4062-8bb5-401031673d48','2327a03e-796f-4ba3-b6db-0ae5854f2df9',299925.00,'2026-03-28',NULL,'active','2026-03-28 10:40:09','2026-03-28 10:40:09',NULL),('8a27d21e-62db-42a8-8881-c2d48a8f60de','19620d50-9361-419d-b9af-b1ffca33c082','50ddf3de-259b-43ec-88b5-da62b3b36202',939181.00,'2026-03-23',NULL,'active','2026-03-23 16:38:10','2026-03-23 16:38:10',NULL),('969c968c-8e88-4861-bc28-c130208186af','4d11e3ed-b531-4199-bf1d-b184e8b50514','097cfb86-381a-4e26-b266-267eea6be00b',334368.00,'2026-03-25','2026-03-28','inactive','2026-03-25 09:27:09','2026-03-28 08:59:21',NULL),('9d199118-80e7-4563-bfaf-2c017108cee0','11bc2a55-e7ed-46b7-9c03-aa9db4edce76','097cfb86-381a-4e26-b266-267eea6be00b',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:18:22','2026-03-28 10:18:22',NULL),('aa59c352-b5db-4ebb-bf94-a5fa92008181','e284b1b2-4827-4fd2-bfac-667ba388503c','4c595f75-34aa-4f7f-9cad-893b884b0d9f',334368.00,'2026-03-28',NULL,'active','2026-03-28 08:52:16','2026-03-28 08:52:16',NULL),('b3e08c59-204d-4a58-8113-65260a8aa007','b93d6dcc-79cd-4a45-aeca-1b647f9066d5','34c5305c-997b-42d3-9424-6e2c5419eacf',657627.00,'2026-01-20',NULL,'active','2026-01-20 17:03:02','2026-01-20 17:03:02',NULL),('b55dc6ae-64b5-4fed-9e98-968e342956ed','e7b2c658-b5c8-42c7-947a-96a2a42e2a63','8ef3f8a5-a0e4-46bc-8aa0-9d44327eb345',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:44:45','2026-03-28 09:44:45',NULL),('bc2fa872-d9ad-482c-863d-38e98c9a1b94','0d907abb-d962-40ae-92e8-cbad09d41a2d','e799ec36-ce06-4337-b794-550323754ff6',350000.00,'2026-01-21',NULL,'active','2026-01-21 12:39:11','2026-01-21 12:39:11',NULL),('bd29654e-7458-43ab-9712-e409489eb357','8a900fc0-37b9-4c0c-af6b-726f95ca22c7','581994b7-54e7-4b1b-9055-7a3f7cfd2b83',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:17:21','2026-03-28 09:17:21',NULL),('c0f0482e-8226-4e2d-a762-227d55a99c39','a47afd69-6fca-4b9f-9aa1-662a460cb8fa','8ddb04cc-6604-41d9-87b3-dfff8b1b2dd7',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:55:40','2026-03-28 09:55:40',NULL),('c1caf72d-f733-4104-8f97-1a06a582fa66','b22d4a77-aa25-46c8-9468-51ef5afcabea','34c5305c-997b-42d3-9424-6e2c5419eacf',657627.00,'2026-01-20',NULL,'active','2026-01-20 16:06:52','2026-01-20 16:06:52',NULL),('c1fd6143-61c2-4e0b-8ef0-ff1621673343','6b060b16-6f4c-438a-900b-bfc1ffa59037','f0901525-1ef8-449a-9963-e696ebbc7e7a',250000.00,'2026-03-28',NULL,'active','2026-03-28 11:10:16','2026-03-28 11:10:16',NULL),('c298d848-08d3-4f5a-8244-74aa8cc9a5b6','c5e5b9f4-02de-4ed0-9e82-c5c4a521ffc8','13854cf4-61d0-49d8-9873-770fb08ec699',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:10:48','2026-03-28 10:10:48',NULL),('c628d9e6-10e2-4370-989f-9412e41c5fb6','b9b7c65d-1f3e-49f1-9cc2-89a6e4fbf6c7','a821e962-9e0e-4722-8c1e-79350346d1f9',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:13:06','2026-03-28 09:13:06',NULL),('c951c86d-0bdc-4446-be35-9458f88786ac','da920bce-a137-4294-b25f-dc2754ed00a9','e4656a0f-be6b-4c49-9b97-49cf1128e46d',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:29:22','2026-03-28 10:29:22',NULL),('d57725ed-0095-45ba-b3f3-8828969bedad','981f4aa5-af80-492d-9275-6a63c2dd2e7a','6f018a2a-8ea6-44ed-b170-77abc89e6e0e',435375.00,'2026-01-21',NULL,'active','2026-01-21 09:37:27','2026-01-21 09:37:27',NULL),('d8d61832-d3b5-437b-8f3e-83e21d8cb091','4d11e3ed-b531-4199-bf1d-b184e8b50514','c9eff2c4-3d4f-4567-bf8b-434c6ab1a53b',0.00,'2026-03-28',NULL,'active','2026-03-28 08:59:21','2026-03-28 08:59:21',NULL),('e0e5df64-a86a-4d5a-be3c-c91fb6627971','e0f5cdb7-b25a-4836-a385-9aca149a0658','852659e9-c33f-4c6b-9453-63cecc33a75c',751429.00,'2026-03-25',NULL,'active','2026-03-25 09:39:07','2026-03-25 09:39:07',NULL),('e8469821-4c46-492b-98bd-f575e395541c','cf3296c3-8deb-4e6c-af8b-183a669a492d','4352b5b9-ec63-4591-b617-9c09d9106ce1',334368.00,'2026-03-28',NULL,'active','2026-03-28 09:40:41','2026-03-28 09:40:41',NULL),('fac3a298-f53c-432d-ac0a-71d61bb64715','fdfac28a-3300-4fd9-ae21-757f66952b3b','ad0c4a32-2ba7-4f1f-9e40-4a591be9d1d7',334368.00,'2026-03-28',NULL,'active','2026-03-28 10:15:34','2026-03-28 10:15:34',NULL);

--
-- Table structure for table `employee_trainings`
--

CREATE TABLE `employee_trainings` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `training_program_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `completion_date` date DEFAULT NULL,
  `status` enum('Enrolled','Completed','Failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Enrolled',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_trainings_employee_id_foreign` (`employee_id`),
  KEY `employee_trainings_training_program_id_foreign` (`training_program_id`),
  CONSTRAINT `employee_trainings_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_trainings_training_program_id_foreign` FOREIGN KEY (`training_program_id`) REFERENCES `training_programs` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_trainings`
--


--
-- Table structure for table `employee_warehouse`
--

CREATE TABLE `employee_warehouse` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_warehouse_employee_id_foreign` (`employee_id`),
  CONSTRAINT `employee_warehouse_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_warehouse`
--


--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `biometric_user_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employee_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `other_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `official_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gender` enum('male','female') COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_of_birth` date DEFAULT NULL,
  `marital_status` enum('single','married','divorced','widowed') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employment_type` enum('full_time','part_time','contract') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'full_time',
  `salutation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` text COLLATE utf8mb4_unicode_ci,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postal_code` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hire_date` date DEFAULT NULL,
  `termination_date` date DEFAULT NULL,
  `tax_identification_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `designation_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `salary_structure_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `job_title_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bassic_salary` decimal(15,2) NOT NULL DEFAULT '0.00',
  `commission` decimal(15,2) NOT NULL DEFAULT '0.00',
  `overtime_rate` decimal(20,2) DEFAULT NULL,
  `supervisor_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('active','inactive','terminated','resigned') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employees_user_id_foreign` (`user_id`),
  KEY `employees_salary_structure_id_foreign` (`salary_structure_id`),
  KEY `employees_designation_id_foreign` (`designation_id`),
  KEY `employees_supervisor_id_foreign` (`supervisor_id`),
  CONSTRAINT `employees_designation_id_foreign` FOREIGN KEY (`designation_id`) REFERENCES `designations` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employees_salary_structure_id_foreign` FOREIGN KEY (`salary_structure_id`) REFERENCES `salary_structures` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employees_supervisor_id_foreign` FOREIGN KEY (`supervisor_id`) REFERENCES `employees` (`id`) ON DELETE SET NULL,
  CONSTRAINT `employees_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` VALUES ('0689a7df-1792-4ec3-8596-9d4ffb6efa69','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'001','Veridco','Veridoc','nullable','veritest@2025',NULL,'256702771124','male','2008-08-08','married','full_time','Mr',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,NULL,NULL,'09ba2537-d2ac-4b24-99f1-9710a9848540','active','2026-01-20 02:08:22','2026-01-20 02:08:22',NULL),('0ce29044-b626-407b-8000-d0ec38b721d4','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-WEM5UV','Kelvin','Mrope','Peter','procurementofficer@shireculimited.co.tz',NULL,'+255 654 174 669','male','1992-11-11','single','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-11-18',NULL,NULL,NULL,NULL,'d982aa7b-8b1b-4061-b973-214812f964fb','e518599c-0c07-4947-980f-154cdb9049e9',NULL,0.00,0.00,NULL,NULL,'db76612e-7eae-40e5-83c9-78f38ed17581','active','2026-01-20 17:10:35','2026-01-20 17:10:35',NULL),('0d907abb-d962-40ae-92e8-cbad09d41a2d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-1HJJKA','Kheri','Kakolwa','Hassan','kherihassan@gmail.com',NULL,'+255 756 877 767','male','1969-02-19','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2026-01-01',NULL,NULL,NULL,NULL,'fa54abc8-a873-436c-91fd-ac4de9134c67','e799ec36-ce06-4337-b794-550323754ff6',NULL,0.00,0.00,NULL,NULL,'56f0fcd2-4fa1-463a-9997-2db1a78c7b2c','active','2026-01-21 12:39:11','2026-01-21 12:39:11',NULL),('1035d30f-a9e7-40de-bdfb-d8dfca74bf22','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-D2MQZJ','Ramadhan','Katto','Khamis','ramadhankatto@gmail.com',NULL,'+255 754 010 095','male','1964-08-20','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2013-07-01',NULL,NULL,NULL,NULL,'0d07ec22-6f9c-4472-83aa-e7037a22d532','5363e2b7-8e9c-4e4a-9404-561a224e3449',NULL,0.00,0.00,NULL,NULL,'0541c03e-a05a-443d-bda1-4ad252451421','active','2026-01-22 13:26:01','2026-01-22 13:26:01',NULL),('11bc2a55-e7ed-46b7-9c03-aa9db4edce76','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-A50I1N','Marco','Kambilo','Mazoya','marcomazoya@gmail.com',NULL,'0765786745','male','1999-05-26','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','097cfb86-381a-4e26-b266-267eea6be00b',NULL,0.00,0.00,NULL,NULL,'74577dd5-601a-4d0f-82fc-a1481f8d90bf','active','2026-03-28 10:18:22','2026-03-28 10:18:22',NULL),('19620d50-9361-419d-b9af-b1ffca33c082','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-B6TLLV','Rachel','Mahona','Matondo','rachelmahona@gmail.com',NULL,'0753975990','female','1972-03-11','married','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2008-06-12',NULL,NULL,NULL,NULL,'baa5d666-a262-4918-a4c5-81a4d1d79411','50ddf3de-259b-43ec-88b5-da62b3b36202',NULL,0.00,0.00,NULL,NULL,'b71ed933-ddb0-4b55-8bb9-370c5bd726e6','active','2026-03-23 16:38:10','2026-03-23 16:38:10',NULL),('2ace294d-a1ba-4d55-8431-5f6c8c001575','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-KGJVIA','Petro','Petro','Yona','petroyona@gmail.com',NULL,'0786453421','male','1977-05-17','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','6dc66e08-eed7-4f3b-aab2-b305731c9994',NULL,0.00,0.00,NULL,NULL,'70e07d4e-6f13-48bc-a1e6-4c559574b384','active','2026-03-28 09:20:45','2026-03-28 09:20:45',NULL),('32b66d4d-b771-4092-8897-c827b37e1d1d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-0RN71K','Francis','Kilala','Lolela','francislolela@gmail.com',NULL,'+255 753 232 471','male','1972-08-07','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2009-08-17',NULL,NULL,NULL,NULL,'0d07ec22-6f9c-4472-83aa-e7037a22d532','110cfbfe-01ce-4213-bf58-e6f129b93be7',NULL,0.00,0.00,NULL,NULL,'4da4c3ce-1098-40fa-aac2-30fb73b43301','active','2026-01-21 09:56:11','2026-01-21 09:56:11',NULL),('38299f6f-f7a0-4a56-992e-0801c3465bee','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-P9W8B1','Esther','Damas','Manyama','estherdamas@gmail.com',NULL,'0759931606','female','1993-12-24','single','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-20',NULL,NULL,NULL,NULL,'f70758e2-c758-4584-8379-988acc55408d','6498fbe8-3bfc-43dc-a1cf-7e46c115f165',NULL,0.00,0.00,NULL,NULL,'97014f95-e102-4f16-9495-0447d9813b2d','active','2026-03-28 08:14:10','2026-03-28 08:14:10',NULL),('3de7c572-94cb-4a65-b30e-ba55d6c94893','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-1S6QLZ','Thomas','Merengo','Ernest','finance@shireculimited.co.tz',NULL,'+255 746 067 712','male','1986-11-06','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-11-18',NULL,NULL,NULL,NULL,'f2fc0c62-ef2b-4a7e-9f64-7373362afa9a','0b4c3c30-afcb-4cf4-ba03-79fe8d409d7d',NULL,0.00,0.00,NULL,NULL,'cc10bd7e-9f0e-453d-bece-e76872f0854f','active','2026-01-21 08:46:21','2026-01-21 08:46:21',NULL),('3eb8d5ea-6c38-45dd-a4fd-e2804cb51709','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-H6YVTK','James','Kadesha','Kumalija','jameskadesha@gmail.com',NULL,'0766047276','male','1972-12-02','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-03-12',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','6a22adb0-c0ce-4de1-871d-df76c1cf2615',NULL,0.00,0.00,NULL,NULL,'bf745f6a-be55-4dfb-852a-db4114594f6a','active','2026-03-28 08:20:57','2026-03-28 08:20:57',NULL),('4d11e3ed-b531-4199-bf1d-b184e8b50514','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-AZLWQQ','Masele','Kunji','Michael','maselekunji@gmail.com',NULL,'0718234726','male','1967-07-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'1998-05-01',NULL,NULL,NULL,NULL,'3851cc29-63a7-429b-a5c3-209a349988f4','c9eff2c4-3d4f-4567-bf8b-434c6ab1a53b',NULL,0.00,0.00,NULL,NULL,'03e8e97b-cff4-4949-b409-4c3dc6976352','active','2026-03-25 09:27:09','2026-03-28 08:59:21',NULL),('6b060b16-6f4c-438a-900b-bfc1ffa59037','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-2UM0WQ','Happiness','Seleman','Simon','happinesssimon@gmail.com',NULL,'0684350917','female','2001-02-17','single','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2025-04-20',NULL,NULL,NULL,NULL,'ffe28d16-be0a-4de8-8d3f-4e4b47edb6ee','f0901525-1ef8-449a-9963-e696ebbc7e7a',NULL,0.00,0.00,NULL,NULL,'752b1990-a3a0-416e-8555-dde2e561d606','active','2026-03-28 11:10:16','2026-03-28 11:28:16',NULL),('70a5e13a-e631-4e23-97e4-ffc99fecce86','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-WZ1QPR','Charles','Sumbula','William','charlessumbula@gmail.com',NULL,'0654645436','male','1967-04-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','120bed8b-2edc-42aa-acd0-e86c14548389',NULL,0.00,0.00,NULL,NULL,'703c8f89-e05f-41a5-8f09-8577bb4651da','active','2026-03-25 10:02:23','2026-03-25 10:02:23',NULL),('7615b56e-429a-4d5c-afed-4aa410ad6065','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-0LCDPZ','Amon','Mahimbo','Stephen','amonmahimbo@gmail.com',NULL,'0755784910','male','1964-12-31','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'1989-07-08',NULL,NULL,NULL,NULL,'f9b50f3f-fb3e-471a-a870-31399c1f3c4a','8322b7b1-5702-47d3-a43d-3de3aef60a66',NULL,0.00,0.00,NULL,NULL,'c447ffdc-83d1-4be4-9173-9f902f150b17','active','2026-03-25 09:13:19','2026-03-25 09:13:19',NULL),('83e663a1-ab0b-43f1-a51a-5b8c7da1c5f1','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-BNODLS','Emmanuel','Jidamabi','Ng\'wala','emmanuelngwala@gmail.com',NULL,'0687375396','male','1972-05-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','69675274-50af-45de-ad94-8f4f6bd85cac',NULL,0.00,0.00,NULL,NULL,'4d9d6020-cde2-4d2a-9eaf-99f743355dc4','active','2026-03-28 08:29:44','2026-03-28 08:29:44',NULL),('87e9a262-4599-404f-939f-52a2f96e73c0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-QILZWF','Malaba','Jayoga','Nyanga','malabanyanga@gmail.com',NULL,'0675652345','male','1977-02-22','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','079dbf55-261d-409b-8fab-884d15b48b0b',NULL,0.00,0.00,NULL,NULL,'75d6ab45-acef-4895-b6aa-4139f5c7736c','active','2026-03-28 09:07:32','2026-03-28 09:07:32',NULL),('8a900fc0-37b9-4c0c-af6b-726f95ca22c7','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-MX9JQP','Jacob','Petro','Yona','jacobyona@gmail.com',NULL,'0675324356','male','1979-02-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','581994b7-54e7-4b1b-9055-7a3f7cfd2b83',NULL,0.00,0.00,NULL,NULL,'bd9dd1a0-80de-464b-86fe-25c24d168077','active','2026-03-28 09:17:21','2026-03-28 09:17:21',NULL),('8bfd9388-5103-4907-825e-6eddc7eb80b6','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-D5A9PU','Benard','Maduhu','M','benardmaduhu@gmail.com',NULL,'0765432156','male','1980-05-07','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','a88e79ac-b1fc-41ab-a4e3-38448714f332',NULL,0.00,0.00,NULL,NULL,'c323136d-78d6-4bec-b345-16bda3eedfa1','active','2026-03-28 10:22:12','2026-03-28 10:22:12',NULL),('8da02e05-26aa-45cb-bbfd-54dc0896cb23','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-C4E2PO','Robert','Katumbi','Nathan','robertkatumbi@gmail.com',NULL,'0766289881','male','1974-07-13','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2009-01-21',NULL,NULL,NULL,NULL,'0d07ec22-6f9c-4472-83aa-e7037a22d532','5dce9633-606f-464b-b036-ef7fb3d271e3',NULL,0.00,0.00,NULL,NULL,'be107e9c-0371-422c-a39b-9e0e24539880','active','2026-03-25 09:47:21','2026-03-25 09:47:21',NULL),('96455ad8-19dc-4d71-ac7c-19e23d7b3e0c','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-RLSNDI','Alpha','Makasi','Joab','gm@shireculimited.co.tz',NULL,'+255 753 142 348','male','1993-08-23','married','full_time','Mr','P.O.Box , Dodoma',NULL,'Dodoma',NULL,'Tanzania',NULL,'2025-03-31',NULL,NULL,NULL,NULL,'6bd78016-e491-47b7-825d-83905a27f2d9','b053c22f-567a-45fa-8d19-7ee142b28fa1',NULL,0.00,0.00,NULL,NULL,'8c855c64-34dd-4970-a80c-77f1b73be813','active','2026-01-20 16:42:13','2026-01-20 16:42:13',NULL),('981f4aa5-af80-492d-9275-6a63c2dd2e7a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-SECEWU','Happiness','Kabogo','Henry','happinesskabogo@gmail.com',NULL,'+255 784 396 346','female','1990-06-25','single','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-10-27',NULL,NULL,NULL,NULL,'2b667163-4234-46a5-be18-33bb04d91da0','6f018a2a-8ea6-44ed-b170-77abc89e6e0e',NULL,0.00,0.00,NULL,NULL,'3b2f297e-c981-4415-b303-42496eedcbb0','active','2026-01-21 09:37:27','2026-01-21 09:47:11',NULL),('98c2d0b8-3b99-4124-86cd-e7ebdcbf2008','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-NY99FE','Luponya','Shimba','S','luponyashimba@gmail.com',NULL,'0788976534','male','1982-05-26','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','85e80c2a-78aa-4e17-9e27-7078dd0f3828',NULL,0.00,0.00,NULL,NULL,'7a04c448-8902-4abd-82d5-3bfcba78e9fe','active','2026-03-28 10:38:01','2026-03-28 10:38:01',NULL),('9ee05e5c-a7e5-4435-bdcd-89a38c1ea864','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-C9KKCS','Dashi','Nshoka','Kwangu','dashinshoka@gmail.com',NULL,'0784096820','male','1972-03-28','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2021-08-06',NULL,NULL,NULL,NULL,'2570de6e-430e-4000-b727-d4ba7458f806','6e91af17-5625-46cb-9d99-ab2919c5a364',NULL,0.00,0.00,NULL,NULL,'042baf55-b9fd-4189-bf60-bc3426ae6504','active','2026-03-28 08:06:48','2026-03-28 08:06:48',NULL),('a47afd69-6fca-4b9f-9aa1-662a460cb8fa','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-NZ3TXI','Silvester','Malegi','Ngusa','silvestermalegi@gmail.com',NULL,'07676754354','male','1983-08-10','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','8ddb04cc-6604-41d9-87b3-dfff8b1b2dd7',NULL,0.00,0.00,NULL,NULL,'58d73f72-2ec2-4899-a61a-31fae0a06e36','active','2026-03-28 09:55:40','2026-03-28 09:55:40',NULL),('ae5cffdf-ca73-4ef7-bfac-610c18644912','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-1K8AFV','Joyce','Sichembe','Andison','joycesichembe@gmail.com',NULL,'0612592055','female','1988-07-19','single','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2025-11-10',NULL,NULL,NULL,NULL,'f70758e2-c758-4584-8379-988acc55408d','1e51402f-9eea-4eeb-b46b-297252481909',NULL,0.00,0.00,NULL,NULL,'66c451b2-a7c4-4a22-95a8-34c3d0e5413b','active','2026-03-28 11:14:13','2026-03-28 11:14:13',NULL),('b22d4a77-aa25-46c8-9468-51ef5afcabea','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'007','Wilson','Gatani','Titus','itsupport@shireculimited.co.tz',NULL,'+255 653 532 145','male','1995-04-12','single','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-11-18',NULL,NULL,NULL,NULL,'adc8b598-06f0-4286-a11d-c45ce5a4e5f0','34c5305c-997b-42d3-9424-6e2c5419eacf',NULL,0.00,0.00,NULL,NULL,'2f53812f-395f-46da-97cd-1b2a21aa41da','active','2026-01-20 16:06:52','2026-01-20 16:06:52',NULL),('b93d6dcc-79cd-4a45-aeca-1b647f9066d5','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-JU7UM6','HR','ADM',NULL,'hrofficer@shireculimited.co.tz',NULL,'+255 653 532 145','male','1995-04-12','single','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-08-06',NULL,NULL,NULL,NULL,'89e7a23c-c415-451f-b753-2ceab2051012','34c5305c-997b-42d3-9424-6e2c5419eacf',NULL,0.00,0.00,NULL,NULL,'ffd625c8-6186-446c-bff1-6983463bdabd','active','2026-01-20 17:03:02','2026-01-20 17:03:02',NULL),('b9b7c65d-1f3e-49f1-9cc2-89a6e4fbf6c7','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-UXQTWE','Sande','Luhende','Robert','sanderobert@gmail.com',NULL,'0657564365','male','1974-05-08','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','a821e962-9e0e-4722-8c1e-79350346d1f9',NULL,0.00,0.00,NULL,NULL,'09d0c22e-ff8a-4f3e-b3f7-f63d6ddd4e30','active','2026-03-28 09:13:06','2026-03-28 09:13:06',NULL),('c002a3a9-59d3-4a70-83e4-cd4de7ff3120','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-XKREQH','Leonard','Watosha','P','leonardwatosha@gmail.com',NULL,'0765896758','male','1971-05-27','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','bd17fdd3-2034-4281-b505-7da70c675772',NULL,0.00,0.00,NULL,NULL,'652c213d-d058-471a-86e4-18fad2b8fa26','active','2026-03-28 10:25:38','2026-03-28 10:25:38',NULL),('c46baf4c-948f-4062-8bb5-401031673d48','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-ST6YMX','Daniel','Simbila','S','danielsimbila@gmail.com',NULL,'0767675435','male','1977-05-25','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','2327a03e-796f-4ba3-b6db-0ae5854f2df9',NULL,0.00,0.00,NULL,NULL,'d8a7b6cb-30b3-41af-b647-57d388cb7f02','active','2026-03-28 10:40:09','2026-03-28 10:40:09',NULL),('c4eaf525-c9e9-465b-a06b-a40f9979dee0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-PPMEBG','Joseph','Bukombe','Julius','internalauditor@shireculimited.co.tz',NULL,'+255 255 785 407 479','male','1988-05-12','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-11-18',NULL,NULL,NULL,NULL,'6c8a081f-e750-49d0-b609-e6c2ef1f9036','dab4f876-0adf-436c-bc41-1b7c74998bee',NULL,0.00,0.00,NULL,NULL,'98eae2f6-6d69-4078-b187-e95f8187ee80','active','2026-01-21 08:59:47','2026-01-21 08:59:47',NULL),('c5e5b9f4-02de-4ed0-9e82-c5c4a521ffc8','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-UZC9HV','Joseph','Manyilizu','M','josephmanyilizu@gmail.com',NULL,'0765453425','male','1979-05-23','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','13854cf4-61d0-49d8-9873-770fb08ec699',NULL,0.00,0.00,NULL,NULL,'8bd364f7-8731-4dee-9fd8-bff490392814','active','2026-03-28 10:10:48','2026-03-28 10:10:48',NULL),('cf3296c3-8deb-4e6c-af8b-183a669a492d','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-D2FYCJ','Stephano','Chalya','Chalya','stephanochalya@gmail.com',NULL,'0756453256','male','1988-05-25','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','4352b5b9-ec63-4591-b617-9c09d9106ce1',NULL,0.00,0.00,NULL,NULL,'9bb53385-d6ac-41d3-9647-220cb8b08442','active','2026-03-28 09:40:41','2026-03-28 09:40:41',NULL),('d2fc8698-04df-4591-8c9e-72124f6bf94e','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-VAM5S6','OT','Manager',NULL,'operationmanager@shireculimited.co.tz',NULL,'+255 653 532 145','male','1993-02-17','single','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2024-04-01',NULL,NULL,NULL,NULL,'53ff1e3e-dcf8-4db9-845c-165715d968b5','34c5305c-997b-42d3-9424-6e2c5419eacf',NULL,0.00,0.00,NULL,NULL,'a3fc9881-c570-4a43-86cc-e5dc3f465f39','active','2026-01-20 16:57:29','2026-01-20 16:57:29',NULL),('d7f48a45-6fef-4fc8-b6a0-7a2de5a994b6','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-PPP5RI','Joseph','Lugembe','Masanilo','josephlugembe@gmail.com',NULL,'0654543246','male','1987-05-26','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','0761baec-c2b4-46fa-b480-0ac5d7a36806',NULL,0.00,0.00,NULL,NULL,'dc973442-332f-4762-b364-5d4d38a77e4d','active','2026-03-28 09:52:20','2026-03-28 09:52:20',NULL),('da920bce-a137-4294-b25f-dc2754ed00a9','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-BMYTW2','Juma','Fikiri','Mussa','mussafikiri@gmail.com',NULL,'0688976001','male','1980-05-07','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','e4656a0f-be6b-4c49-9b97-49cf1128e46d',NULL,0.00,0.00,NULL,NULL,'12ba56ea-49eb-4243-a32d-fcec6d799e47','active','2026-03-28 10:29:22','2026-03-28 10:29:22',NULL),('dcd443ee-31f4-475e-a170-66c860e46abb','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-CQDVUG','John','Mipawa',NULL,'johnmipawa@gmail.com',NULL,'+255 784 983 516','male','1968-07-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2025-11-01',NULL,NULL,NULL,NULL,'fa54abc8-a873-436c-91fd-ac4de9134c67','84fd0360-5326-4ad4-b595-7c038c8480ab',NULL,0.00,0.00,NULL,NULL,'19b12682-3f57-4ff3-99b7-a0d2e565b861','active','2026-01-21 12:43:05','2026-01-21 12:43:05',NULL),('e0f5cdb7-b25a-4836-a385-9aca149a0658','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-BYEEEB','Edson','Ngulimi','Sang\'udi','edsonngulimi@gmail.com',NULL,'0715466501','male','1967-07-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'1996-05-01',NULL,NULL,NULL,NULL,'0d07ec22-6f9c-4472-83aa-e7037a22d532','852659e9-c33f-4c6b-9453-63cecc33a75c',NULL,0.00,0.00,NULL,NULL,'721556ed-61a0-4f9b-9132-7c09efba5bc0','active','2026-03-25 09:39:07','2026-03-25 09:39:07',NULL),('e284b1b2-4827-4fd2-bfac-667ba388503c','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-V6DK4M','Ngassa','Ngassa','Machimu','ngassamachimu@gmail.com',NULL,'0765562345','male','1967-05-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','4c595f75-34aa-4f7f-9cad-893b884b0d9f',NULL,0.00,0.00,NULL,NULL,'683bd77b-e8ea-4d01-8069-7fd5348dcbcd','active','2026-03-28 08:52:16','2026-03-28 08:52:16',NULL),('e7b2c658-b5c8-42c7-947a-96a2a42e2a63','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-RIZCZV','Mkonga','Luhende','L','mkongaluhende@gmail.com',NULL,'0675653426','male','1989-05-01','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','8ef3f8a5-a0e4-46bc-8aa0-9d44327eb345',NULL,0.00,0.00,NULL,NULL,'bf5d9a00-49d7-4248-8892-42294cdcc560','active','2026-03-28 09:44:45','2026-03-28 09:44:45',NULL),('e8387630-4ccf-4ad5-ace9-ef996b9d5f13','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-JTLZ2F','Amiri','Salum','Mwarabu','amirimwarabu@gmail.com',NULL,'0655900365','male','1989-05-16','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'65f19ba8-7c26-46d2-92f8-19b8d4f7fb2e','2f86156e-7bfd-47d7-9f37-1707f347045c',NULL,0.00,0.00,NULL,NULL,'4afd55da-fd3b-4e31-9abe-a1d5b68aff95','active','2026-03-28 10:34:51','2026-03-28 11:35:14',NULL),('ee29c4ea-996d-4700-923c-b211ebed5d1c','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-IY2UJL','Selina','Matembe','Michael','selinamichael@gmail.com',NULL,'+255 786 479 649','female','1969-05-01','married','full_time','Miss','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'1989-12-01',NULL,NULL,NULL,NULL,'84652bfc-15d1-43f1-8a1b-dbc45fb72e75','3d560a52-5d03-4618-9470-47101e4b4a2f',NULL,0.00,0.00,NULL,NULL,'b1c6259e-e057-4907-8b10-c122e80820f7','active','2026-01-21 09:46:43','2026-01-21 09:46:43',NULL),('f3683bee-094b-4aa6-8163-8d418a27eb6a','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'001','Alfred','Platin','nullable','mplat84@gmail.com',NULL,'256702771124','male','2008-08-08','married','full_time','Mr',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,NULL,NULL,'768bae0b-3b3f-476e-b7a9-4529fa1f9158','active','2026-01-20 02:08:21','2026-01-20 02:08:21',NULL),('fdfac28a-3300-4fd9-ae21-757f66952b3b','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',NULL,'EMP-QNTUUF','William','Kitebi','K','williamkitebi@gmail.com',NULL,'0767865435','male','1979-08-28','married','full_time','Mr','P.O.Box 349, Shinyanga,  Miti Mirefu Street',NULL,'Shinyanga',NULL,'Tanzania',NULL,'2020-04-01',NULL,NULL,NULL,NULL,'1334f6c9-ba92-4d16-9122-9b7d84905d28','ad0c4a32-2ba7-4f1f-9e40-4a591be9d1d7',NULL,0.00,0.00,NULL,NULL,'ec297908-a1c8-4817-9c76-652062d2c871','active','2026-03-28 10:15:34','2026-03-28 10:15:34',NULL);

--
-- Table structure for table `evaluation_criterias`
--

CREATE TABLE `evaluation_criterias` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `evaluation_criterias`
--


--
-- Table structure for table `exchange_rates`
--

CREATE TABLE `exchange_rates` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `base_currency_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `target_currency_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` decimal(20,8) NOT NULL,
  `effective_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_rate_per_day` (`base_currency_id`,`target_currency_id`,`effective_date`),
  KEY `exchange_rates_base_currency_id_index` (`base_currency_id`),
  KEY `exchange_rates_target_currency_id_index` (`target_currency_id`),
  KEY `exchange_rates_effective_date_index` (`effective_date`),
  CONSTRAINT `exchange_rates_base_currency_id_foreign` FOREIGN KEY (`base_currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `exchange_rates_target_currency_id_foreign` FOREIGN KEY (`target_currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `exchange_rates`
--

INSERT INTO `exchange_rates` VALUES ('78b38075-6172-4fa8-bd3d-68092142d178','53842f32-c752-4fa6-991c-28b35f4cc86c','0dedd890-3cdc-43ef-a08d-b25123f19e28',0.00040000,'2026-03-10','2026-03-10 21:55:10','2026-03-10 21:55:10',NULL),('9da0457d-0a90-47f4-b4ab-6cb66a2ec949','0dedd890-3cdc-43ef-a08d-b25123f19e28','53842f32-c752-4fa6-991c-28b35f4cc86c',2520.31000000,'2026-03-10','2026-03-10 21:55:10','2026-03-10 21:55:10',NULL);

--
-- Table structure for table `farmer_collected_weights`
--

CREATE TABLE `farmer_collected_weights` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `farmerUid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `productUid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gradeUid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouseUid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `memberType` enum('MEMBER','NON-MEMBER') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'MEMBER',
  `batchRef` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bags` int NOT NULL,
  `moistureInPercent` decimal(10,2) NOT NULL,
  `grossWeight` decimal(10,2) NOT NULL,
  `packageWeight` decimal(10,2) NOT NULL,
  `netWeight` decimal(10,2) NOT NULL,
  `receiptNo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `receiptDate` date NOT NULL,
  `clerkName` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `isFinalCollection` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `farmer_collected_weights`
--


--
-- Table structure for table `fee_ranges`
--

CREATE TABLE `fee_ranges` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `min_amount` decimal(12,2) NOT NULL,
  `max_amount` decimal(12,2) NOT NULL,
  `range_type` enum('Fixed','Percentage') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Percentage',
  `value` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fee_ranges_fee_id_foreign` (`fee_id`),
  CONSTRAINT `fee_ranges_fee_id_foreign` FOREIGN KEY (`fee_id`) REFERENCES `financing_fees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fee_ranges`
--


--
-- Table structure for table `file_activities`
--

CREATE TABLE `file_activities` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `folder_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_activities_file_id_foreign` (`file_id`),
  KEY `file_activities_folder_id_foreign` (`folder_id`),
  KEY `file_activities_employee_id_foreign` (`employee_id`),
  CONSTRAINT `file_activities_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  CONSTRAINT `file_activities_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE,
  CONSTRAINT `file_activities_folder_id_foreign` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_activities`
--


--
-- Table structure for table `file_comments`
--

CREATE TABLE `file_comments` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_comments_file_id_foreign` (`file_id`),
  KEY `file_comments_employee_id_foreign` (`employee_id`),
  KEY `file_comments_parent_id_foreign` (`parent_id`),
  CONSTRAINT `file_comments_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  CONSTRAINT `file_comments_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE,
  CONSTRAINT `file_comments_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `file_comments` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_comments`
--


--
-- Table structure for table `file_permissions`
--

CREATE TABLE `file_permissions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permissible_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permissible_id` bigint unsigned NOT NULL,
  `can_view` tinyint(1) NOT NULL DEFAULT '0',
  `can_download` tinyint(1) NOT NULL DEFAULT '0',
  `can_edit` tinyint(1) NOT NULL DEFAULT '0',
  `can_delete` tinyint(1) NOT NULL DEFAULT '0',
  `can_share` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `file_perm_unique` (`file_id`,`permissible_id`,`permissible_type`),
  KEY `file_permissions_permissible_type_permissible_id_index` (`permissible_type`,`permissible_id`),
  KEY `file_permissions_permissible_id_permissible_type_index` (`permissible_id`,`permissible_type`),
  CONSTRAINT `file_permissions_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_permissions`
--


--
-- Table structure for table `file_previews`
--

CREATE TABLE `file_previews` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `preview_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `format` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `width` int DEFAULT NULL,
  `height` int DEFAULT NULL,
  `size` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_previews_file_id_format_index` (`file_id`,`format`),
  CONSTRAINT `file_previews_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_previews`
--


--
-- Table structure for table `file_tags`
--

CREATE TABLE `file_tags` (
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tag_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`file_id`,`tag_id`),
  KEY `file_tags_tag_id_foreign` (`tag_id`),
  CONSTRAINT `file_tags_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE,
  CONSTRAINT `file_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_tags`
--


--
-- Table structure for table `file_versions`
--

CREATE TABLE `file_versions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `version_number` int NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `size` int NOT NULL,
  `created_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `changes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_versions_file_id_foreign` (`file_id`),
  KEY `file_versions_created_by_foreign` (`created_by`),
  CONSTRAINT `file_versions_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `employees` (`id`),
  CONSTRAINT `file_versions_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_versions`
--


--
-- Table structure for table `financing_applications`
--

CREATE TABLE `financing_applications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `application_ref` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `application_date` date NOT NULL,
  `requested_amount` decimal(20,2) NOT NULL,
  `approved_amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `requested_tenure_months` int NOT NULL,
  `purpose` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('Draft','Submitted','Under Review','Approved','Rejected','Disbursed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Draft',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `financing_applications_application_ref_unique` (`application_ref`),
  KEY `financing_applications_customer_id_foreign` (`customer_id`),
  KEY `financing_applications_product_id_foreign` (`product_id`),
  CONSTRAINT `financing_applications_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `financing_fees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `financing_applications_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `financing_fees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_applications`
--


--
-- Table structure for table `financing_approvals`
--

CREATE TABLE `financing_approvals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `financing_application_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approver_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('Pending','Approved','Reviewed','Rejected','Canceled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `approved_amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `record_date` date NOT NULL,
  `comments` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `financing_approvals_financing_application_id_foreign` (`financing_application_id`),
  KEY `financing_approvals_approver_id_foreign` (`approver_id`),
  KEY `financing_approvals_approval_level_id_foreign` (`approval_level_id`),
  CONSTRAINT `financing_approvals_approval_level_id_foreign` FOREIGN KEY (`approval_level_id`) REFERENCES `approval_levels` (`id`) ON DELETE CASCADE,
  CONSTRAINT `financing_approvals_approver_id_foreign` FOREIGN KEY (`approver_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `financing_approvals_financing_application_id_foreign` FOREIGN KEY (`financing_application_id`) REFERENCES `financing_applications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_approvals`
--


--
-- Table structure for table `financing_contracts`
--

CREATE TABLE `financing_contracts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contract_type` enum('Hire Purchase','Finance Lease','Operating Lease') COLLATE utf8mb4_unicode_ci NOT NULL,
  `application_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contract_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `principal_amount` decimal(12,2) NOT NULL,
  `interest_rate` decimal(5,2) NOT NULL,
  `total_repayment` decimal(12,2) NOT NULL,
  `payment_frequency` int NOT NULL,
  `status` enum('Active','Completed','Defaulted','Terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active',
  `terms_conditions` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `residual_value` decimal(12,2) NOT NULL DEFAULT '0.00',
  `has_balloon_payment` tinyint(1) NOT NULL DEFAULT '0',
  `balloon_payment_amount` decimal(12,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `financing_contracts_contract_number_unique` (`contract_number`),
  KEY `financing_contracts_application_id_foreign` (`application_id`),
  CONSTRAINT `financing_contracts_application_id_foreign` FOREIGN KEY (`application_id`) REFERENCES `financing_applications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_contracts`
--


--
-- Table structure for table `financing_fees`
--

CREATE TABLE `financing_fees` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `fee_type` enum('Fixed','Percentage','Range') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Percentage',
  `value` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_fees`
--


--
-- Table structure for table `financing_product_fees`
--

CREATE TABLE `financing_product_fees` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `financing_product_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `financing_product_fees_fee_id_foreign` (`fee_id`),
  KEY `financing_product_fees_financing_product_id_foreign` (`financing_product_id`),
  CONSTRAINT `financing_product_fees_fee_id_foreign` FOREIGN KEY (`fee_id`) REFERENCES `financing_fees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `financing_product_fees_financing_product_id_foreign` FOREIGN KEY (`financing_product_id`) REFERENCES `financing_products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_product_fees`
--


--
-- Table structure for table `financing_products`
--

CREATE TABLE `financing_products` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `min_tenure_months` int NOT NULL,
  `max_tenure_months` int NOT NULL,
  `min_amount` decimal(12,2) NOT NULL,
  `max_amount` decimal(12,2) NOT NULL,
  `interest_rate` decimal(5,2) NOT NULL,
  `interest_type` enum('Fixed','Variable') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financing_products`
--


--
-- Table structure for table `fiscal_years`
--

CREATE TABLE `fiscal_years` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `financial_year` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '0=Inactive, 1=Active, 2=Closed',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `profit_balance` decimal(18,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fiscal_years`
--

INSERT INTO `fiscal_years` VALUES ('20664a10-d692-43c0-8fa3-57776cb5cacc','2024/2025','2024-04-01','2025-03-31','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',2,NULL,'2026-03-10 21:55:11','2026-03-11 01:09:22',0.00),('474999f5-e3a4-473f-9ec3-6211fc872bf1','2025/2026','2025-04-01','2026-03-31','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',1,NULL,'2026-03-11 01:09:17','2026-03-11 01:09:22',0.00);

--
-- Table structure for table `folder_permissions`
--

CREATE TABLE `folder_permissions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `folder_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permissible_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permissible_id` bigint unsigned NOT NULL,
  `can_view` tinyint(1) NOT NULL DEFAULT '0',
  `can_create` tinyint(1) NOT NULL DEFAULT '0',
  `can_upload` tinyint(1) NOT NULL DEFAULT '0',
  `can_delete` tinyint(1) NOT NULL DEFAULT '0',
  `can_share` tinyint(1) NOT NULL DEFAULT '0',
  `inheritable` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `folder_perm_unique` (`folder_id`,`permissible_id`,`permissible_type`),
  KEY `folder_permissions_permissible_type_permissible_id_index` (`permissible_type`,`permissible_id`),
  KEY `folder_perm_index` (`permissible_id`,`permissible_type`),
  CONSTRAINT `folder_permissions_folder_id_foreign` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `folder_permissions`
--


--
-- Table structure for table `folders`
--

CREATE TABLE `folders` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `depth` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `folders_parent_id_foreign` (`parent_id`),
  CONSTRAINT `folders_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `folders`
--


--
-- Table structure for table `form_questions`
--

CREATE TABLE `form_questions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `form_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `question` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('Email','Text','Number','Decimal') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_questions`
--


--
-- Table structure for table `form_responses`
--

CREATE TABLE `form_responses` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `form_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `response` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_responses`
--


--
-- Table structure for table `forms`
--

CREATE TABLE `forms` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('draft','active','inactive','expired') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `forms`
--


--
-- Table structure for table `fuel_requisition_approvals`
--

CREATE TABLE `fuel_requisition_approvals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fuel_requisition_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approved_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('approved','rejected') COLLATE utf8mb4_unicode_ci NOT NULL,
  `approved_amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `comments` text COLLATE utf8mb4_unicode_ci,
  `date_approved` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fuel_requisition_approvals_fuel_requisition_id_foreign` (`fuel_requisition_id`),
  KEY `fuel_requisition_approvals_approved_by_foreign` (`approved_by`),
  KEY `fuel_requisition_approvals_approval_level_id_foreign` (`approval_level_id`),
  CONSTRAINT `fuel_requisition_approvals_approval_level_id_foreign` FOREIGN KEY (`approval_level_id`) REFERENCES `approval_levels` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fuel_requisition_approvals_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fuel_requisition_approvals_fuel_requisition_id_foreign` FOREIGN KEY (`fuel_requisition_id`) REFERENCES `fuel_requisitions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fuel_requisition_approvals`
--


--
-- Table structure for table `fuel_requisitions`
--

CREATE TABLE `fuel_requisitions` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `requisition_no` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `request_date` date NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `truck_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `budget_item_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `approved_amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `trip` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `current_approval_level` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_round_kilometers` decimal(10,2) NOT NULL DEFAULT '0.00',
  `reason` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `requested_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_quantity_fuel_used` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_mileage` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('Pending','Reviewed','Approved','Rejected','Disbursed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `disbursed_amount` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fuel_requisitions_requested_by_foreign` (`requested_by`),
  KEY `fuel_requisitions_department_id_foreign` (`department_id`),
  KEY `fuel_requisitions_budget_item_id_foreign` (`budget_item_id`),
  KEY `fuel_requisitions_project_id_foreign` (`project_id`),
  CONSTRAINT `fuel_requisitions_budget_item_id_foreign` FOREIGN KEY (`budget_item_id`) REFERENCES `budget_items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fuel_requisitions_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fuel_requisitions_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fuel_requisitions_requested_by_foreign` FOREIGN KEY (`requested_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fuel_requisitions`
--


--
-- Table structure for table `full_fillment_items`
--

CREATE TABLE `full_fillment_items` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fulfillment_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `store_requisition_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `inventory_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity_issued` decimal(10,2) NOT NULL,
  `issued_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `received_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `issued_at` datetime NOT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `full_fillment_items_fulfillment_id_foreign` (`fulfillment_id`),
  KEY `full_fillment_items_store_requisition_item_id_foreign` (`store_requisition_item_id`),
  KEY `full_fillment_items_issued_by_foreign` (`issued_by`),
  KEY `full_fillment_items_received_by_foreign` (`received_by`),
  CONSTRAINT `full_fillment_items_fulfillment_id_foreign` FOREIGN KEY (`fulfillment_id`) REFERENCES `requisition_full_fillments` (`id`),
  CONSTRAINT `full_fillment_items_issued_by_foreign` FOREIGN KEY (`issued_by`) REFERENCES `employees` (`id`),
  CONSTRAINT `full_fillment_items_received_by_foreign` FOREIGN KEY (`received_by`) REFERENCES `employees` (`id`),
  CONSTRAINT `full_fillment_items_store_requisition_item_id_foreign` FOREIGN KEY (`store_requisition_item_id`) REFERENCES `store_requisition_items` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `full_fillment_items`
--


--
-- Table structure for table `goods_receipt_items`
--

CREATE TABLE `goods_receipt_items` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `goods_receipt_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchase_order_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `received_quantity` decimal(20,2) NOT NULL,
  `accepted_quantity` decimal(20,2) NOT NULL DEFAULT '0.00',
  `rejected_quantity` decimal(20,2) NOT NULL DEFAULT '0.00',
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `goods_receipt_items_goods_receipt_id_foreign` (`goods_receipt_id`),
  KEY `goods_receipt_items_purchase_order_item_id_foreign` (`purchase_order_item_id`),
  CONSTRAINT `goods_receipt_items_goods_receipt_id_foreign` FOREIGN KEY (`goods_receipt_id`) REFERENCES `goods_receipts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `goods_receipt_items_purchase_order_item_id_foreign` FOREIGN KEY (`purchase_order_item_id`) REFERENCES `purchase_order_items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `goods_receipt_items`
--


--
-- Table structure for table `goods_receipts`
--

CREATE TABLE `goods_receipts` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchase_order_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `grn_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `received_date` date NOT NULL,
  `delivery_note_ref` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `received_by` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('pending_inspection','accepted','partially_accepted','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending_inspection',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `goods_receipts_grn_number_unique` (`grn_number`),
  KEY `goods_receipts_purchase_order_id_foreign` (`purchase_order_id`),
  CONSTRAINT `goods_receipts_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `goods_receipts`
--


--
-- Table structure for table `grades`
--

CREATE TABLE `grades` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `muvu_uid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `grades_product_id_foreign` (`product_id`),
  CONSTRAINT `grades_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `grades`
--


--
-- Table structure for table `grn_notes`
--

CREATE TABLE `grn_notes` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `delivery_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `grn_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `grn_date` timestamp NULL DEFAULT NULL,
  `grn_remarks` text COLLATE utf8mb4_unicode_ci,
  `grn_attachment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `received_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `grn_notes_delivery_id_foreign` (`delivery_id`),
  KEY `grn_notes_received_by_foreign` (`received_by`),
  KEY `grn_notes_created_by_foreign` (`created_by`),
  CONSTRAINT `grn_notes_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `grn_notes_delivery_id_foreign` FOREIGN KEY (`delivery_id`) REFERENCES `deliveries` (`id`) ON DELETE CASCADE,
  CONSTRAINT `grn_notes_received_by_foreign` FOREIGN KEY (`received_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `grn_notes`
--


--
-- Table structure for table `holiday_calendars`
--

CREATE TABLE `holiday_calendars` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `holiday_date` date NOT NULL,
  `holiday_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `holiday_calendars`
--


--
-- Table structure for table `input_loan_approvals`
--

CREATE TABLE `input_loan_approvals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_loan_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_loan_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approved_by_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `decision` enum('approved','rejected') COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `approved_at` timestamp NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_loan_approvals_input_loan_item_id_foreign` (`input_loan_item_id`),
  KEY `input_loan_approvals_input_loan_id_foreign` (`input_loan_id`),
  KEY `input_loan_approvals_approval_level_id_foreign` (`approval_level_id`),
  KEY `input_loan_approvals_approved_by_id_foreign` (`approved_by_id`),
  CONSTRAINT `input_loan_approvals_approval_level_id_foreign` FOREIGN KEY (`approval_level_id`) REFERENCES `approval_levels` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_loan_approvals_approved_by_id_foreign` FOREIGN KEY (`approved_by_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_loan_approvals_input_loan_id_foreign` FOREIGN KEY (`input_loan_id`) REFERENCES `input_loans` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_loan_approvals_input_loan_item_id_foreign` FOREIGN KEY (`input_loan_item_id`) REFERENCES `input_loan_items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_loan_approvals`
--


--
-- Table structure for table `input_loan_items`
--

CREATE TABLE `input_loan_items` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_loan_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_value` decimal(15,2) NOT NULL,
  `balance_due` decimal(15,2) NOT NULL,
  `status` enum('pending','approved','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_loan_items_input_loan_id_foreign` (`input_loan_id`),
  KEY `input_loan_items_item_id_foreign` (`item_id`),
  CONSTRAINT `input_loan_items_input_loan_id_foreign` FOREIGN KEY (`input_loan_id`) REFERENCES `input_loans` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_loan_items_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_loan_items`
--


--
-- Table structure for table `input_loans`
--

CREATE TABLE `input_loans` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `member_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `current_approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_value` decimal(15,2) NOT NULL DEFAULT '0.00',
  `balance_due` decimal(15,2) NOT NULL DEFAULT '0.00',
  `status` enum('pending','partially_paid','paid','overdue') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_loans_current_approval_level_id_foreign` (`current_approval_level_id`),
  CONSTRAINT `input_loans_current_approval_level_id_foreign` FOREIGN KEY (`current_approval_level_id`) REFERENCES `approval_levels` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_loans`
--


--
-- Table structure for table `input_request_approvals`
--

CREATE TABLE `input_request_approvals` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approver_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_request_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `approved_by_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_request_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('approved','rejected','reviewed','pending') COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `rejection_reason` text COLLATE utf8mb4_unicode_ci,
  `date_approved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_request_approvals_approval_level_id_foreign` (`approval_level_id`),
  KEY `input_request_approvals_approved_by_id_foreign` (`approved_by_id`),
  KEY `input_request_approvals_input_request_item_id_foreign` (`input_request_item_id`),
  KEY `input_request_approvals_input_request_id_index` (`input_request_id`),
  KEY `input_request_approvals_approver_id_index` (`approver_id`),
  KEY `input_request_approvals_status_index` (`status`),
  CONSTRAINT `input_request_approvals_approval_level_id_foreign` FOREIGN KEY (`approval_level_id`) REFERENCES `approval_levels` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_request_approvals_approved_by_id_foreign` FOREIGN KEY (`approved_by_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_request_approvals_input_request_id_foreign` FOREIGN KEY (`input_request_id`) REFERENCES `input_requests` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_request_approvals_input_request_item_id_foreign` FOREIGN KEY (`input_request_item_id`) REFERENCES `input_request_items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_request_approvals`
--


--
-- Table structure for table `input_request_items`
--

CREATE TABLE `input_request_items` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_request_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity_requested` decimal(10,2) NOT NULL,
  `uom` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity_approved` decimal(10,2) DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_request_items_input_request_id_foreign` (`input_request_id`),
  KEY `input_request_items_item_id_foreign` (`item_id`),
  KEY `input_request_items_uom_foreign` (`uom`),
  CONSTRAINT `input_request_items_input_request_id_foreign` FOREIGN KEY (`input_request_id`) REFERENCES `input_requests` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_request_items_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_request_items_uom_foreign` FOREIGN KEY (`uom`) REFERENCES `unit_of_measures` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_request_items`
--


--
-- Table structure for table `input_requests`
--

CREATE TABLE `input_requests` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `requested_by_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `requested_from_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `current_approval_level_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('pending','approved','reviewed','rejected','fulfilled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `approved_at` timestamp NULL DEFAULT NULL,
  `registered_by_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_requests_requested_by_id_foreign` (`requested_by_id`),
  KEY `input_requests_requested_from_id_foreign` (`requested_from_id`),
  KEY `input_requests_registered_by_id_foreign` (`registered_by_id`),
  CONSTRAINT `input_requests_registered_by_id_foreign` FOREIGN KEY (`registered_by_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_requests_requested_by_id_foreign` FOREIGN KEY (`requested_by_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_requests_requested_from_id_foreign` FOREIGN KEY (`requested_from_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_requests`
--


--
-- Table structure for table `input_transfers`
--

CREATE TABLE `input_transfers` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `from_organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `to_organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `input_request_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('transfer_in','transfer_out','return','writeoff') COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` enum('in','out') COLLATE utf8mb4_unicode_ci NOT NULL,
  `movement_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remarks` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('pending','received','dispatched','reversed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'received',
  `unique_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `input_transfers_input_request_id_foreign` (`input_request_id`),
  KEY `input_transfers_from_organisation_id_foreign` (`from_organisation_id`),
  KEY `input_transfers_to_organisation_id_foreign` (`to_organisation_id`),
  CONSTRAINT `input_transfers_from_organisation_id_foreign` FOREIGN KEY (`from_organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_transfers_input_request_id_foreign` FOREIGN KEY (`input_request_id`) REFERENCES `input_requests` (`id`) ON DELETE CASCADE,
  CONSTRAINT `input_transfers_to_organisation_id_foreign` FOREIGN KEY (`to_organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `input_transfers`
--


--
-- Table structure for table `insurance_providers`
--

CREATE TABLE `insurance_providers` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `provider_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_info` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `insurance_providers`
--


--
-- Table structure for table `interview_participants`
--

CREATE TABLE `interview_participants` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `interview_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_required` tinyint(1) NOT NULL DEFAULT '1',
  `response_status` enum('pending','accepted','declined') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `interview_participants_interview_id_foreign` (`interview_id`),
  KEY `interview_participants_employee_id_foreign` (`employee_id`),
  CONSTRAINT `interview_participants_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `interview_participants_interview_id_foreign` FOREIGN KEY (`interview_id`) REFERENCES `interviews` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `interview_participants`
--


--
-- Table structure for table `interviews`
--

CREATE TABLE `interviews` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `application_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `interviewer_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('phone','video','in‑person') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'phone',
  `status` enum('scheduled','completed','canceled','rescheduled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'scheduled',
  `scheduled_at` timestamp NOT NULL,
  `duration` int NOT NULL COMMENT 'Duration in minutes',
  `location` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `feedback` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `interviews_application_id_foreign` (`application_id`),
  KEY `interviews_interviewer_id_foreign` (`interviewer_id`),
  CONSTRAINT `interviews_application_id_foreign` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`) ON DELETE CASCADE,
  CONSTRAINT `interviews_interviewer_id_foreign` FOREIGN KEY (`interviewer_id`) REFERENCES `employees` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `interviews`
--


--
-- Table structure for table `inventories`
--

CREATE TABLE `inventories` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `supplier_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ref_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `received_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `quantity` decimal(10,2) NOT NULL DEFAULT '0.00',
  `damaged_quantity` decimal(10,2) NOT NULL DEFAULT '0.00',
  `reorder_level` int NOT NULL DEFAULT '10',
  `on_backorder` int NOT NULL DEFAULT '0',
  `expiry_date` date DEFAULT NULL,
  `reason_for_damage` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unique_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inventories_item_id_foreign` (`item_id`),
  KEY `inventories_supplier_id_foreign` (`supplier_id`),
  KEY `inventories_warehouse_id_foreign` (`warehouse_id`),
  CONSTRAINT `inventories_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventories_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventories_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventories`
--


--
-- Table structure for table `inventory_balances`
--

CREATE TABLE `inventory_balances` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `uom_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `period_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'monthly',
  `period` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `opening_balance` decimal(15,3) NOT NULL DEFAULT '0.000',
  `in_qty` decimal(15,3) NOT NULL DEFAULT '0.000',
  `out_qty` decimal(15,3) NOT NULL DEFAULT '0.000',
  `closing_balance` decimal(15,3) NOT NULL DEFAULT '0.000',
  `avg_unit_cost` decimal(15,4) DEFAULT NULL,
  `total_value` decimal(18,4) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_inventory_balance_period` (`organisation_id`,`warehouse_id`,`item_id`,`uom_id`,`period_type`,`period`),
  KEY `inventory_balances_warehouse_id_foreign` (`warehouse_id`),
  KEY `inventory_balances_item_id_foreign` (`item_id`),
  KEY `inventory_balances_uom_id_foreign` (`uom_id`),
  CONSTRAINT `inventory_balances_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventory_balances_organisation_id_foreign` FOREIGN KEY (`organisation_id`) REFERENCES `organisations` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventory_balances_uom_id_foreign` FOREIGN KEY (`uom_id`) REFERENCES `unit_of_measures` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inventory_balances_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_balances`
--


--
-- Table structure for table `inventory_configs`
--

CREATE TABLE `inventory_configs` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `receipt_disclaimer` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Goods once sold are not returned',
  `thankyou_message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Thank you for your business',
  `terms_and_conditions` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_configs`
--


--
-- Table structure for table `invoice_item_grn_matches`
--

CREATE TABLE `invoice_item_grn_matches` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `grn_item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `matched_quantity` decimal(20,4) NOT NULL DEFAULT '0.0000',
  `matched_amount` decimal(20,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `invoice_item_grn_matches_invoice_item_id_grn_item_id_unique` (`invoice_item_id`,`grn_item_id`),
  KEY `invoice_item_grn_matches_grn_item_id_foreign` (`grn_item_id`),
  CONSTRAINT `invoice_item_grn_matches_grn_item_id_foreign` FOREIGN KEY (`grn_item_id`) REFERENCES `grn_items` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `invoice_item_grn_matches_invoice_item_id_foreign` FOREIGN KEY (`invoice_item_id`) REFERENCES `purchase_invoice_items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_item_grn_matches`
--


--
-- Table structure for table `invoice_lines`
--

CREATE TABLE `invoice_lines` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `billable_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_type` enum('product','service','custom') COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uom_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_price` decimal(20,2) NOT NULL,
  `tax_pct` decimal(15,2) NOT NULL,
  `line_total` decimal(20,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_lines_invoice_id_foreign` (`invoice_id`),
  KEY `invoice_lines_uom_id_foreign` (`uom_id`),
  KEY `invoice_lines_item_id_foreign` (`item_id`),
  CONSTRAINT `invoice_lines_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `sale_invoices` (`id`) ON DELETE CASCADE,
  CONSTRAINT `invoice_lines_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `invoice_lines_uom_id_foreign` FOREIGN KEY (`uom_id`) REFERENCES `unit_of_measures` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_lines`
--


--
-- Table structure for table `invoice_number_sequences`
--

CREATE TABLE `invoice_number_sequences` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `use_year_month` tinyint(1) NOT NULL DEFAULT '1',
  `use_branch_number` tinyint(1) NOT NULL DEFAULT '0',
  `last_sequence` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_invoice_sequence_per_org` (`organisation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_number_sequences`
--

INSERT INTO `invoice_number_sequences` VALUES ('2567ae63-9100-4741-9016-5cc34b46e5a4','ac7e5b0f-d0dd-44a4-913c-6d365861fad6','PRN',1,0,0,NULL,NULL,NULL);

--
-- Table structure for table `item_categories`
--

CREATE TABLE `item_categories` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_final_product` tinyint(1) NOT NULL DEFAULT '1',
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `item_categories`
--

INSERT INTO `item_categories` VALUES ('15ab4c48-abbe-47cf-9959-b4524a273ac0','ac7e5b0f-d0dd-44a4-913c-6d365861fad6',1,'STATIONERY',NULL,NULL,'2026-03-10 21:55:10','2026-03-10 21:55:10');

--
-- Table structure for table `item_images`
--

CREATE TABLE `item_images` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `item_images_item_id_foreign` (`item_id`),
  CONSTRAINT `item_images_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `item_images`
--


--
-- Table structure for table `item_settlements`
--

CREATE TABLE `item_settlements` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `weighing_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `good_beans_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `good_beans_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `good_beans_cost_per_kg` decimal(10,2) NOT NULL,
  `defects_cost_per_kg` decimal(10,2) NOT NULL,
  `defect_rate` decimal(10,2) NOT NULL,
  `defect_calculated_price` decimal(10,2) NOT NULL,
  `moisture_cost_per_kg` decimal(10,2) NOT NULL,
  `moisture_percentage` decimal(10,2) NOT NULL,
  `preparation_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `unit_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_payable` decimal(12,2) NOT NULL DEFAULT '0.00',
  `total_paid` decimal(12,2) NOT NULL DEFAULT '0.00',
  `balance` decimal(12,2) GENERATED ALWAYS AS ((`total_payable` - `total_paid`)) STORED,
  `date_paid` date DEFAULT NULL,
  `approval_remarks` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `approved_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_manually_adjusted` tinyint(1) NOT NULL DEFAULT '0',
  `manually_adjusted_by` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('pending','approved','partially_settled','settled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `item_settlements_weighing_id_unique` (`weighing_id`),
  KEY `item_settlements_approved_by_foreign` (`approved_by`),
  KEY `item_settlements_manually_adjusted_by_foreign` (`manually_adjusted_by`),
  KEY `item_settlements_added_by_foreign` (`added_by`),
  CONSTRAINT `item_settlements_added_by_foreign` FOREIGN KEY (`added_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `item_settlements_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `item_settlements_manually_adjusted_by_foreign` FOREIGN KEY (`manually_adjusted_by`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `item_settlements_weighing_id_foreign` FOREIGN KEY (`weighing_id`) REFERENCES `sample_weighings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
