-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2026 at 10:18 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `ncu_db`
--

-- --------------------------------------------------------

--
-- Table structure for table `approvals`
--

CREATE TABLE `approvals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `approvable_type` varchar(255) NOT NULL,
  `approvable_id` bigint(20) UNSIGNED NOT NULL,
  `level` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `status` varchar(255) NOT NULL DEFAULT 'pending',
  `approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `rejected_by` bigint(20) UNSIGNED DEFAULT NULL,
  `rejected_at` timestamp NULL DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `awamus`
--

CREATE TABLE `awamus` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `awamus`
--

INSERT INTO `awamus` (`id`, `name`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '1', 'active', 1, 1, '2026-10-21 17:35:11', '2026-10-21 17:35:11', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `bajetis`
--

CREATE TABLE `bajetis` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `source` enum('loan','investment') NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bajetis`
--

INSERT INTO `bajetis` (`id`, `amount`, `source`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 200000.00, 'loan', 'active', 1, 1, '2026-10-21 18:25:21', '2026-10-21 18:25:21', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `banks`
--

CREATE TABLE `banks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `account_number` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `banks`
--

INSERT INTO `banks` (`id`, `name`, `account_number`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'NMB', '8998891', '2026-09-10 13:52:14', '2026-09-10 13:52:14', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `dates` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`dates`)),
  `payment_type` enum('half','full') NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `hall_id` bigint(20) UNSIGNED NOT NULL,
  `booking_event_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `booking_events`
--

CREATE TABLE `booking_events` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `event_name` varchar(255) NOT NULL,
  `from_time` time NOT NULL,
  `end_time` time NOT NULL,
  `hall_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_events`
--

INSERT INTO `booking_events` (`id`, `event_name`, `from_time`, `end_time`, `hall_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'weeding/harusi', '14:39:00', '14:41:00', 4, '2026-09-13 11:39:16', '2026-09-13 11:50:27', '2026-09-13 11:50:27'),
(2, 'SHUGHULI ZISIZO NA MZIKI AU SAUTI KUBWA', '08:00:00', '23:59:00', 4, '2026-09-13 11:51:00', '2026-11-01 21:06:01', NULL),
(3, 'SHUGHULI ZENYE MZIKI AU SAUTI KUBWA', '18:00:00', '23:59:00', 5, '2026-09-13 11:53:21', '2026-11-01 21:08:16', NULL),
(4, 'SHUGHULI ZISIZO NA  MZIKI WALA  SAUTI KUBWA', '08:00:00', '23:59:00', 5, '2026-09-13 20:38:05', '2026-11-01 21:04:09', NULL),
(5, 'SHUGHULI ZENYE MZIKI AU SAUTI KUBWA', '18:00:00', '23:59:00', 4, '2026-11-01 21:09:19', '2026-11-01 21:09:19', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `booking_times`
--

CREATE TABLE `booking_times` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `expiry_type` enum('day','week','hour') NOT NULL DEFAULT 'day',
  `expiry_value` int(11) NOT NULL DEFAULT 1,
  `expires_at` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_times`
--

INSERT INTO `booking_times` (`id`, `expiry_type`, `expiry_value`, `expires_at`, `created_at`, `updated_at`) VALUES
(1, 'hour', 1, '2026-09-11 17:55:26', '2026-09-07 10:03:54', '2026-09-11 13:55:26');

-- --------------------------------------------------------

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cages`
--

CREATE TABLE `cages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `length` decimal(10,2) DEFAULT NULL,
  `width` decimal(10,2) DEFAULT NULL,
  `size` decimal(12,2) DEFAULT NULL,
  `total_fish` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cages`
--

INSERT INTO `cages` (`id`, `name`, `length`, `width`, `size`, `total_fish`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'TADB-C01', 10.00, 20.00, 200.00, 0, 'active', 1, 1, '2026-10-21 17:44:05', '2026-10-29 13:50:40', NULL),
(2, 'CAGE B', 30.00, 20.00, 600.00, 51, 'active', 1, 1, '2026-10-23 13:10:29', '2026-10-30 09:44:12', NULL);

-- --------------------------------------------------------

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

CREATE TABLE `contracts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL,
  `ternant_unit_id` bigint(20) UNSIGNED NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `amount_per_month` decimal(12,2) DEFAULT NULL,
  `amount_per_year` decimal(12,2) DEFAULT NULL,
  `vat_inclusive` decimal(12,2) DEFAULT NULL,
  `amount_after_vat` decimal(12,2) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'INCOMPLETE',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contract_unit`
--

CREATE TABLE `contract_unit` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `contract_id` bigint(20) UNSIGNED NOT NULL,
  `ternant_unit_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

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

CREATE TABLE `departments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `head_user_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `departments` (`id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`, `head_user_id`) VALUES
(1, 'ICT DEPARTMENT', 'ICT', '2026-08-12 08:19:27', '2026-08-07 08:19:33', '2026-08-01 08:19:38', 1),
(2, 'KITENGO CHA TEHAMA', 'Handles all information and communication technology services including system administration, networking, and software development.', '2026-09-08 12:23:56', '2026-09-08 12:23:56', NULL, 1),
(3, 'IDARA YA FEDHA NA UTAWALA', 'FINANCIAL MANAGEMENT', '2026-09-11 09:34:11', '2026-09-11 09:34:11', NULL, 1);

-- --------------------------------------------------------

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

CREATE TABLE `discounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `phone` varchar(20) NOT NULL,
  `discount_type` enum('percentage','fixed') NOT NULL,
  `discount_value` decimal(15,2) NOT NULL,
  `comment` text DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `discounts` (`id`, `phone`, `discount_type`, `discount_value`, `comment`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '0625200214', 'percentage', 20.00, 'agizo kutoka kwa manager mkuu', 'active', 1, 1, '2026-11-01 20:35:39', '2026-11-01 20:53:32', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `executions`
--

CREATE TABLE `executions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `task_id` bigint(20) UNSIGNED NOT NULL,
  `description` text DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `executions`
--

INSERT INTO `executions` (`id`, `task_id`, `description`, `attachment`, `created_at`, `updated_at`) VALUES
(1, 2, 'ttttt', 'executions/1788127084_Barua A TO Z Appreciation.pdf', '2026-08-30 21:58:04', '2026-08-30 21:58:04');

-- --------------------------------------------------------

--
-- Table structure for table `fishes`
--

CREATE TABLE `fishes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fish_name` varchar(255) NOT NULL,
  `species` enum('Nile Tilapia','Catfish','Rufiji Tilapia','Hybrid Tilapia') NOT NULL,
  `fish_type` enum('Starter','Grower','Finisher') NOT NULL,
  `supplier_id` bigint(20) UNSIGNED NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fishes`
--

INSERT INTO `fishes` (`id`, `fish_name`, `species`, `fish_type`, `supplier_id`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'SATO', 'Nile Tilapia', 'Starter', 1, 'active', 1, 1, '2026-10-22 09:59:55', '2026-10-22 09:59:55', NULL),
(2, 'SATO', 'Nile Tilapia', 'Grower', 1, 'active', 1, 1, '2026-10-22 10:18:18', '2026-10-22 10:18:18', NULL),
(3, 'SATO', 'Nile Tilapia', 'Finisher', 1, 'active', 1, 1, '2026-10-22 10:19:11', '2026-10-22 10:19:11', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fish_deaths`
--

CREATE TABLE `fish_deaths` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `death_date` date NOT NULL,
  `death_count` int(10) UNSIGNED NOT NULL,
  `death_reason` varchar(255) NOT NULL,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fish_deaths`
--

INSERT INTO `fish_deaths` (`id`, `cage_id`, `death_date`, `death_count`, `death_reason`, `notes`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 2, '2026-10-29', 10, 'Disease', NULL, 1, 1, '2026-10-29 14:21:48', '2026-10-30 09:03:42', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fish_feedings`
--

CREATE TABLE `fish_feedings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `stock_id` bigint(20) UNSIGNED NOT NULL,
  `store_id` bigint(20) UNSIGNED NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `date` date NOT NULL,
  `session` enum('morning','afternoon','night') NOT NULL DEFAULT 'morning',
  `quantity` decimal(15,3) NOT NULL,
  `comment` text DEFAULT NULL,
  `store_keeper_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fish_feedings`
--

INSERT INTO `fish_feedings` (`id`, `stock_id`, `store_id`, `vizimba_unit_id`, `date`, `session`, `quantity`, `comment`, `store_keeper_id`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 4, 2, '2026-10-26', 'morning', 1.997, 'chakula kinakaribia kuisha', 1, 'active', 1, 1, '2026-10-26 11:31:11', '2026-10-27 10:25:10', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fish_harvestings`
--

CREATE TABLE `fish_harvestings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(15,3) NOT NULL,
  `total_weight_g` decimal(15,2) DEFAULT NULL,
  `average_weight_g` decimal(12,2) DEFAULT NULL,
  `harvested_fish` int(10) UNSIGNED DEFAULT NULL,
  `lost_fish` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fish_harvestings`
--

INSERT INTO `fish_harvestings` (`id`, `cage_id`, `date`, `vizimba_unit_id`, `amount`, `total_weight_g`, `average_weight_g`, `harvested_fish`, `lost_fish`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 2, '2026-10-01', 1, 5.000, 50.00, 9.13, 5, 0, 'active', 1, 1, '2026-10-30 09:39:35', '2026-10-30 09:44:12', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fish_samplings`
--

CREATE TABLE `fish_samplings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `sample_date` date NOT NULL,
  `sampled_count` int(10) UNSIGNED NOT NULL,
  `bucket_water_fish_weight_g` decimal(12,2) NOT NULL,
  `bucket_water_weight_g` decimal(12,2) NOT NULL,
  `fish_weight_g` decimal(12,2) NOT NULL,
  `average_weight_g` decimal(12,2) NOT NULL,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fish_samplings`
--

INSERT INTO `fish_samplings` (`id`, `cage_id`, `sample_date`, `sampled_count`, `bucket_water_fish_weight_g`, `bucket_water_weight_g`, `fish_weight_g`, `average_weight_g`, `notes`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 2, '2026-10-29', 60, 102.00, 40.00, 62.00, 1.03, 'good', 1, 1, '2026-10-29 14:13:40', '2026-10-29 14:13:40', NULL),
(2, 2, '2026-10-29', 50, 300.00, 65.00, 235.00, 4.70, NULL, 1, 1, '2026-10-29 14:19:10', '2026-10-29 14:19:10', NULL),
(3, 2, '2026-10-29', 50, 600.00, 20.00, 580.00, 11.60, NULL, 1, 1, '2026-10-29 14:48:49', '2026-10-29 14:48:49', NULL),
(4, 2, '2026-10-30', 40, 400.00, 35.00, 365.00, 9.13, NULL, 1, 1, '2026-10-30 08:54:57', '2026-10-30 08:54:57', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fish_stockings`
--

CREATE TABLE `fish_stockings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `supplier_id` bigint(20) UNSIGNED NOT NULL,
  `fish_id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `amount_per_unit` decimal(15,2) NOT NULL DEFAULT 0.00,
  `quantity` decimal(15,3) NOT NULL,
  `date` date NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fish_stockings`
--

INSERT INTO `fish_stockings` (`id`, `supplier_id`, `fish_id`, `cage_id`, `vizimba_unit_id`, `amount_per_unit`, `quantity`, `date`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 2, 1, 2000.00, 10.000, '2026-10-23', 'active', 1, 1, '2026-10-23 14:16:36', '2026-10-23 14:18:09', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `halls`
--

CREATE TABLE `halls` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `amount_per_day` decimal(15,2) NOT NULL,
  `location` varchar(255) DEFAULT NULL,
  `capacity` int(10) UNSIGNED NOT NULL,
  `image1` varchar(255) DEFAULT NULL,
  `image2` varchar(255) DEFAULT NULL,
  `image3` varchar(255) 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `halls`
--

INSERT INTO `halls` (`id`, `name`, `description`, `amount_per_day`, `location`, `capacity`, `image1`, `image2`, `image3`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(4, 'MABENGA HALL(UKUMBI MDOGO)', 'ukumbi mdogo', 120000.00, 'ncu hq', 67, 'images/halls/1787990379_ukumbi1.png', 'images/halls/1787990379_ukumbi1.png', 'images/halls/1787990379_ukumbi1.png', 1, '2026-08-28 06:11:02', '2026-11-01 21:10:40', NULL),
(5, 'BOMANI HALL(UKUMBI MKUBWA)', 'ukumbi huu una uwezo  wa kuchukua watu wengi na unafaa zaidi kwenye sherehe za harusi,kitchen part na mikutano mikubwa \r\nutapata huduma  za genereta\r\nkaribu sana', 550000.00, 'ncu hq', 500, 'images/halls/1787990450_ukumbi2.png', 'images/halls/1787990450_ukumbi3.png', 'images/halls/1787990450_ukumbi3.png', 1, '2026-08-28 09:37:24', '2026-09-13 11:42:54', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hall_id` bigint(20) UNSIGNED NOT NULL,
  `invoice_number` varchar(255) NOT NULL,
  `booking_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `subtotal` decimal(15,2) NOT NULL DEFAULT 0.00,
  `discount_id` bigint(20) UNSIGNED DEFAULT NULL,
  `discount_phone` varchar(20) DEFAULT NULL,
  `discount_type` varchar(20) DEFAULT NULL,
  `discount_value` decimal(15,2) DEFAULT NULL,
  `discount_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` enum('unpaid','partially_paid','paid','cancelled') NOT NULL DEFAULT 'unpaid',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `loan_trackers`
--

CREATE TABLE `loan_trackers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `loan_amount` decimal(15,2) NOT NULL,
  `amount_used` decimal(15,2) NOT NULL DEFAULT 0.00,
  `balance` decimal(15,2) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `loan_trackers`
--

INSERT INTO `loan_trackers` (`id`, `project_id`, `loan_amount`, `amount_used`, `balance`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 800000.00, 200000.00, 600000.00, 'active', 1, 1, '2026-10-21 18:34:08', '2026-10-21 18:34:27', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `locations`
--

CREATE TABLE `locations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `locations`
--

INSERT INTO `locations` (`id`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'KENYATTA ROAD', '2026-09-04 14:05:50', '2026-09-10 14:17:28', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `majengos`
--

CREATE TABLE `majengos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `location_id` bigint(20) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `majengos`
--

INSERT INTO `majengos` (`id`, `name`, `description`, `location_id`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 'KAUMA', 'KAUMA', 1, NULL, '2026-09-10 14:54:04', '2026-09-10 14:54:04');

-- --------------------------------------------------------

--
-- Table structure for table `matumizis`
--

CREATE TABLE `matumizis` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `voucher` varchar(255) DEFAULT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `expense` varchar(255) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `matumizis`
--

INSERT INTO `matumizis` (`id`, `date`, `voucher`, `project_id`, `cage_id`, `expense`, `amount`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '2026-10-21', NULL, 1, 1, '0000', 10000.00, 1, 1, '2026-10-21 19:26:10', '2026-10-21 19:26:10', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `message_logs`
--

CREATE TABLE `message_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `message` text NOT NULL,
  `role_name` varchar(255) DEFAULT NULL,
  `recipients` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`recipients`)),
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `api_response` longtext DEFAULT NULL,
  `sent_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `message_logs`
--

INSERT INTO `message_logs` (`id`, `message`, `role_name`, `recipients`, `status`, `api_response`, `sent_by`, `created_at`, `updated_at`) VALUES
(1, 'Your NCU reset code is: 242189', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74495767,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-09 19:01:03', '2026-09-09 19:01:03'),
(2, 'Your NCU reset code is: 220568', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74495788,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-09 19:02:23', '2026-09-09 19:02:23'),
(3, 'Your NCU login code is: 415204', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74495873,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-09 19:06:48', '2026-09-09 19:06:48'),
(4, 'Your NCU login code is: 655763', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74495934,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-09 19:09:38', '2026-09-09 19:09:38'),
(5, 'Your NCU login code is: 965228', 'Auth Flow', '[\"255744111991\"]', 1, '{\"successful\":true,\"request_id\":74495964,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-09 19:10:58', '2026-09-09 19:10:58'),
(6, 'Your NCU login code is: 631315', 'Auth Flow', '[\"255744111991\"]', 1, '{\"successful\":true,\"request_id\":74496065,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-09 19:15:43', '2026-09-09 19:15:43'),
(7, 'Your NCU reset code is: 525319', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74496382,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-09 19:29:52', '2026-09-09 19:29:52'),
(8, 'Your NCU login code is: 577368', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74496387,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-09 19:30:25', '2026-09-09 19:30:25'),
(9, 'Your NCU login code is: 477352', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74513243,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-10 07:59:19', '2026-09-10 07:59:19'),
(10, 'Your NCU login code is: 438261', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74534744,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-10 12:41:22', '2026-09-10 12:41:22'),
(11, 'Your NCU login code is: 951631', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74544457,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-10 15:13:10', '2026-09-10 15:13:10'),
(12, 'Your NCU login code is: 460313', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74564025,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-11 04:08:08', '2026-09-11 04:08:08'),
(13, 'Your NCU login code is: 101259', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74571240,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-11 06:58:20', '2026-09-11 06:58:20'),
(14, 'Your NCU login code is: 853583', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74576306,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-11 07:39:20', '2026-09-11 07:39:20'),
(15, 'Your NCU reset code is: 725635', 'Auth Flow', '[\"255658381644\"]', 1, '{\"successful\":true,\"request_id\":74593528,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-11 11:37:52', '2026-09-11 11:37:52'),
(16, 'Your NCU reset code is: 550532', 'Auth Flow', '[\"255658381644\"]', 1, '{\"successful\":true,\"request_id\":74593611,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-11 11:39:00', '2026-09-11 11:39:00'),
(17, 'Your NCU reset code is: 689988', 'Auth Flow', '[\"255658381644\"]', 1, '{\"successful\":true,\"request_id\":74594120,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-11 11:44:45', '2026-09-11 11:44:45'),
(18, 'Your NCU login code is: 226030', 'Auth Flow', '[\"255658381644\"]', 1, '{\"successful\":true,\"request_id\":74595295,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 2, '2026-09-11 11:52:16', '2026-09-11 11:52:16'),
(19, 'Your NCU login code is: 725019', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74595343,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-11 11:53:14', '2026-09-11 11:53:14'),
(20, 'Your NCU login code is: 639484', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74604275,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-11 13:45:44', '2026-09-11 13:45:44'),
(21, 'Your NCU login code is: 999599', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-09-13 11:22:22', '2026-09-13 11:22:22'),
(22, 'Your NCU login code is: 782353', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74703515,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-13 11:25:20', '2026-09-13 11:25:20'),
(23, 'Your NCU login code is: 850689', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-09-13 19:55:09', '2026-09-13 19:55:09'),
(24, 'Your NCU login code is: 402785', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727336,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-13 19:59:21', '2026-09-13 19:59:21'),
(25, 'Your NCU reset code is: 441512', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727359,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-13 20:00:49', '2026-09-13 20:00:49'),
(26, 'Your NCU login code is: 331035', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727390,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-13 20:02:52', '2026-09-13 20:02:52'),
(27, 'Your NCU reset code is: 771168', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727425,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-13 20:04:53', '2026-09-13 20:04:53'),
(28, 'Your NCU reset code is: 222897', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727556,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-13 20:16:27', '2026-09-13 20:16:27'),
(29, 'Your NCU login code is: 858758', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727557,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-13 20:16:38', '2026-09-13 20:16:38'),
(30, 'Your NCU login code is: 939819', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74727562,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-13 20:17:06', '2026-09-13 20:17:06'),
(31, 'Your NCU login code is: 976235', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74753762,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-14 08:15:44', '2026-09-14 08:15:44'),
(32, 'Your NCU login code is: 976235', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"Missing data\"}', 1, '2026-09-14 08:15:44', '2026-09-14 08:15:44'),
(33, 'Your NCU login code is: 319769', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74754078,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-14 08:20:49', '2026-09-14 08:20:49'),
(34, 'Your NCU login code is: 319769', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"Missing data\"}', 1, '2026-09-14 08:20:49', '2026-09-14 08:20:49'),
(35, 'Your NCU login code is: 706154', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74754165,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-14 08:22:04', '2026-09-14 08:22:04'),
(36, 'Your NCU login code is: 706154', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"Missing data\"}', 1, '2026-09-14 08:22:04', '2026-09-14 08:22:04'),
(37, 'Your NCU login code is: 442245', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74754289,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-14 08:24:10', '2026-09-14 08:24:10'),
(38, 'Your NCU login code is: 442245', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-14 08:24:12', '2026-09-14 08:24:12'),
(39, 'Your NCU login code is: 761906', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":74767946,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-14 11:42:20', '2026-09-14 11:42:20'),
(40, 'Your NCU login code is: 761906', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-14 11:42:22', '2026-09-14 11:42:22'),
(41, 'Your NCU login code is: 136621', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75054135,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-19 07:54:45', '2026-09-19 07:54:45'),
(42, 'Your NCU login code is: 136621', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-19 07:54:47', '2026-09-19 07:54:47'),
(43, 'Your NCU login code is: 926039', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75054186,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-19 07:55:36', '2026-09-19 07:55:36'),
(44, 'Your NCU login code is: 926039', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-19 07:55:38', '2026-09-19 07:55:38'),
(45, 'Your NCU login code is: 183557', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75212325,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-22 06:44:07', '2026-09-22 06:44:07'),
(46, 'Your NCU login code is: 183557', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-22 06:44:09', '2026-09-22 06:44:09'),
(47, 'Your NCU login code is: 123754', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75312339,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-23 13:02:04', '2026-09-23 13:02:04'),
(48, 'Your NCU login code is: 123754', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-23 13:02:06', '2026-09-23 13:02:06'),
(49, 'Your NCU login code is: 368969', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75312446,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-23 13:04:34', '2026-09-23 13:04:34'),
(50, 'Your NCU login code is: 368969', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-23 13:04:36', '2026-09-23 13:04:36'),
(51, 'Your NCU reset code is: 595983', 'Auth Flow SMS', '[\"255658381644\"]', 1, '{\"successful\":true,\"request_id\":75313817,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 13:29:44', '2026-09-23 13:29:44'),
(52, 'Your NCU reset code is: 595983', 'Auth Flow Email', '[\"info@ncultd.or.tz\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', NULL, '2026-09-23 13:29:46', '2026-09-23 13:29:46'),
(53, 'Your NCU login code is: 739400', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75313867,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-23 13:30:16', '2026-09-23 13:30:16'),
(54, 'Your NCU login code is: 739400', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-23 13:30:18', '2026-09-23 13:30:18'),
(55, 'Your NCU login code is: 657835', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75313913,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-23 13:31:00', '2026-09-23 13:31:00'),
(56, 'Your NCU login code is: 657835', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', 1, '2026-09-23 13:31:02', '2026-09-23 13:31:02'),
(57, 'Your NCU reset code is: 251930', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75313955,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 13:31:42', '2026-09-23 13:31:42'),
(58, 'Your NCU reset code is: 251930', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>18</b><br />\n{\"success\":false,\"error\":\"Mail failed\"}', NULL, '2026-09-23 13:31:44', '2026-09-23 13:31:44'),
(59, 'Your NCU reset code is: 332536', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75315572,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 13:43:25', '2026-09-23 13:43:25'),
(60, 'Your NCU reset code is: 332536', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  require(vendor/autoload.php): Failed to open stream: No such file or directory in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>3</b><br />\n<br />\n<b>Fatal error</b>:  Uncaught Error: Failed opening required \'vendor/autoload.php\' (include_path=\'C:\\xampp\\php\\PEAR\') in C:\\xampp\\htdocs\\email-service\\send-email.php:3\nStack trace:\n#0 {main}\n  thrown in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>3</b><br />\n', NULL, '2026-09-23 13:43:25', '2026-09-23 13:43:25'),
(61, 'Your NCU reset code is: 400267', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75318128,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 14:07:47', '2026-09-23 14:07:47'),
(62, 'Your NCU reset code is: 400267', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  Undefined array key \"recipient_email\" in <b>C:\\xampp\\htdocs\\ncultd\\send-email.php</b> on line <b>14</b><br />\n<br />\n<b>Warning</b>:  Undefined array key \"message\" in <b>C:\\xampp\\htdocs\\ncultd\\send-email.php</b> on line <b>15</b><br />\n{\"success\":false,\"error\":\"Invalid address:  (to): \"}', NULL, '2026-09-23 14:07:47', '2026-09-23 14:07:47'),
(63, 'Your NCU reset code is: 899237', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75318684,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 14:10:25', '2026-09-23 14:10:25'),
(64, 'Your NCU reset code is: 899237', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  Undefined array key \"recipient_email\" in <b>C:\\xampp\\htdocs\\ncultd\\send-email.php</b> on line <b>14</b><br />\n<br />\n<b>Warning</b>:  Undefined array key \"message\" in <b>C:\\xampp\\htdocs\\ncultd\\send-email.php</b> on line <b>15</b><br />\n{\"success\":false,\"error\":\"Invalid address:  (to): \"}', NULL, '2026-09-23 14:10:25', '2026-09-23 14:10:25'),
(65, 'Your NCU reset code is: 116334', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75319097,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 14:14:13', '2026-09-23 14:14:13'),
(66, 'Your NCU reset code is: 116334', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate.\"}', NULL, '2026-09-23 14:14:16', '2026-09-23 14:14:16'),
(67, 'Your NCU reset code is: 165666', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75319237,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-23 14:16:35', '2026-09-23 14:16:35'),
(68, 'Your NCU reset code is: 165666', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate.\"}', NULL, '2026-09-23 14:16:37', '2026-09-23 14:16:37'),
(69, 'Your NCU reset code is: 654822', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75346182,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-24 05:28:28', '2026-09-24 05:28:28'),
(70, 'Your NCU reset code is: 654822', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate.\"}', NULL, '2026-09-24 05:28:30', '2026-09-24 05:28:30'),
(71, 'Your NCU reset code is: 916790', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75348455,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-24 05:57:29', '2026-09-24 05:57:29'),
(72, 'Your NCU reset code is: 916790', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate. SMTP server error: QUIT command failed\"}', NULL, '2026-09-24 05:57:33', '2026-09-24 05:57:33'),
(73, 'Your NCU reset code is: 715732', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75349380,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-24 06:16:07', '2026-09-24 06:16:07'),
(74, 'Your NCU reset code is: 715732', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate.\"}', NULL, '2026-09-24 06:16:10', '2026-09-24 06:16:10'),
(75, 'Your NCU reset code is: 734286', 'Auth Flow SMS', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75351114,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', NULL, '2026-09-24 06:43:48', '2026-09-24 06:43:48'),
(76, 'Your NCU reset code is: 734286', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '{\"success\":false,\"error\":\"SMTP Error: Could not authenticate.\"}', NULL, '2026-09-24 06:43:51', '2026-09-24 06:43:51'),
(77, 'Your NCU login code is: 478540', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', 1, '2026-09-24 10:06:51', '2026-09-24 10:06:51'),
(78, 'Your NCU login code is: 478540', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-24 10:06:55', '2026-09-24 10:06:55'),
(79, 'Your NCU login code is: 198133', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', 1, '2026-09-24 10:08:59', '2026-09-24 10:08:59'),
(80, 'Your NCU login code is: 198133', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, '<br />\n<b>Warning</b>:  require(C:\\xampp\\htdocs\\email-service/vendor/autoload.php): Failed to open stream: No such file or directory in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>3</b><br />\n<br />\n<b>Fatal error</b>:  Uncaught Error: Failed opening required \'C:\\xampp\\htdocs\\email-service/vendor/autoload.php\' (include_path=\'C:\\xampp\\php\\PEAR\') in C:\\xampp\\htdocs\\email-service\\send-email.php:3\nStack trace:\n#0 {main}\n  thrown in <b>C:\\xampp\\htdocs\\email-service\\send-email.php</b> on line <b>3</b><br />\n', 1, '2026-09-24 10:08:59', '2026-09-24 10:08:59'),
(81, 'Your NCU login code is: 930255', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', 1, '2026-09-24 10:10:13', '2026-09-24 10:10:13'),
(82, 'Your NCU login code is: 930255', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-24 10:10:16', '2026-09-24 10:10:16'),
(83, 'Your NCU login code is: 352825', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', 1, '2026-09-24 11:19:18', '2026-09-24 11:19:18'),
(84, 'Your NCU login code is: 352825', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-24 11:19:27', '2026-09-24 11:19:27'),
(85, 'Your NCU reset code is: 684290', 'Auth Flow SMS', '[\"255625200214\"]', 0, '<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n', NULL, '2026-09-25 05:31:07', '2026-09-25 05:31:07'),
(86, 'Your NCU reset code is: 684290', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 05:31:13', '2026-09-25 05:31:13'),
(87, 'Your NCU login code is: 768866', 'Auth Flow SMS', '[\"255625200214\"]', 0, '<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n', 1, '2026-09-25 05:42:33', '2026-09-25 05:42:33'),
(88, 'Your NCU login code is: 768866', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-25 05:42:38', '2026-09-25 05:42:38'),
(89, 'Your NCU login code is: 728661', 'Auth Flow SMS', '[\"255625200214\"]', 0, '<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n', 1, '2026-09-25 05:54:45', '2026-09-25 05:54:45'),
(90, 'Your NCU login code is: 728661', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-25 05:54:49', '2026-09-25 05:54:49'),
(91, 'Your NCU reset code is: 816869', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 08:26:59', '2026-09-25 08:26:59'),
(92, 'Your NCU reset code is: 816869', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 08:27:03', '2026-09-25 08:27:03'),
(93, 'Your NCU reset code is: 390368', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 08:29:13', '2026-09-25 08:29:13'),
(94, 'Your NCU reset code is: 390368', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 08:29:17', '2026-09-25 08:29:17'),
(95, 'Your NCU reset code is: 252393', 'Auth Flow SMS', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 08:55:05', '2026-09-25 08:55:05'),
(96, 'Your NCU reset code is: 252393', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 08:55:09', '2026-09-25 08:55:09'),
(97, 'Your NCU reset code is: 801081', 'Auth Flow', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 08:58:20', '2026-09-25 08:58:20'),
(98, 'Your NCU reset code is: 801081', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 08:58:23', '2026-09-25 08:58:23'),
(99, 'Your NCU reset code is: 266760', 'Auth Flow', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 09:00:59', '2026-09-25 09:00:59'),
(100, 'Your NCU reset code is: 266760', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 09:01:04', '2026-09-25 09:01:04'),
(101, 'Your NCU reset code is: 345066', 'Auth Flow', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', NULL, '2026-09-25 09:08:58', '2026-09-25 09:08:58'),
(102, 'Your NCU reset code is: 345066', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', NULL, '2026-09-25 09:09:02', '2026-09-25 09:09:02'),
(103, 'Your NCU login code is: 312373', 'Auth Flow', '[\"255625200214\"]', 0, '{\"code\":120,\"message\":\"Invalid api_key and/or secret_id\"}', 1, '2026-09-25 09:09:29', '2026-09-25 09:09:29'),
(104, 'Your NCU login code is: 312373', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-25 09:09:33', '2026-09-25 09:09:33'),
(105, 'Your NCU login code is: 982337', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-09-27 10:50:36', '2026-09-27 10:50:36'),
(106, 'Your NCU login code is: 982337', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-09-27 10:50:42', '2026-09-27 10:50:42'),
(107, 'Your NCU login code is: 636086', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-09-29 15:37:27', '2026-09-29 15:37:27'),
(108, 'Your NCU login code is: 636086', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 0, 'Connection could not be established with host \"smtp.gmail.com:587\": stream_socket_client(): php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. ', 1, '2026-09-29 15:37:27', '2026-09-29 15:37:27'),
(109, 'Your NCU login code is: 797678', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":75734502,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-09-29 15:47:30', '2026-09-29 15:47:30'),
(110, 'Your NCU login code is: 797678', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 0, 'Connection could not be established with host \"smtp.gmail.com:587\": stream_socket_client(): Unable to connect to smtp.gmail.com:587 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond)', 1, '2026-09-29 15:47:53', '2026-09-29 15:47:53'),
(111, 'Your NCU login code is: 853205', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77002047,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-19 12:19:16', '2026-10-19 12:19:16'),
(112, 'Your NCU login code is: 853205', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-19 12:19:20', '2026-10-19 12:19:20'),
(113, 'Your NCU login code is: 618317', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77043136,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-20 06:50:46', '2026-10-20 06:50:46'),
(114, 'Your NCU login code is: 618317', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-20 06:50:52', '2026-10-20 06:50:52'),
(115, 'Your NCU login code is: 620580', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77166552,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-21 17:20:03', '2026-10-21 17:20:03'),
(116, 'Your NCU login code is: 620580', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-21 17:20:08', '2026-10-21 17:20:08'),
(117, 'Your NCU login code is: 101914', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77204037,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-22 09:23:14', '2026-10-22 09:23:14'),
(118, 'Your NCU login code is: 101914', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-22 09:23:19', '2026-10-22 09:23:19'),
(119, 'Your NCU login code is: 955112', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77279697,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-23 10:05:25', '2026-10-23 10:05:25'),
(120, 'Your NCU login code is: 955112', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-23 10:05:33', '2026-10-23 10:05:33'),
(121, 'Your NCU login code is: 877601', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77354049,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-24 11:02:57', '2026-10-24 11:02:57'),
(122, 'Your NCU login code is: 877601', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-24 11:03:05', '2026-10-24 11:03:05'),
(123, 'Your NCU login code is: 358219', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-10-26 06:51:52', '2026-10-26 06:51:52'),
(124, 'Your NCU login code is: 358219', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 0, 'Connection could not be established with host \"smtp.gmail.com:587\": stream_socket_client(): php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: No such host is known. ', 1, '2026-10-26 06:51:52', '2026-10-26 06:51:52'),
(125, 'Your NCU login code is: 701795', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-10-26 06:52:37', '2026-10-26 06:52:37'),
(126, 'Your NCU login code is: 701795', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 0, 'Connection could not be established with host \"smtp.gmail.com:587\": stream_socket_client(): php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: No such host is known. ', 1, '2026-10-26 06:52:37', '2026-10-26 06:52:37'),
(127, 'Your NCU login code is: 796678', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77442361,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-26 07:24:12', '2026-10-26 07:24:12'),
(128, 'Your NCU login code is: 796678', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-26 07:24:19', '2026-10-26 07:24:19'),
(129, 'Your NCU login code is: 357821', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77442609,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-26 07:24:56', '2026-10-26 07:24:56'),
(130, 'Your NCU login code is: 357821', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-26 07:25:00', '2026-10-26 07:25:00'),
(131, 'Your NCU login code is: 694152', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77562398,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-27 09:13:32', '2026-10-27 09:13:32'),
(132, 'Your NCU login code is: 694152', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-27 09:13:39', '2026-10-27 09:13:39'),
(133, 'Your NCU login code is: 280383', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77566806,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-27 10:19:58', '2026-10-27 10:19:58'),
(134, 'Your NCU login code is: 280383', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-27 10:20:07', '2026-10-27 10:20:07'),
(135, 'Your NCU login code is: 124436', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77641061,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-28 10:35:28', '2026-10-28 10:35:28'),
(136, 'Your NCU login code is: 124436', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-28 10:35:35', '2026-10-28 10:35:35'),
(137, 'Your NCU login code is: 287997', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77694947,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-29 08:21:48', '2026-10-29 08:21:48'),
(138, 'Your NCU login code is: 287997', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-29 08:21:56', '2026-10-29 08:21:56'),
(139, 'Your NCU login code is: 433590', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77712695,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-29 11:02:51', '2026-10-29 11:02:51'),
(140, 'Your NCU login code is: 433590', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-29 11:02:59', '2026-10-29 11:02:59'),
(141, 'Your NCU login code is: 826821', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77715183,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-29 11:27:09', '2026-10-29 11:27:09'),
(142, 'Your NCU login code is: 826821', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-29 11:27:15', '2026-10-29 11:27:15'),
(143, 'Your NCU login code is: 759211', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77724961,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-29 13:48:07', '2026-10-29 13:48:07'),
(144, 'Your NCU login code is: 759211', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-29 13:48:16', '2026-10-29 13:48:16'),
(145, 'Your NCU login code is: 781830', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77724996,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-29 13:48:56', '2026-10-29 13:48:56'),
(146, 'Your NCU login code is: 781830', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-29 13:49:01', '2026-10-29 13:49:01'),
(147, 'Your NCU login code is: 656570', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77763712,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-30 06:42:35', '2026-10-30 06:42:35'),
(148, 'Your NCU login code is: 656570', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-30 06:42:43', '2026-10-30 06:42:43'),
(149, 'Your NCU login code is: 207703', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77776997,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-10-30 08:21:43', '2026-10-30 08:21:43'),
(150, 'Your NCU login code is: 207703', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-10-30 08:21:50', '2026-10-30 08:21:50'),
(151, 'Your NCU login code is: 421725', 'Auth Flow', '[\"255625200214\"]', 0, 'cURL error 6: Could not resolve host: apisms.beem.africa (see https://curl.se/libcurl/c/libcurl-errors.html) for https://apisms.beem.africa/v1/send', 1, '2026-10-31 12:57:42', '2026-10-31 12:57:42'),
(152, 'Your NCU login code is: 421725', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 0, 'Connection could not be established with host \"smtp.gmail.com:587\": stream_socket_client(): php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: No such host is known. ', 1, '2026-10-31 12:57:44', '2026-10-31 12:57:44'),
(153, 'Your NCU login code is: 722244', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77962183,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-11-01 20:16:20', '2026-11-01 20:16:20'),
(154, 'Your NCU login code is: 722244', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-11-01 20:16:27', '2026-11-01 20:16:27'),
(155, 'Your NCU login code is: 323551', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77962310,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-11-01 20:27:49', '2026-11-01 20:27:49'),
(156, 'Your NCU login code is: 323551', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-11-01 20:27:55', '2026-11-01 20:27:55'),
(157, 'Your NCU login code is: 972624', 'Auth Flow', '[\"255625200214\"]', 1, '{\"successful\":true,\"request_id\":77962435,\"code\":100,\"message\":\"Message Submitted Successfully\",\"valid\":1,\"invalid\":0,\"duplicates\":0}', 1, '2026-11-01 20:39:28', '2026-11-01 20:39:28'),
(158, 'Your NCU login code is: 972624', 'Auth Flow Email', '[\"raphaelrichard754@gmail.com\"]', 1, 'Email sent successfully via Laravel SMTP.', 1, '2026-11-01 20:39:33', '2026-11-01 20:39:33');

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2026_08_20_182014_create_roles_table', 1),
(2, '2026_08_20_182015_create_permissions_table', 1),
(3, '2026_08_20_182016_create_departments_table', 1),
(4, '2026_08_20_182016_create_users_table', 1),
(5, '2026_08_20_182017_create_units_table', 1),
(6, '2026_08_20_182018_create_task_comments_table', 1),
(7, '2026_08_20_182018_create_tasks_table', 1),
(8, '2026_08_20_182019_create_bookings_table', 1),
(9, '2026_08_20_182019_create_halls_table', 1),
(10, '2026_08_20_182020_create_invoices_table', 1),
(11, '2026_08_20_182020_create_payments_table', 1),
(12, '2026_08_20_182042_create_permission_role_table', 1),
(13, '2026_08_20_182256_add_head_user_id_to_departments_table', 1),
(14, '2026_08_20_183236_add_unit_fields_to_users_table', 1),
(15, '2026_08_20_183649_add_parent_task_to_tasks_table', 1),
(16, '2026_08_20_183855_add_hall_id_to_bookings_table', 1),
(17, '2026_08_21_210613_create_sessions_table', 1),
(18, '2026_08_22_151752_create_approvals_table', 1),
(19, '2026_08_22_163151_add_status_to_approvals', 1),
(20, '2026_08_22_224822_create_task_user_table', 1),
(21, '2026_08_22_225353_drop_assigned_to_from_tasks_table', 1),
(22, '2026_08_22_232425_create_executions_table', 1),
(23, '2026_08_23_003732_create_workplans_table', 1),
(24, '2026_08_28_084059_remove_maximum_people_per_event_from_halls_table', 2),
(25, '2026_08_29_171156_update_bookings_table_for_modal', 3),
(26, '2026_08_29_184946_add_status_to_bookings_table', 4),
(27, '2026_09_03_120700_create_permissions_table', 5),
(28, '2026_09_03_171338_create_cache_table', 6),
(29, '2026_09_03_173135_create_permission_tables', 7),
(30, '2026_09_03_173409_add_deleted_at_to_permissions_table', 8),
(31, '2026_09_03_173510_add_deleted_at_to_roles_table', 9),
(32, '2026_09_03_173625_add_description_to_roles_table', 10),
(33, '2026_09_04_150743_create_tenants_table', 11),
(37, '2026_09_04_155647_create_tenants_table', 12),
(38, '2026_09_04_155648_create_ternant_units_table', 12),
(39, '2026_09_04_155649_create_contracts_table', 12),
(40, '2026_09_04_155650_create_locations_table', 12),
(41, '2026_09_04_155650_create_ternant_payments_table', 12),
(42, '2026_09_04_161927_add_location_id_to_ternant_units_table', 13),
(43, '2026_09_07_124523_create_booking_times_table', 14),
(44, '2026_09_09_114403_add_phone_to_users_table', 15),
(45, '2026_09_09_215943_create_message_logs_table', 16),
(46, '2026_09_10_153422_create_banks_table', 17),
(47, '2026_09_10_161208_add_deleted_at_to_banks_table', 18),
(48, '2026_09_10_172703_create_majengos_table', 19),
(49, '2026_09_10_180418_add_majengo_id_to_ternant_units_table', 20),
(50, '2026_09_13_135126_create_booking_events_table', 21),
(51, '2026_09_13_153815_add_booking_event_id_to_bookings_table', 22),
(52, '2026_09_14_152457_add_pricing_fields_to_ternant_units_table', 23),
(53, '2026_09_19_111704_add_unit_phone_email_to_tenants_table', 24),
(54, '2026_09_25_121836_remove_ternant_unit_id_from_tenants_table', 25),
(55, '2026_09_25_122613_add_tenant_id_to_ternant_units_table', 26),
(56, '2026_09_29_194201_create_contract_unit_table', 27),
(57, '2026_10_21_201118_create_project_sources_table', 28),
(58, '2026_10_21_202938_create_awamus_table', 29),
(59, '2026_10_21_203913_create_cages_table', 30),
(60, '2026_10_21_204722_create_vizimbas_table', 31),
(61, '2026_10_21_205317_create_bajetis_table', 32),
(62, '2026_10_21_210759_create_projects_table', 32),
(63, '2026_10_21_210801_create_loan_trackers_table', 32),
(64, '2026_10_21_210930_create_vizimba_payments_table', 32),
(65, '2026_10_21_215144_create_matumizis_table', 33),
(66, '2026_10_21_215145_create_vizimba_units_table', 33),
(67, '2026_10_21_215147_create_stocks_table', 33),
(68, '2026_10_21_215149_create_stores_table', 33),
(69, '2026_10_21_215150_create_stock_records_table', 33),
(70, '2026_10_22_125059_create_suppliers_table', 34),
(71, '2026_10_22_125100_create_fish_table', 34),
(72, '2026_10_22_133315_add_type_to_stores_table', 35),
(73, '2026_10_22_134943_update_stock_records_for_stock_movements', 36),
(74, '2026_10_22_140920_update_stock_records_table_for_store_movement', 37),
(75, '2026_10_22_141920_replace_stock_from_and_stock_to_with_stock_id_in_stock_records_table', 38),
(76, '2026_10_22_142320_remove_store_id_from_stock_records_table', 39),
(77, '2026_10_23_155502_add_total_fish_to_cages_table', 40),
(78, '2026_10_23_164548_create_fish_stockings_table', 41),
(79, '2026_10_23_164550_create_fish_harvestings_table', 41),
(80, '2026_10_23_164552_create_stock_takings_table', 41),
(81, '2026_10_23_164554_create_fish_feedings_table', 41),
(82, '2026_10_26_112936_add_total_amount_to_stock_takings_table', 42),
(83, '2026_10_26_140557_add_unit_and_session_to_fish_feedings_table', 43),
(84, '2026_10_28_144243_add_measurements_to_cages_table', 44),
(85, '2026_10_29_170328_create_fish_deaths_table', 45),
(86, '2026_10_29_170328_create_fish_samplings_table', 45),
(87, '2026_10_30_121653_add_weight_calculation_fields_to_fish_harvestings_table', 46),
(88, '2026_11_01_230024_create_discounts_table', 47),
(89, '2026_11_01_230259_add_discount_fields_to_invoices_table', 47),
(90, '2026_11_01_235128_add_comment_to_discounts_table', 48);

-- --------------------------------------------------------

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 2);

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `invoice_id` bigint(20) UNSIGNED NOT NULL,
  `booking_id` bigint(20) UNSIGNED NOT NULL,
  `checked_by` bigint(20) UNSIGNED DEFAULT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `receipt` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `remarks` text DEFAULT NULL,
  `checked_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'view.role', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(2, 'create.role', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(3, 'edit.role', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(4, 'delete.role', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(5, 'view.permission', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(6, 'create.permission', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(7, 'edit.permission', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(8, 'delete.permission', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(9, 'view.user', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(10, 'create.user', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(11, 'edit.user', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(12, 'delete.user', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(13, 'view.department', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(14, 'create.department', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(15, 'edit.department', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(16, 'delete.department', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(17, 'view.task', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(18, 'create.task', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(19, 'edit.task', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(20, 'delete.task', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(21, 'view.hall', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(22, 'create.hall', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(23, 'edit.hall', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(24, 'delete.hall', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(25, 'view.invoice', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(26, 'create.invoice', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(27, 'edit.invoice', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(28, 'delete.invoice', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(29, 'view.booking', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(30, 'create.booking', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(31, 'edit.booking', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(32, 'delete.booking', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(33, 'view.payment', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(34, 'create.payment', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(35, 'edit.payment', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(36, 'delete.payment', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(37, 'view.unit', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(38, 'create.unit', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(39, 'edit.unit', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(40, 'delete.unit', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(41, 'view.approval', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(42, 'create.approval', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(43, 'edit.approval', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(44, 'delete.approval', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(45, 'view.execution', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(46, 'create.execution', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(47, 'edit.execution', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(48, 'delete.execution', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(49, 'view.workplan', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(50, 'create.workplan', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(51, 'edit.workplan', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(52, 'delete.workplan', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(53, 'view.dashboard', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL),
(54, 'view.bookingtime', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(55, 'create.bookingtime', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(56, 'edit.bookingtime', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(57, 'delete.bookingtime', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(58, 'restore.bookingtime', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(59, 'view.tenant', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(60, 'create.tenant', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(61, 'edit.tenant', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(62, 'delete.tenant', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(63, 'restore.tenant', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(64, 'view.tenantunit', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(65, 'create.tenantunit', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(66, 'edit.tenantunit', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(67, 'delete.tenantunit', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(68, 'restore.tenantunit', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(69, 'view.contract', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(70, 'create.contract', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(71, 'edit.contract', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(72, 'delete.contract', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(73, 'restore.contract', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(74, 'view.tenantpayment', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(75, 'create.tenantpayment', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(76, 'edit.tenantpayment', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(77, 'delete.tenantpayment', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(78, 'restore.tenantpayment', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(79, 'view.location', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(80, 'create.location', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(81, 'edit.location', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(82, 'delete.location', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(83, 'restore.location', 'web', '2026-09-08 12:29:18', '2026-09-08 12:29:18', NULL),
(84, 'view.banks', 'web', '2026-09-10 13:46:53', '2026-09-10 13:46:53', NULL),
(85, 'view.paymentreport', 'web', '2026-09-11 07:36:30', '2026-09-11 07:36:30', NULL),
(86, 'view.booking-event', 'web', '2026-09-13 11:34:06', '2026-09-13 11:34:06', NULL),
(87, 'create.booking-event', 'web', '2026-09-13 11:34:53', '2026-09-13 11:34:53', NULL),
(88, 'delete.booking-event', 'web', '2026-09-13 11:50:03', '2026-09-13 11:50:03', NULL),
(89, 'create.discount', 'web', '2026-11-01 20:29:54', '2026-11-01 20:29:54', NULL),
(90, 'view.discount', 'web', '2026-11-01 20:30:21', '2026-11-01 20:30:21', NULL),
(91, 'edit.discount', 'web', '2026-11-01 20:30:39', '2026-11-01 20:30:39', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `project_source_id` bigint(20) UNSIGNED NOT NULL,
  `awamu_id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `vizimba_id` bigint(20) UNSIGNED NOT NULL,
  `bajet_id` bigint(20) UNSIGNED NOT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `name`, `status`, `project_source_id`, `awamu_id`, `cage_id`, `vizimba_id`, `bajet_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'MRADI WA BUCHOSA', 'active', 1, 1, 1, 1, 1, 1, 1, '2026-10-21 18:26:21', '2026-10-21 18:33:29', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `project_sources`
--

CREATE TABLE `project_sources` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `project_sources`
--

INSERT INTO `project_sources` (`id`, `name`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'TADB', 'active', 1, 1, '2026-10-21 17:26:32', '2026-10-22 09:31:01', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`, `deleted_at`, `description`) VALUES
(1, 'admin', 'web', '2026-09-03 14:42:49', '2026-09-03 14:54:32', NULL, 'admin'),
(2, 'accountant', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL, NULL),
(3, 'general manager', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL, NULL),
(4, 'hr', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL, NULL),
(5, 'other users', 'web', '2026-09-03 14:42:49', '2026-09-03 14:42:49', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 3),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(5, 3),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(9, 3),
(9, 4),
(10, 1),
(10, 4),
(11, 1),
(11, 4),
(12, 1),
(12, 4),
(13, 1),
(13, 3),
(13, 4),
(14, 1),
(14, 4),
(15, 1),
(15, 4),
(16, 1),
(16, 4),
(17, 1),
(17, 3),
(17, 5),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(21, 3),
(21, 5),
(22, 1),
(23, 1),
(23, 2),
(24, 1),
(25, 1),
(25, 2),
(25, 3),
(25, 5),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(29, 2),
(29, 3),
(29, 5),
(30, 1),
(31, 1),
(32, 1),
(33, 1),
(33, 2),
(33, 3),
(33, 5),
(34, 1),
(34, 2),
(35, 1),
(36, 1),
(36, 2),
(37, 1),
(37, 3),
(38, 1),
(39, 1),
(40, 1),
(41, 1),
(41, 3),
(42, 1),
(43, 1),
(44, 1),
(45, 1),
(45, 3),
(46, 1),
(47, 1),
(48, 1),
(49, 1),
(49, 3),
(50, 1),
(51, 1),
(52, 1),
(53, 1),
(53, 3),
(53, 5),
(54, 1),
(55, 1),
(56, 1),
(56, 2),
(57, 1),
(58, 1),
(59, 1),
(60, 1),
(61, 1),
(62, 1),
(63, 1),
(64, 1),
(65, 1),
(66, 1),
(67, 1),
(68, 1),
(69, 1),
(70, 1),
(71, 1),
(72, 1),
(73, 1),
(74, 1),
(75, 1),
(76, 1),
(77, 1),
(78, 1),
(79, 1),
(80, 1),
(81, 1),
(82, 1),
(83, 1),
(84, 1),
(85, 1),
(85, 2),
(86, 1),
(87, 1),
(88, 1),
(89, 1),
(90, 1),
(91, 1);

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('2hJANuX1W3JSKm9HGHnTKpSCgyerfSYnfkUoWAq3', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoid001cHV5UFBXTG1ITkxjWWxsVW1QMG9BNUlyaHJqZjdVcEpydklDOSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9maXNoLWRlYXRoIjtzOjU6InJvdXRlIjtzOjE2OiJmaXNoLWRlYXRoLmluZGV4Ijt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1793285461),
('6Ji0KLNir4kTKHTSY52Yv2YFYo9oqexYfcH8x85X', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoienhpMTNyS1ZidXo5Zkp4enh3MHE4RHgwMllmVEVHQ1JSMXFSWURuYiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJuZXciO2E6MDp7fXM6Mzoib2xkIjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7Tjt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1793567444),
('7YJTULBwtIR3iHTvL7tZ8sjE8DGOTtzI1z07Uqrf', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoiemhHazc3UDVRcmxGNk4ySXJkOU51VnRndEs1am5mcmhrWmFzaXBaNyI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czozOToiaHR0cDovLzEyNy4wLjAuMTo4MDAwL3ZpemltYmEtZGFzaGJvYXJkIjt9czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjU6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC8yZmEiO3M6NToicm91dGUiO3M6MzoiMmZhIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czoxMzoiMmZhXDp1c2VyXDppZCI7aToxO3M6OToiMmZhXDpjb2RlIjtpOjQyMTcyNTtzOjEyOiIyZmFcOmV4cGlyZXMiO086MjU6IklsbHVtaW5hdGVcU3VwcG9ydFxDYXJib24iOjM6e3M6NDoiZGF0ZSI7czoyNjoiMjAyNi0xMC0zMSAxNjowMjo0MC40Nzk3NjYiO3M6MTM6InRpbWV6b25lX3R5cGUiO2k6MztzOjg6InRpbWV6b25lIjtzOjE0OiJBZnJpY2EvTmFpcm9iaSI7fX0=', 1793451465),
('Ow5h6ayYLbv2k8wrBMpwLPSJn6xK3FVoqyfBHQgZ', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoienQ3WVMyMVlmUFpSSDM0TWlGRmtXcFFnaHlvZTJqOEdmaHMyTEJkWiI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czozMjoiaHR0cDovLzEyNy4wLjAuMTo4MDAwL2Zpc2gtZGVhdGgiO31zOjk6Il9wcmV2aW91cyI7YToyOntzOjM6InVybCI7czozMjoiaHR0cDovLzEyNy4wLjAuMTo4MDAwL2Zpc2gtZGVhdGgiO3M6NToicm91dGUiO3M6MTY6ImZpc2gtZGVhdGguaW5kZXgiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1793342546),
('ZfB9B0XPhqIwnljNlyXa8btVwA1qDPL4OdFrDgIg', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiY3NhbzNhVFF2bUo5UzJBR1JuN3dVajZyaXlad2dnTENZNnhyYkk4OSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mzk6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC92aXppbWJhLWRhc2hib2FyZCI7czo1OiJyb3V0ZSI7czoyMzoidml6aW1iYS1kYXNoYm9hcmQuaW5kZXgiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO30=', 1793363984),
('ZIexev2fAH42UEybbrXlckd1PwpyQgy1EPs0QFqj', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36', 'YTo4OntzOjY6Il90b2tlbiI7czo0MDoiQURRZnZJRlI2WHZZdnZBU3VXb3VBdDFUZFZFSG9maE1za3JqRDMzbiI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czozNjoiaHR0cDovLzEyNy4wLjAuMTo4MDAwL2Zpc2gtc3RvY2tpbmdzIjt9czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mjc6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9sb2dpbiI7czo1OiJyb3V0ZSI7czo1OiJsb2dpbiI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjE6e2k6MDtzOjc6InN1Y2Nlc3MiO31zOjM6Im5ldyI7YTowOnt9fXM6MTM6IjJmYVw6dXNlclw6aWQiO2k6MTtzOjk6IjJmYVw6Y29kZSI7aTo3NTkyMTE7czoxMjoiMmZhXDpleHBpcmVzIjtPOjI1OiJJbGx1bWluYXRlXFN1cHBvcnRcQ2FyYm9uIjozOntzOjQ6ImRhdGUiO3M6MjY6IjIwMjYtMTAtMjkgMTY6NTM6MDIuMTcyNzg0IjtzOjEzOiJ0aW1lem9uZV90eXBlIjtpOjM7czo4OiJ0aW1lem9uZSI7czoxNDoiQWZyaWNhL05haXJvYmkiO31zOjc6InN1Y2Nlc3MiO3M6NDQ6IkVudGVyIHRoZSAyRkEgY29kZSBzZW50IHRvIHlvdXIgcGhvbmUvZW1haWwuIjt9', 1793281696);

-- --------------------------------------------------------

--
-- Table structure for table `stocks`
--

CREATE TABLE `stocks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stocks`
--

INSERT INTO `stocks` (`id`, `name`, `project_id`, `vizimba_unit_id`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'vyakula samaki wadogo', 1, 2, 'active', 1, 1, '2026-10-21 19:49:46', '2026-10-21 19:49:46', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `stock_records`
--

CREATE TABLE `stock_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(15,3) NOT NULL,
  `movement_type` enum('transfer','return') NOT NULL DEFAULT 'transfer',
  `from_store_id` bigint(20) UNSIGNED DEFAULT NULL,
  `to_store_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reference_number` varchar(255) DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `stock_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_records`
--

INSERT INTO `stock_records` (`id`, `amount`, `movement_type`, `from_store_id`, `to_store_id`, `reference_number`, `remarks`, `vizimba_unit_id`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`, `stock_id`) VALUES
(1, 20.000, 'transfer', 2, 3, NULL, NULL, 2, 'active', 1, 1, '2026-10-23 10:58:17', '2026-10-23 11:04:01', NULL, 1),
(2, 3.000, 'transfer', 3, 4, NULL, NULL, 2, 'active', 1, 1, '2026-10-23 11:06:27', '2026-10-26 11:30:17', NULL, 1);

-- --------------------------------------------------------

--
-- Table structure for table `stock_takings`
--

CREATE TABLE `stock_takings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `stock_id` bigint(20) UNSIGNED NOT NULL,
  `store_id` bigint(20) UNSIGNED NOT NULL,
  `supplier_id` bigint(20) UNSIGNED NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `price_per_unit` decimal(15,2) NOT NULL DEFAULT 0.00,
  `quantity` decimal(15,3) NOT NULL,
  `total_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `comment` text DEFAULT NULL,
  `store_keeper_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_takings`
--

INSERT INTO `stock_takings` (`id`, `stock_id`, `store_id`, `supplier_id`, `vizimba_unit_id`, `price_per_unit`, `quantity`, `total_amount`, `project_id`, `date`, `comment`, `store_keeper_id`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 1, 2, 1, 2, 5500.00, 5.000, 27500.00, 1, '2026-10-26', NULL, 1, 'active', 1, 1, '2026-10-26 08:35:19', '2026-10-26 10:14:02', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `stores`
--

CREATE TABLE `stores` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` enum('main','intermediate','last') NOT NULL DEFAULT 'main',
  `location` varchar(255) DEFAULT NULL,
  `storage_size` decimal(15,3) NOT NULL,
  `vizimba_unit_id` bigint(20) UNSIGNED NOT NULL,
  `store_keeper_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reorder_level` decimal(15,3) NOT NULL DEFAULT 0.000,
  `total_amount` decimal(15,3) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stores`
--

INSERT INTO `stores` (`id`, `name`, `type`, `location`, `storage_size`, `vizimba_unit_id`, `store_keeper_id`, `reorder_level`, `total_amount`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 'NCU HQ STORE', 'main', 'ncu hq', 7000.000, 2, 1, 1000.000, 87.000, 'active', 1, 1, '2026-10-22 10:39:13', '2026-10-26 10:14:02', NULL),
(3, 'LUCHELELE STORE', 'intermediate', 'LUCHELELE SHAMBANI', 800.000, 2, 2, 200.000, 17.000, 'active', 1, 1, '2026-10-22 10:40:39', '2026-10-26 11:30:17', NULL),
(4, 'LUCHELELE ZIWANI', 'last', 'LUCHELELE ZIWANI', 9.000, 2, 2, 5.000, 1.003, 'active', 1, 1, '2026-10-22 10:41:52', '2026-10-27 10:25:10', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(30) NOT NULL,
  `registration_no` varchar(255) NOT NULL,
  `delivery_terms` enum('Pickup','Delivery') NOT NULL,
  `product_type` enum('Fish Feed','Fingerlings','Aquaculture Equipment','Fish Farming Consultancy') NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `physical_address` text NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` (`id`, `name`, `phone`, `registration_no`, `delivery_terms`, `product_type`, `email`, `physical_address`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'BACKBONE', '0625200214', '88766', 'Pickup', 'Fingerlings', 'info@ncultd.or.tz', 'KARIBU NA JENGO LA CCM MAKAO MAKUU MWANZA', 'active', 1, 1, '2026-10-22 09:58:59', '2026-10-22 10:06:53', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `assigned_date` date NOT NULL,
  `due_date` date DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` enum('pending_approval','approved','rejected','in_progress','completed_pending_approval','completed','completion_rejected','cancelled') NOT NULL DEFAULT 'pending_approval',
  `rejection_reason` text DEFAULT NULL,
  `completion_comment` text DEFAULT NULL,
  `started_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `duration_minutes` int(10) UNSIGNED DEFAULT NULL,
  `approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `completion_approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `completion_approved_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `parent_task_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `name`, `description`, `assigned_date`, `due_date`, `created_by`, `department_id`, `unit_id`, `status`, `rejection_reason`, `completion_comment`, `started_at`, `completed_at`, `duration_minutes`, `approved_by`, `approved_at`, `completion_approved_by`, `completion_approved_at`, `created_at`, `updated_at`, `deleted_at`, `parent_task_id`) VALUES
(1, 'uuuu', 'uuuuu', '2026-08-31', '2026-09-04', 1, NULL, NULL, 'pending_approval', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-08-30 21:57:19', '2026-08-30 21:57:19', NULL, NULL),
(2, 'uuuu', 'uuuuu', '2026-08-31', '2026-09-04', 1, NULL, NULL, 'pending_approval', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-08-30 21:57:21', '2026-08-30 21:57:21', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `task_comments`
--

CREATE TABLE `task_comments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `comment` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `task_user`
--

CREATE TABLE `task_user` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `task_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `task_user`
--

INSERT INTO `task_user` (`id`, `task_id`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL),
(2, 2, 1, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tenants`
--

CREATE TABLE `tenants` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `acc_no` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `bank_id` bigint(20) UNSIGNED DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenants`
--

INSERT INTO `tenants` (`id`, `name`, `acc_no`, `created_at`, `updated_at`, `deleted_at`, `bank_id`, `phone`, `email`) VALUES
(6, 'innocent luciano mgimwa', NULL, '2026-09-29 16:29:47', '2026-09-29 16:29:47', NULL, 1, '0663584747', 'info@ncultd.or.tz');

-- --------------------------------------------------------

--
-- Table structure for table `ternant_payments`
--

CREATE TABLE `ternant_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `contract_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `payment_date` date NOT NULL,
  `remarks` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ternant_units`
--

CREATE TABLE `ternant_units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `unit_no` varchar(255) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `square_meter` decimal(10,2) DEFAULT NULL,
  `amount_per_month` decimal(12,2) DEFAULT NULL,
  `amount_per_quarter` decimal(12,2) DEFAULT NULL,
  `amount_per_annual` decimal(12,2) DEFAULT NULL,
  `majengo_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `location_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ternant_units`
--

INSERT INTO `ternant_units` (`id`, `tenant_id`, `unit_no`, `description`, `square_meter`, `amount_per_month`, `amount_per_quarter`, `amount_per_annual`, `majengo_id`, `created_at`, `updated_at`, `deleted_at`, `location_id`) VALUES
(2, 6, '402', '402', 90.00, 10000.00, 2700000.00, 10800000.00, 1, '2026-09-14 12:57:54', '2026-10-19 12:31:43', NULL, NULL),
(3, 6, '403', 'chumba cha kwanza', 202.00, 20000.00, 12120000.00, 48480000.00, 1, '2026-09-29 16:25:39', '2026-10-19 12:31:43', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `department_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `head_user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `department_id`, `name`, `description`, `head_user_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(9, 1, 'ICT DEPARTMENT', 'Handles ICT operations', NULL, '2026-08-28 07:53:47', '2026-08-28 07:53:47', NULL),
(10, 1, 'ICT SUPPORT UNIT', 'Provides technical support', NULL, '2026-08-28 07:53:47', '2026-08-28 07:53:47', NULL),
(11, 1, 'ICT DEVELOPMENT UNIT', 'Focuses on software and systems development', NULL, '2026-08-28 07:53:47', '2026-08-28 07:53:47', NULL),
(12, 1, 'ICT SECURITY UNIT', 'Manages cybersecurity and data protection', NULL, '2026-08-28 07:53:47', '2026-08-28 07:53:47', NULL),
(13, 3, 'accountanting', 'accountant', 1, '2026-09-11 09:53:54', '2026-09-11 11:34:13', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `gender` enum('Male','Female','Other') DEFAULT NULL,
  `role_id` bigint(20) UNSIGNED DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `manager_id` bigint(20) UNSIGNED DEFAULT NULL,
  `is_department_head` tinyint(1) NOT NULL DEFAULT 0,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `is_unit_head` tinyint(1) NOT NULL DEFAULT 0,
  `unit_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `phone`, `gender`, `role_id`, `department_id`, `manager_id`, `is_department_head`, `password`, `remember_token`, `created_at`, `updated_at`, `deleted_at`, `is_unit_head`, `unit_id`) VALUES
(1, 'Raphael', 'Richard', 'raphaelrichard754@gmail.com', '0625200214', 'Male', 1, 2, NULL, 0, '$2y$12$rzGvDk1FKoutly.a/cgeu.6VuhEjMVb0DGOMIKfPiyIQ9noSjtMNm', NULL, '2026-08-28 04:54:16', '2026-09-09 19:30:17', NULL, 0, 9),
(2, 'johanes', 'mkami', 'info@ncultd.or.tz', '0658381644', 'Male', 2, NULL, NULL, 0, '$2y$12$rY1g.ub3CLrgqDhUzdc3Y.Ul1KaOCXicIyzm2xJL0RqvSytPQ00UG', NULL, '2026-09-03 11:32:42', '2026-09-11 11:46:04', NULL, 0, 9);

-- --------------------------------------------------------

--
-- Table structure for table `vizimbas`
--

CREATE TABLE `vizimbas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `number` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vizimbas`
--

INSERT INTO `vizimbas` (`id`, `number`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '8', 'active', 1, 1, '2026-10-21 17:51:38', '2026-10-21 17:51:38', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `vizimba_payments`
--

CREATE TABLE `vizimba_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `req_no` varchar(255) NOT NULL,
  `date` date NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `cage_id` bigint(20) UNSIGNED NOT NULL,
  `purpose` text NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vizimba_units`
--

CREATE TABLE `vizimba_units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `base_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `conversion_factor` decimal(15,6) NOT NULL DEFAULT 1.000000,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `updated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vizimba_units`
--

INSERT INTO `vizimba_units` (`id`, `name`, `base_unit_id`, `conversion_factor`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'kg', NULL, 1.000000, 'active', 1, 1, '2026-10-21 19:27:38', '2026-10-21 19:27:38', NULL),
(2, 'gunia', 1, 10.000000, 'active', 1, 1, '2026-10-21 19:28:21', '2026-10-30 07:38:01', NULL),
(3, 'gram', 1, 0.001000, 'active', 1, 1, '2026-10-30 07:38:39', '2026-10-30 07:38:39', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `workplans`
--

CREATE TABLE `workplans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `creator_id` bigint(20) UNSIGNED NOT NULL,
  `editor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `start_date` date NOT NULL,
  `status` enum('draft','submitted','approved') NOT NULL DEFAULT 'draft',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `workplans`
--

INSERT INTO `workplans` (`id`, `creator_id`, `editor_id`, `title`, `description`, `start_date`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'kufundisha', 'fffff', '2026-09-07', 'approved', '2026-08-30 21:56:12', '2026-08-30 21:56:45');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `approvals`
--
ALTER TABLE `approvals`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `awamus`
--
ALTER TABLE `awamus`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `awamus_name_unique` (`name`);

--
-- Indexes for table `bajetis`
--
ALTER TABLE `bajetis`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bookings_hall_id_foreign` (`hall_id`),
  ADD KEY `bookings_booking_event_id_foreign` (`booking_event_id`);

--
-- Indexes for table `booking_events`
--
ALTER TABLE `booking_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `booking_events_hall_id_foreign` (`hall_id`);

--
-- Indexes for table `booking_times`
--
ALTER TABLE `booking_times`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Indexes for table `cages`
--
ALTER TABLE `cages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `cages_name_unique` (`name`);

--
-- Indexes for table `contracts`
--
ALTER TABLE `contracts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contracts_tenant_id_foreign` (`tenant_id`),
  ADD KEY `contracts_ternant_unit_id_foreign` (`ternant_unit_id`);

--
-- Indexes for table `contract_unit`
--
ALTER TABLE `contract_unit`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `contract_unit_contract_id_ternant_unit_id_unique` (`contract_id`,`ternant_unit_id`),
  ADD KEY `contract_unit_ternant_unit_id_foreign` (`ternant_unit_id`);

--
-- Indexes for table `departments`
--
ALTER TABLE `departments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `departments_head_user_id_foreign` (`head_user_id`);

--
-- Indexes for table `discounts`
--
ALTER TABLE `discounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `discounts_phone_unique` (`phone`),
  ADD KEY `discounts_created_by_foreign` (`created_by`),
  ADD KEY `discounts_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `executions`
--
ALTER TABLE `executions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `executions_task_id_foreign` (`task_id`);

--
-- Indexes for table `fishes`
--
ALTER TABLE `fishes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fishes_supplier_id_foreign` (`supplier_id`),
  ADD KEY `fishes_created_by_foreign` (`created_by`),
  ADD KEY `fishes_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `fish_deaths`
--
ALTER TABLE `fish_deaths`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fish_deaths_cage_id_foreign` (`cage_id`),
  ADD KEY `fish_deaths_created_by_foreign` (`created_by`),
  ADD KEY `fish_deaths_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `fish_feedings`
--
ALTER TABLE `fish_feedings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fish_feedings_stock_id_foreign` (`stock_id`),
  ADD KEY `fish_feedings_store_id_foreign` (`store_id`),
  ADD KEY `fish_feedings_store_keeper_id_foreign` (`store_keeper_id`),
  ADD KEY `fish_feedings_created_by_foreign` (`created_by`),
  ADD KEY `fish_feedings_updated_by_foreign` (`updated_by`),
  ADD KEY `fish_feedings_vizimba_unit_id_foreign` (`vizimba_unit_id`);

--
-- Indexes for table `fish_harvestings`
--
ALTER TABLE `fish_harvestings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fish_harvestings_cage_id_foreign` (`cage_id`),
  ADD KEY `fish_harvestings_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `fish_harvestings_created_by_foreign` (`created_by`),
  ADD KEY `fish_harvestings_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `fish_samplings`
--
ALTER TABLE `fish_samplings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fish_samplings_cage_id_foreign` (`cage_id`),
  ADD KEY `fish_samplings_created_by_foreign` (`created_by`),
  ADD KEY `fish_samplings_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `fish_stockings`
--
ALTER TABLE `fish_stockings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fish_stockings_supplier_id_foreign` (`supplier_id`),
  ADD KEY `fish_stockings_fish_id_foreign` (`fish_id`),
  ADD KEY `fish_stockings_cage_id_foreign` (`cage_id`),
  ADD KEY `fish_stockings_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `fish_stockings_created_by_foreign` (`created_by`),
  ADD KEY `fish_stockings_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `halls`
--
ALTER TABLE `halls`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `invoices_invoice_number_unique` (`invoice_number`),
  ADD KEY `invoices_hall_id_foreign` (`hall_id`),
  ADD KEY `invoices_booking_id_foreign` (`booking_id`),
  ADD KEY `invoices_discount_id_foreign` (`discount_id`);

--
-- Indexes for table `loan_trackers`
--
ALTER TABLE `loan_trackers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `loan_trackers_project_id_foreign` (`project_id`),
  ADD KEY `loan_trackers_created_by_foreign` (`created_by`),
  ADD KEY `loan_trackers_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `locations`
--
ALTER TABLE `locations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `majengos`
--
ALTER TABLE `majengos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `majengos_location_id_foreign` (`location_id`);

--
-- Indexes for table `matumizis`
--
ALTER TABLE `matumizis`
  ADD PRIMARY KEY (`id`),
  ADD KEY `matumizis_project_id_foreign` (`project_id`),
  ADD KEY `matumizis_cage_id_foreign` (`cage_id`),
  ADD KEY `matumizis_created_by_foreign` (`created_by`),
  ADD KEY `matumizis_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `message_logs`
--
ALTER TABLE `message_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payments_invoice_id_foreign` (`invoice_id`),
  ADD KEY `payments_booking_id_foreign` (`booking_id`),
  ADD KEY `payments_checked_by_foreign` (`checked_by`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD KEY `projects_project_source_id_foreign` (`project_source_id`),
  ADD KEY `projects_awamu_id_foreign` (`awamu_id`),
  ADD KEY `projects_cage_id_foreign` (`cage_id`),
  ADD KEY `projects_vizimba_id_foreign` (`vizimba_id`),
  ADD KEY `projects_bajet_id_foreign` (`bajet_id`),
  ADD KEY `projects_created_by_foreign` (`created_by`),
  ADD KEY `projects_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `project_sources`
--
ALTER TABLE `project_sources`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_sources_name_unique` (`name`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `stocks`
--
ALTER TABLE `stocks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stocks_project_id_foreign` (`project_id`),
  ADD KEY `stocks_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `stocks_created_by_foreign` (`created_by`),
  ADD KEY `stocks_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `stock_records`
--
ALTER TABLE `stock_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_records_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `stock_records_created_by_foreign` (`created_by`),
  ADD KEY `stock_records_updated_by_foreign` (`updated_by`),
  ADD KEY `stock_records_from_store_id_foreign` (`from_store_id`),
  ADD KEY `stock_records_to_store_id_foreign` (`to_store_id`),
  ADD KEY `stock_records_stock_id_foreign` (`stock_id`);

--
-- Indexes for table `stock_takings`
--
ALTER TABLE `stock_takings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_takings_stock_id_foreign` (`stock_id`),
  ADD KEY `stock_takings_store_id_foreign` (`store_id`),
  ADD KEY `stock_takings_supplier_id_foreign` (`supplier_id`),
  ADD KEY `stock_takings_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `stock_takings_project_id_foreign` (`project_id`),
  ADD KEY `stock_takings_store_keeper_id_foreign` (`store_keeper_id`),
  ADD KEY `stock_takings_created_by_foreign` (`created_by`),
  ADD KEY `stock_takings_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `stores`
--
ALTER TABLE `stores`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stores_vizimba_unit_id_foreign` (`vizimba_unit_id`),
  ADD KEY `stores_store_keeper_id_foreign` (`store_keeper_id`),
  ADD KEY `stores_created_by_foreign` (`created_by`),
  ADD KEY `stores_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `suppliers_registration_no_unique` (`registration_no`),
  ADD KEY `suppliers_created_by_foreign` (`created_by`),
  ADD KEY `suppliers_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tasks_created_by_foreign` (`created_by`),
  ADD KEY `tasks_department_id_foreign` (`department_id`),
  ADD KEY `tasks_unit_id_foreign` (`unit_id`),
  ADD KEY `tasks_approved_by_foreign` (`approved_by`),
  ADD KEY `tasks_completion_approved_by_foreign` (`completion_approved_by`),
  ADD KEY `tasks_parent_task_id_foreign` (`parent_task_id`);

--
-- Indexes for table `task_comments`
--
ALTER TABLE `task_comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `task_comments_user_id_foreign` (`user_id`);

--
-- Indexes for table `task_user`
--
ALTER TABLE `task_user`
  ADD PRIMARY KEY (`id`),
  ADD KEY `task_user_task_id_foreign` (`task_id`),
  ADD KEY `task_user_user_id_foreign` (`user_id`);

--
-- Indexes for table `tenants`
--
ALTER TABLE `tenants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenants_bank_id_foreign` (`bank_id`);

--
-- Indexes for table `ternant_payments`
--
ALTER TABLE `ternant_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ternant_payments_contract_id_foreign` (`contract_id`);

--
-- Indexes for table `ternant_units`
--
ALTER TABLE `ternant_units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ternant_units_location_id_foreign` (`location_id`),
  ADD KEY `ternant_units_majengo_id_foreign` (`majengo_id`),
  ADD KEY `ternant_units_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `units_department_id_foreign` (`department_id`),
  ADD KEY `units_head_user_id_foreign` (`head_user_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_phone_unique` (`phone`),
  ADD KEY `users_role_id_foreign` (`role_id`),
  ADD KEY `users_department_id_foreign` (`department_id`),
  ADD KEY `users_manager_id_foreign` (`manager_id`),
  ADD KEY `users_unit_id_foreign` (`unit_id`);

--
-- Indexes for table `vizimbas`
--
ALTER TABLE `vizimbas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `vizimbas_number_unique` (`number`);

--
-- Indexes for table `vizimba_payments`
--
ALTER TABLE `vizimba_payments`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `vizimba_payments_req_no_unique` (`req_no`),
  ADD KEY `vizimba_payments_project_id_foreign` (`project_id`),
  ADD KEY `vizimba_payments_cage_id_foreign` (`cage_id`),
  ADD KEY `vizimba_payments_created_by_foreign` (`created_by`),
  ADD KEY `vizimba_payments_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `vizimba_units`
--
ALTER TABLE `vizimba_units`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `vizimba_units_name_unique` (`name`),
  ADD KEY `vizimba_units_base_unit_id_foreign` (`base_unit_id`),
  ADD KEY `vizimba_units_created_by_foreign` (`created_by`),
  ADD KEY `vizimba_units_updated_by_foreign` (`updated_by`);

--
-- Indexes for table `workplans`
--
ALTER TABLE `workplans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `workplans_creator_id_foreign` (`creator_id`),
  ADD KEY `workplans_editor_id_foreign` (`editor_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `approvals`
--
ALTER TABLE `approvals`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `awamus`
--
ALTER TABLE `awamus`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `bajetis`
--
ALTER TABLE `bajetis`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `banks`
--
ALTER TABLE `banks`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `booking_events`
--
ALTER TABLE `booking_events`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `booking_times`
--
ALTER TABLE `booking_times`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `cages`
--
ALTER TABLE `cages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `contracts`
--
ALTER TABLE `contracts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contract_unit`
--
ALTER TABLE `contract_unit`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `discounts`
--
ALTER TABLE `discounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `executions`
--
ALTER TABLE `executions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `fishes`
--
ALTER TABLE `fishes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `fish_deaths`
--
ALTER TABLE `fish_deaths`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `fish_feedings`
--
ALTER TABLE `fish_feedings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `fish_harvestings`
--
ALTER TABLE `fish_harvestings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `fish_samplings`
--
ALTER TABLE `fish_samplings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `fish_stockings`
--
ALTER TABLE `fish_stockings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `halls`
--
ALTER TABLE `halls`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT for table `loan_trackers`
--
ALTER TABLE `loan_trackers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `locations`
--
ALTER TABLE `locations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `majengos`
--
ALTER TABLE `majengos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `matumizis`
--
ALTER TABLE `matumizis`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `message_logs`
--
ALTER TABLE `message_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=159;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;

--
-- AUTO_INCREMENT for table `projects`
--
ALTER TABLE `projects`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `project_sources`
--
ALTER TABLE `project_sources`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `stocks`
--
ALTER TABLE `stocks`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `stock_records`
--
ALTER TABLE `stock_records`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `stock_takings`
--
ALTER TABLE `stock_takings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `stores`
--
ALTER TABLE `stores`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `task_comments`
--
ALTER TABLE `task_comments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `task_user`
--
ALTER TABLE `task_user`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tenants`
--
ALTER TABLE `tenants`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `ternant_payments`
--
ALTER TABLE `ternant_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ternant_units`
--
ALTER TABLE `ternant_units`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `vizimbas`
--
ALTER TABLE `vizimbas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `vizimba_payments`
--
ALTER TABLE `vizimba_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vizimba_units`
--
ALTER TABLE `vizimba_units`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `workplans`
--
ALTER TABLE `workplans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_booking_event_id_foreign` FOREIGN KEY (`booking_event_id`) REFERENCES `booking_events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_hall_id_foreign` FOREIGN KEY (`hall_id`) REFERENCES `halls` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `booking_events`
--
ALTER TABLE `booking_events`
  ADD CONSTRAINT `booking_events_hall_id_foreign` FOREIGN KEY (`hall_id`) REFERENCES `halls` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `contracts`
--
ALTER TABLE `contracts`
  ADD CONSTRAINT `contracts_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `contracts_ternant_unit_id_foreign` FOREIGN KEY (`ternant_unit_id`) REFERENCES `ternant_units` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `contract_unit`
--
ALTER TABLE `contract_unit`
  ADD CONSTRAINT `contract_unit_contract_id_foreign` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `contract_unit_ternant_unit_id_foreign` FOREIGN KEY (`ternant_unit_id`) REFERENCES `ternant_units` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `departments`
--
ALTER TABLE `departments`
  ADD CONSTRAINT `departments_head_user_id_foreign` FOREIGN KEY (`head_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `discounts`
--
ALTER TABLE `discounts`
  ADD CONSTRAINT `discounts_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `discounts_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `executions`
--
ALTER TABLE `executions`
  ADD CONSTRAINT `executions_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `fishes`
--
ALTER TABLE `fishes`
  ADD CONSTRAINT `fishes_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fishes_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `fishes_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `fish_deaths`
--
ALTER TABLE `fish_deaths`
  ADD CONSTRAINT `fish_deaths_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fish_deaths_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_deaths_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `fish_feedings`
--
ALTER TABLE `fish_feedings`
  ADD CONSTRAINT `fish_feedings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_feedings_stock_id_foreign` FOREIGN KEY (`stock_id`) REFERENCES `stocks` (`id`),
  ADD CONSTRAINT `fish_feedings_store_id_foreign` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`),
  ADD CONSTRAINT `fish_feedings_store_keeper_id_foreign` FOREIGN KEY (`store_keeper_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `fish_feedings_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_feedings_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `fish_harvestings`
--
ALTER TABLE `fish_harvestings`
  ADD CONSTRAINT `fish_harvestings_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`),
  ADD CONSTRAINT `fish_harvestings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_harvestings_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_harvestings_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `fish_samplings`
--
ALTER TABLE `fish_samplings`
  ADD CONSTRAINT `fish_samplings_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fish_samplings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_samplings_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `fish_stockings`
--
ALTER TABLE `fish_stockings`
  ADD CONSTRAINT `fish_stockings_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`),
  ADD CONSTRAINT `fish_stockings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_stockings_fish_id_foreign` FOREIGN KEY (`fish_id`) REFERENCES `fishes` (`id`),
  ADD CONSTRAINT `fish_stockings_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `fish_stockings_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fish_stockings_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `invoices_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `invoices_discount_id_foreign` FOREIGN KEY (`discount_id`) REFERENCES `discounts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `invoices_hall_id_foreign` FOREIGN KEY (`hall_id`) REFERENCES `halls` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `loan_trackers`
--
ALTER TABLE `loan_trackers`
  ADD CONSTRAINT `loan_trackers_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `loan_trackers_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
  ADD CONSTRAINT `loan_trackers_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `majengos`
--
ALTER TABLE `majengos`
  ADD CONSTRAINT `majengos_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `matumizis`
--
ALTER TABLE `matumizis`
  ADD CONSTRAINT `matumizis_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`),
  ADD CONSTRAINT `matumizis_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `matumizis_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
  ADD CONSTRAINT `matumizis_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `payments_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payments_checked_by_foreign` FOREIGN KEY (`checked_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `payments_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `projects`
--
ALTER TABLE `projects`
  ADD CONSTRAINT `projects_awamu_id_foreign` FOREIGN KEY (`awamu_id`) REFERENCES `awamus` (`id`),
  ADD CONSTRAINT `projects_bajet_id_foreign` FOREIGN KEY (`bajet_id`) REFERENCES `bajetis` (`id`),
  ADD CONSTRAINT `projects_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`),
  ADD CONSTRAINT `projects_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_project_source_id_foreign` FOREIGN KEY (`project_source_id`) REFERENCES `project_sources` (`id`),
  ADD CONSTRAINT `projects_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_vizimba_id_foreign` FOREIGN KEY (`vizimba_id`) REFERENCES `vizimbas` (`id`);

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `stocks`
--
ALTER TABLE `stocks`
  ADD CONSTRAINT `stocks_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stocks_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
  ADD CONSTRAINT `stocks_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stocks_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `stock_records`
--
ALTER TABLE `stock_records`
  ADD CONSTRAINT `stock_records_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stock_records_from_store_id_foreign` FOREIGN KEY (`from_store_id`) REFERENCES `stores` (`id`),
  ADD CONSTRAINT `stock_records_stock_id_foreign` FOREIGN KEY (`stock_id`) REFERENCES `stocks` (`id`),
  ADD CONSTRAINT `stock_records_to_store_id_foreign` FOREIGN KEY (`to_store_id`) REFERENCES `stores` (`id`),
  ADD CONSTRAINT `stock_records_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stock_records_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `stock_takings`
--
ALTER TABLE `stock_takings`
  ADD CONSTRAINT `stock_takings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stock_takings_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
  ADD CONSTRAINT `stock_takings_stock_id_foreign` FOREIGN KEY (`stock_id`) REFERENCES `stocks` (`id`),
  ADD CONSTRAINT `stock_takings_store_id_foreign` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`),
  ADD CONSTRAINT `stock_takings_store_keeper_id_foreign` FOREIGN KEY (`store_keeper_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `stock_takings_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `stock_takings_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stock_takings_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `stores`
--
ALTER TABLE `stores`
  ADD CONSTRAINT `stores_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stores_store_keeper_id_foreign` FOREIGN KEY (`store_keeper_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stores_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `stores_vizimba_unit_id_foreign` FOREIGN KEY (`vizimba_unit_id`) REFERENCES `vizimba_units` (`id`);

--
-- Constraints for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD CONSTRAINT `suppliers_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `suppliers_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `tasks_approved_by_foreign` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tasks_completion_approved_by_foreign` FOREIGN KEY (`completion_approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tasks_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tasks_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tasks_parent_task_id_foreign` FOREIGN KEY (`parent_task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tasks_unit_id_foreign` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `task_comments`
--
ALTER TABLE `task_comments`
  ADD CONSTRAINT `task_comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `task_user`
--
ALTER TABLE `task_user`
  ADD CONSTRAINT `task_user_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `task_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tenants`
--
ALTER TABLE `tenants`
  ADD CONSTRAINT `tenants_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `ternant_payments`
--
ALTER TABLE `ternant_payments`
  ADD CONSTRAINT `ternant_payments_contract_id_foreign` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ternant_units`
--
ALTER TABLE `ternant_units`
  ADD CONSTRAINT `ternant_units_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ternant_units_majengo_id_foreign` FOREIGN KEY (`majengo_id`) REFERENCES `majengos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ternant_units_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `units`
--
ALTER TABLE `units`
  ADD CONSTRAINT `units_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `units_head_user_id_foreign` FOREIGN KEY (`head_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `users_manager_id_foreign` FOREIGN KEY (`manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `users_unit_id_foreign` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `vizimba_payments`
--
ALTER TABLE `vizimba_payments`
  ADD CONSTRAINT `vizimba_payments_cage_id_foreign` FOREIGN KEY (`cage_id`) REFERENCES `cages` (`id`),
  ADD CONSTRAINT `vizimba_payments_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `vizimba_payments_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
  ADD CONSTRAINT `vizimba_payments_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `vizimba_units`
--
ALTER TABLE `vizimba_units`
  ADD CONSTRAINT `vizimba_units_base_unit_id_foreign` FOREIGN KEY (`base_unit_id`) REFERENCES `vizimba_units` (`id`),
  ADD CONSTRAINT `vizimba_units_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `vizimba_units_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `workplans`
--
ALTER TABLE `workplans`
  ADD CONSTRAINT `workplans_creator_id_foreign` FOREIGN KEY (`creator_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `workplans_editor_id_foreign` FOREIGN KEY (`editor_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
