-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 23, 2023 at 06:01 PM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 8.1.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: `eazzeyfinance`
--

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

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` bigint(20) NOT NULL,
  `en_account_name` varchar(500) NOT NULL,
  `account_no` varchar(300) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `accounts_group_id` bigint(20) NOT NULL,
  `allow_over_drafts` tinyint(1) NOT NULL,
  `accounts_class_id` bigint(20) NOT NULL,
  `is_cash_account` tinyint(1) NOT NULL,
  `is_deletable` tinyint(1) NOT NULL,
  `is_editable` tinyint(1) NOT NULL,
  `is_operational_account` tinyint(1) NOT NULL,
  `is_reconcilable` tinyint(1) NOT NULL,
  `accounts_subgroup_id` bigint(20) DEFAULT NULL,
  `narration` varchar(3000) DEFAULT NULL,
  `currency_id` bigint(20) NOT NULL,
  `created_by_id` int(11) NOT NULL,
  `code_name` varchar(500) DEFAULT NULL,
  `is_closed` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` (`id`, `en_account_name`, `account_no`, `is_disabled`, `created`, `accounts_group_id`, `allow_over_drafts`, `accounts_class_id`, `is_cash_account`, `is_deletable`, `is_editable`, `is_operational_account`, `is_reconcilable`, `accounts_subgroup_id`, `narration`, `currency_id`, `created_by_id`, `code_name`, `is_closed`) VALUES
(1, 'Cash At Hand', '000001', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'cash', 0),
(3, 'Equity Bank', '000002', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'cash', 0),
(4, 'Stanbic Bank', '000003', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'cash', 0),
(5, 'Airtel Mobile Money', '000004', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'cash', 0),
(6, 'MTN Mobile Money', '000005', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'cash', 0),
(7, 'Capital (Equity)', '000006', 0, '2022-09-29 11:02:31.584992', 3, 0, 2, 1, 0, 1, 0, 1, 1, NULL, 1, 1, 'capital', 0),
(8, 'Loan Receivables(A/C)(all borrower loans)', '000007', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, 'All loans taken out by borrowers', 1, 1, NULL, 0),
(9, 'Interest Receivables(A/C) (intrests from loan)', '000008', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, 'all intrested to be recieved from loans', 1, 1, NULL, 0),
(10, 'Interest Income (income from intrests)', '000008', 0, '2022-09-29 11:02:31.584992', 8, 0, 3, 1, 0, 1, 0, 1, 1, 'income to be recieved from loans', 1, 1, NULL, 0),
(11, 'Fees recievables(A/C)(intrests from loan)', '000009', 0, '2022-09-29 11:02:31.584992', 2, 0, 1, 1, 0, 1, 0, 1, 1, 'Fees we are expecting from loans', 1, 1, NULL, 0),
(12, 'Fees Income(A/C) (income from fees)', '000010', 0, '2022-09-29 11:02:31.584992', 8, 0, 3, 1, 0, 1, 0, 1, 1, 'income to be recieved from loan fees', 1, 1, NULL, 0),
(13, 'Defaulted Loans(A/C)(upaid loans)', '000011', 0, '2022-09-29 11:02:31.584992', 4, 0, 7, 1, 0, 1, 0, 1, 1, 'Defaulted loans from borrowers', 1, 1, '', 0),
(14, 'Intrests Write Off(A/C)(upaid intrests)', '000012', 0, '2022-09-29 11:02:31.584992', 4, 0, 7, 1, 0, 1, 0, 1, 1, 'if the borrower fails to pay intrests', 1, 1, '', 0);

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

--
-- Table structure for table `accounts_classes`
--

CREATE TABLE `accounts_classes` (
  `id` bigint(20) NOT NULL,
  `en_class_name` varchar(500) NOT NULL,
  `code_name` varchar(300) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `accout_fomular_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_classes`
--

INSERT INTO `accounts_classes` (`id`, `en_class_name`, `code_name`, `is_disabled`, `created`, `has_been_modified`, `last_modified`, `accout_fomular_id`) VALUES
(1, 'Assets', 'assets', 0, '2022-09-29 07:54:32.895133', 1, '2022-09-29 07:54:27.000000', 1),
(2, 'Equity (Capital)', 'equity', 0, '2022-09-29 07:55:28.881998', 1, '2022-09-29 07:55:20.000000', 2),
(3, 'Incomes/ Revenue', 'revenue', 0, '2022-09-29 07:55:50.659242', 1, '2022-09-29 07:55:49.000000', 2),
(4, 'Expenses', 'expenses', 0, '2022-09-29 07:56:22.339516', 1, '2022-09-29 07:56:21.000000', 1),
(7, 'Liabilities', 'liabilities', 0, '2022-11-01 11:31:04.746564', 1, '2022-11-01 11:31:02.000000', 2);

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

--
-- Table structure for table `accounts_fomular`
--

CREATE TABLE `accounts_fomular` (
  `id` bigint(20) NOT NULL,
  `fomular_name` varchar(500) NOT NULL,
  `code_name` varchar(300) NOT NULL,
  `increasing` varchar(500) NOT NULL,
  `decreasing` varchar(500) NOT NULL,
  `fomular_desc` varchar(3000) DEFAULT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_fomular`
--

INSERT INTO `accounts_fomular` (`id`, `fomular_name`, `code_name`, `increasing`, `decreasing`, `fomular_desc`, `is_disabled`, `created`, `has_been_modified`, `last_modified`) VALUES
(1, 'ADEx (Dr)', 'ADEX', 'D', 'C', 'Assets, Dividends, and  Expenses', 0, '2022-09-29 07:48:42.184966', 1, '2022-09-29 07:48:29.000000'),
(2, 'LER (Cr)', 'LER', 'C', 'D', 'Liabilities, Capital and Revenue', 0, '2022-09-29 07:51:00.333405', 1, '2022-09-29 07:50:59.000000');

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

--
-- Table structure for table `accounts_groups`
--

CREATE TABLE `accounts_groups` (
  `id` bigint(20) NOT NULL,
  `en_group_name` varchar(500) NOT NULL,
  `code_name` varchar(300) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `accounts_class_id` bigint(20) NOT NULL,
  `en_class_desc` varchar(3000) DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL,
  `sort_value` int(11) NOT NULL,
  `created_by_id` int(11) NOT NULL,
  `is_deletable` tinyint(1) NOT NULL,
  `is_editable` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_groups`
--

INSERT INTO `accounts_groups` (`id`, `en_group_name`, `code_name`, `is_disabled`, `created`, `has_been_modified`, `last_modified`, `accounts_class_id`, `en_class_desc`, `is_default`, `sort_value`, `created_by_id`, `is_deletable`, `is_editable`) VALUES
(1, 'Fixed Assets', 'fixed_assets', 0, '2022-09-29 07:59:53.813705', 1, '2022-09-29 07:59:38.000000', 1, NULL, 0, 2, 1, 1, 1),
(2, 'Current Assets', 'current_assets', 0, '2022-09-29 08:00:25.775588', 1, '2022-09-29 08:00:24.000000', 1, NULL, 0, 1, 1, 1, 1),
(3, 'Capital (Equity)', 'capital', 0, '2022-09-29 08:02:34.645300', 1, '2022-09-29 08:02:28.000000', 2, NULL, 0, 3, 1, 1, 1),
(4, 'Long Term Liabilities', 'long_term_liabilities', 0, '2022-09-29 08:03:13.753217', 1, '2022-09-29 08:03:12.000000', 7, NULL, 0, 4, 1, 1, 1),
(5, 'Current Liabilities', 'current_liabilities', 0, '2022-09-29 08:03:44.992145', 1, '2022-09-29 08:03:41.000000', 7, NULL, 0, 5, 1, 1, 1),
(6, 'Direct Expenses', 'direct_expenses', 0, '2022-09-29 08:05:18.311863', 1, '2022-09-29 08:05:17.000000', 4, NULL, 0, 6, 1, 1, 1),
(7, 'Indirect Expenses', 'indirect_expenses', 0, '2022-09-29 08:05:46.738943', 1, '2022-09-29 08:05:41.000000', 4, NULL, 0, 7, 1, 1, 1),
(8, 'Direct Incomes', 'direct_incomes', 0, '2022-09-29 08:06:29.644357', 1, '2022-09-29 08:06:28.000000', 3, NULL, 0, 8, 1, 1, 1),
(9, 'Indirect Incomes', 'indirect_incomes', 0, '2022-09-29 08:07:30.808673', 1, '2022-09-29 08:07:29.000000', 3, NULL, 0, 9, 1, 1, 1),
(10, 'Cost Of Goods Sold', 'cost_of_goods_sold', 0, '2022-09-29 08:11:46.010296', 1, '2022-09-29 08:11:40.000000', 4, NULL, 0, 10, 1, 0, 0),
(11, 'Stock', 'stock', 0, '2022-11-01 08:25:55.961114', 1, '2022-11-01 08:24:16.000000', 1, NULL, 0, 11, 1, 0, 0),
(12, 'Taxes Out', 'taxes_out', 0, '2022-11-01 08:27:13.600181', 1, '2022-11-01 08:27:06.000000', 2, NULL, 0, 12, 1, 1, 1),
(13, 'Taxes In', 'taxes_in', 0, '2022-11-01 08:27:38.024047', 1, '2022-11-01 08:27:36.000000', 1, NULL, 0, 13, 1, 1, 1);

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

--
-- Table structure for table `accounts_ledger_entries`
--

CREATE TABLE `accounts_ledger_entries` (
  `id` bigint(20) NOT NULL,
  `ledger_no` varchar(200) DEFAULT NULL,
  `entry_type` varchar(1) NOT NULL,
  `amount` double NOT NULL,
  `narration` varchar(5000) DEFAULT NULL,
  `created` datetime(6) NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_adjusting_entry` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_ledger_entries`
--

INSERT INTO `accounts_ledger_entries` (`id`, `ledger_no`, `entry_type`, `amount`, `narration`, `created`, `account_id`, `is_disabled`, `is_adjusting_entry`) VALUES
(1, 'L00001', 'D', 1000, 'cash At Hand as of 21/01/2023', '2023-01-21 00:00:00.000000', 1, 0, 0),
(2, 'L00001', 'C', 1000, 'cash At Hand as of 21/01/2023', '2023-01-21 00:00:00.000000', 7, 0, 0),
(3, 'L00002', 'D', 1000, 'loans given out from our cash account', '2023-01-21 00:00:00.000000', 8, 0, 0),
(4, 'L00002', 'C', 1000, 'loans given out from our cash account', '2023-01-21 00:00:00.000000', 1, 0, 0),
(5, 'L00003', 'D', 100, 'intrests to be recieved after payment is made', '2023-01-21 00:00:00.000000', 9, 0, 0),
(6, 'L00003', 'C', 100, 'intrests to be recieved after payment is made', '2023-01-21 00:00:00.000000', 10, 0, 0),
(7, 'L00004', 'D', 50, 'Fees recieved from the disbursed loan', '2023-01-21 00:00:00.000000', 11, 0, 0),
(8, 'L00004', 'C', 50, 'Fees recieved from the disbursed loan', '2023-01-21 00:00:00.000000', 12, 0, 0);

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

--
-- Table structure for table `accounts_settings`
--

CREATE TABLE `accounts_settings` (
  `id` bigint(20) NOT NULL,
  `en_account_setting_name` varchar(500) NOT NULL,
  `account_setting_codename` varchar(300) NOT NULL,
  `is_deletable` tinyint(1) NOT NULL,
  `let_me_choose` tinyint(1) NOT NULL,
  `is_editable` tinyint(1) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `sys_dpt_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_settings`
--

INSERT INTO `accounts_settings` (`id`, `en_account_setting_name`, `account_setting_codename`, `is_deletable`, `let_me_choose`, `is_editable`, `is_disabled`, `created`, `has_been_modified`, `last_modified`, `account_id`, `sys_dpt_id`) VALUES
(2, 'Daily POS Sales', 'daily_pos_sales', 0, 0, 0, 0, '2022-10-07 19:56:21.258803', 1, '2022-10-07 19:54:36.000000', 2, 3),
(3, 'Inventory purchases', 'inventory_purchase', 0, 0, 0, 0, '2022-10-07 19:59:20.987399', 1, '2022-10-07 19:59:19.000000', 7, 6),
(4, 'Sales Daily VAT', 'sales_daily_vat', 0, 0, 0, 0, '2022-10-07 20:00:26.032869', 1, '2022-10-07 20:00:25.000000', 21, 3),
(5, 'Salary', 'salary', 0, 0, 0, 0, '2022-10-07 20:20:12.723247', 1, '2022-10-07 20:20:11.000000', 17, 5),
(6, 'Salary Advances', 'salary_advances', 0, 0, 0, 0, '2022-10-07 20:20:53.849613', 1, '2022-10-07 20:20:52.000000', 16, 5),
(7, 'Salary Allowances', 'salary_allowances', 0, 0, 0, 0, '2022-10-07 20:21:30.944958', 1, '2022-10-07 20:21:29.000000', 22, 5),
(8, 'Employer NSSF', 'employer_nssf', 0, 0, 0, 0, '2022-10-07 20:24:58.643956', 1, '2022-10-07 20:24:54.000000', 5, 5),
(9, 'Employee NSSF', 'employee_nssf', 0, 0, 0, 0, '2022-10-07 20:29:18.520496', 1, '2022-10-07 20:26:02.000000', 23, 5),
(10, 'Sales Discounts', 'sales_discounts', 0, 0, 0, 0, '2022-10-07 21:46:58.316795', 1, '2022-10-07 21:46:46.000000', 25, 3),
(11, 'Purchase Discounts', 'purchase_discounts', 0, 0, 0, 0, '2022-10-07 21:47:35.786951', 1, '2022-10-07 21:47:31.000000', 26, 6);

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

--
-- Table structure for table `accounts_subgroups`
--

CREATE TABLE `accounts_subgroups` (
  `id` bigint(20) NOT NULL,
  `en_group_name` varchar(500) NOT NULL,
  `sort_value` int(11) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `is_default` tinyint(1) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `accounts_group_id` bigint(20) NOT NULL,
  `accounts_class_id` bigint(20) NOT NULL,
  `account_group_no` varchar(300) NOT NULL,
  `is_deletable` tinyint(1) NOT NULL,
  `is_editable` tinyint(1) NOT NULL,
  `narration` varchar(3000) DEFAULT NULL,
  `created_by_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `accounts_subgroups`
--

INSERT INTO `accounts_subgroups` (`id`, `en_group_name`, `sort_value`, `is_disabled`, `created`, `is_default`, `has_been_modified`, `last_modified`, `accounts_group_id`, `accounts_class_id`, `account_group_no`, `is_deletable`, `is_editable`, `narration`, `created_by_id`) VALUES
(1, 'Bank/Cash Accounts', 1, 0, '2022-09-29 08:31:21.496427', 0, 1, '2022-09-29 08:30:27.000000', 2, 1, '000001', 0, 0, NULL, 1),
(2, 'Accounts Receivables', 2, 0, '2022-09-29 08:33:39.370897', 0, 1, '2022-09-29 08:33:22.000000', 2, 1, '000002', 0, 0, NULL, 1),
(3, 'Stock', 3, 0, '2022-09-29 08:34:41.176657', 0, 1, '2022-09-29 08:34:40.000000', 2, 1, '000003', 0, 0, NULL, 1),
(4, 'Petty cash', 4, 0, '2022-09-29 08:35:37.173872', 0, 1, '2022-09-29 08:35:23.000000', 2, 1, '000004', 0, 0, NULL, 1),
(5, 'Tangible Assets', 5, 0, '2022-09-29 08:37:51.810447', 0, 1, '2022-09-29 08:37:06.000000', 1, 1, '000005', 0, 0, NULL, 1),
(6, 'Accumulated Depreciation', 6, 0, '2022-09-29 08:41:25.193334', 0, 1, '2022-09-29 08:38:14.000000', 1, 1, '000006', 0, 0, NULL, 1),
(7, 'Accounts Payable', 7, 0, '2022-09-29 08:48:36.464978', 0, 1, '2022-09-29 08:44:32.000000', 5, 2, '000007', 0, 0, NULL, 1),
(8, 'Asset Depreciation', 8, 0, '2022-09-29 08:51:19.835937', 0, 1, '2022-09-29 08:51:07.000000', 7, 4, '000008', 0, 0, NULL, 1),
(9, 'Intangible Assets', 9, 0, '2022-09-29 08:53:19.653307', 0, 1, '2022-09-29 08:53:18.000000', 1, 1, '000009', 0, 0, NULL, 1),
(10, 'Administrative Expenses', 10, 0, '2022-09-29 08:56:55.793472', 0, 1, '2022-09-29 08:56:51.000000', 6, 4, '000010', 0, 0, NULL, 1),
(11, 'Prepaid expenses', 11, 0, '2022-09-29 08:58:19.481450', 0, 1, '2022-09-29 08:58:18.000000', 2, 1, '000011', 0, 0, NULL, 1),
(12, 'Sales Revenue', 12, 0, '2022-09-29 08:59:09.732591', 0, 1, '2022-09-29 08:59:09.000000', 8, 3, '000012', 0, 0, NULL, 1),
(13, 'Other Revenues', 13, 0, '2022-09-29 09:00:21.963522', 0, 1, '2022-09-29 09:00:20.000000', 9, 3, '000013', 0, 0, NULL, 1);

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

--
-- Table structure for table `assets`
--

CREATE TABLE `assets` (
  `id` int(11) NOT NULL,
  `asset_type_id` int(11) NOT NULL,
  `asset_cat_id` int(11) NOT NULL,
  `asset_name` varchar(255) DEFAULT NULL,
  `purchase_date` date NOT NULL,
  `purchase_price` float NOT NULL,
  `replacement_value` float DEFAULT NULL,
  `serial_number` varchar(255) DEFAULT NULL,
  `supplier` varchar(255) DEFAULT NULL,
  `description` varchar(5000) NOT NULL,
  `invoice_receipt` varchar(255) DEFAULT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `assets_categories`
--

CREATE TABLE `assets_categories` (
  `id` int(11) NOT NULL,
  `en_cat_name` varchar(300) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `assets_categories`
--

INSERT INTO `assets_categories` (`id`, `en_cat_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Current Assets', 'current_assets', 0, '2022-12-22 16:37:15'),
(2, 'Investments', 'investments', 0, '2022-12-22 16:37:15'),
(3, 'Fixed Assets', 'fixed_assets', 0, '2022-12-22 16:37:15'),
(4, 'Intangible Assets', 'intangible_assets', 0, '2022-12-22 16:37:15'),
(5, 'Other Assets', 'other_assets', 0, '2022-12-22 16:37:15');

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

--
-- Table structure for table `assets_types`
--

CREATE TABLE `assets_types` (
  `id` int(11) NOT NULL,
  `en_asset_type_name` varchar(355) NOT NULL,
  `asset_cat_id` int(11) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `assets_types`
--

INSERT INTO `assets_types` (`id`, `en_asset_type_name`, `asset_cat_id`, `is_disabled`, `created`) VALUES
(1, 'Equipments', 3, 0, '2022-12-29 11:14:33'),
(2, 'Furniture', 3, 0, '2022-12-29 11:14:33'),
(3, 'Land', 3, 0, '2022-12-29 11:14:33'),
(4, 'Machinery', 3, 0, '2022-12-29 11:14:33'),
(5, 'Receivables', 1, 0, '2022-12-29 11:14:33'),
(6, 'Building', 3, 0, '2022-12-29 11:14:33'),
(7, 'Cash', 1, 0, '2022-12-29 11:14:33'),
(8, 'Copyright', 4, 0, '2022-12-29 11:14:33'),
(9, 'Patents', 4, 0, '2022-12-29 11:14:33'),
(10, 'Trademark', 4, 0, '2022-12-29 11:14:33'),
(11, 'Bank Balance', 1, 0, '2022-12-29 11:14:33'),
(12, 'Brand', 4, 0, '2022-12-29 11:18:05');

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

--
-- Table structure for table `asset_current_value`
--

CREATE TABLE `asset_current_value` (
  `id` int(11) NOT NULL,
  `asset_id` int(11) NOT NULL,
  `date_of_valuation` date NOT NULL,
  `value_amount` float NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `athousand_separator`
--

CREATE TABLE `athousand_separator` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `athousand_separator`
--

INSERT INTO `athousand_separator` (`id`, `display_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Comma(,)', ',', 0, '2022-12-08 20:15:21'),
(2, 'Dot(.)', '.', 0, '2022-12-08 20:15:21');

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

--
-- Table structure for table `auth_users`
--

CREATE TABLE `auth_users` (
  `id` int(11) NOT NULL,
  `first_name` varchar(300) NOT NULL,
  `last_name` varchar(300) NOT NULL,
  `user_email` varchar(300) NOT NULL,
  `password` varchar(500) NOT NULL,
  `verification_code` int(50) NOT NULL,
  `is_verified` tinyint(1) NOT NULL,
  `is_terminated` tinyint(1) NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `borrowers`
--

CREATE TABLE `borrowers` (
  `id` int(11) NOT NULL,
  `first_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `business_name` varchar(255) DEFAULT NULL,
  `unique_no` varchar(255) NOT NULL,
  `gender_id` int(11) DEFAULT NULL,
  `title_id` int(11) DEFAULT NULL,
  `mobile` int(50) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `province_state` varchar(255) DEFAULT NULL,
  `zipcode` varchar(255) DEFAULT NULL,
  `landline_phone` varchar(255) DEFAULT NULL,
  `work_status_id` int(11) NOT NULL,
  `credit_score` varchar(255) DEFAULT NULL,
  `credit_limit` float NOT NULL DEFAULT 0,
  `borrower_photo` varchar(255) DEFAULT NULL,
  `description` varchar(5000) DEFAULT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_terminated` tinyint(1) NOT NULL DEFAULT 0,
  `created_by` int(11) NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `borrower_files`
--

CREATE TABLE `borrower_files` (
  `id` int(11) NOT NULL,
  `borrower_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `file_type` varchar(255) NOT NULL,
  `file_extension` varchar(255) NOT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `file_for` varchar(255) NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `borrower_loan_officers`
--

CREATE TABLE `borrower_loan_officers` (
  `id` int(11) NOT NULL,
  `borrower_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `borrower_working_status`
--

CREATE TABLE `borrower_working_status` (
  `id` int(11) NOT NULL,
  `status_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `borrower_working_status`
--

INSERT INTO `borrower_working_status` (`id`, `status_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Employee', 'employee', 0, '2022-12-29 14:12:14'),
(2, 'Goverment Employee', 'govermet_employee', 0, '2022-12-29 14:12:14'),
(3, 'Private Sector Employee', 'private_sector_employee', 0, '2022-12-29 14:12:14'),
(4, 'Owner', 'owner', 0, '2022-12-29 14:12:14'),
(5, 'Student', 'student', 0, '2022-12-29 14:12:14'),
(6, 'Overseas Worker', 'overseas_worker', 0, '2022-12-29 14:12:14'),
(7, 'Pensioner', 'pensioner', 0, '2022-12-29 14:12:14'),
(8, 'Unemployed', 'unemployed', 0, '2022-12-29 14:12:14');

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

--
-- Table structure for table `borrowing_groups`
--

CREATE TABLE `borrowing_groups` (
  `id` int(11) NOT NULL,
  `group_name` varchar(255) NOT NULL,
  `group_leader_id` int(11) NOT NULL,
  `collector_name` varchar(255) DEFAULT NULL,
  `meeting_schedule` varchar(300) NOT NULL,
  `description` varchar(5000) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_terminated` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `borrowing_group_borrowers`
--

CREATE TABLE `borrowing_group_borrowers` (
  `id` int(11) NOT NULL,
  `borrowing_group_id` int(11) NOT NULL,
  `borrower_id` int(11) NOT NULL,
  `is_group_leader` tinyint(1) NOT NULL DEFAULT 0,
  `credit_limit` float NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_banned` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `cash_accounts_settings`
--

CREATE TABLE `cash_accounts_settings` (
  `id` bigint(20) NOT NULL,
  `en_account_setting_name` varchar(500) NOT NULL,
  `account_setting_codename` varchar(300) NOT NULL,
  `let_me_choose` tinyint(1) NOT NULL,
  `is_deletable` tinyint(1) NOT NULL,
  `is_editable` tinyint(1) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `payment_type_id` bigint(20) NOT NULL,
  `sys_dpt_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cash_accounts_settings`
--

INSERT INTO `cash_accounts_settings` (`id`, `en_account_setting_name`, `account_setting_codename`, `let_me_choose`, `is_deletable`, `is_editable`, `is_disabled`, `created`, `has_been_modified`, `last_modified`, `account_id`, `payment_type_id`, `sys_dpt_id`) VALUES
(2, 'Cash At Hand', 'cash_at_hand', 0, 0, 0, 0, '2022-10-07 19:07:54.674921', 1, '2022-10-07 19:05:42.000000', 8, 1, 4),
(3, 'Equity Bank', 'bank_account', 0, 0, 0, 0, '2022-10-07 19:08:49.481948', 1, '2022-10-07 19:08:46.000000', 6, 1, 4),
(4, 'MTN Mobile Money', 'mtn_mobile_money', 0, 0, 0, 0, '2022-10-07 19:10:47.315565', 1, '2022-10-07 19:10:42.000000', 9, 5, 4),
(5, 'Airtel Money', 'airtel_money', 0, 0, 0, 0, '2022-10-07 19:11:51.741921', 1, '2022-10-07 19:11:49.000000', 10, 4, 4);

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

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

CREATE TABLE `companies` (
  `id` bigint(20) NOT NULL,
  `company_name` varchar(200) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `contacts` varchar(255) DEFAULT NULL,
  `street_address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `zip_code` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `slogan` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `created` datetime(6) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `country_id` bigint(20) DEFAULT NULL,
  `currency_id` bigint(20) NOT NULL,
  `language_id` int(11) NOT NULL,
  `date_format_id` int(11) NOT NULL,
  `decimal_separator_id` int(11) NOT NULL,
  `athousand_separator_id` int(11) NOT NULL,
  `table_prefix` varchar(255) NOT NULL,
  `auth_user_id` int(11) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `has_been_shutdown` tinyint(1) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `company_branches`
--

CREATE TABLE `company_branches` (
  `id` bigint(20) NOT NULL,
  `branch_name` varchar(200) NOT NULL,
  `email` varchar(255) NOT NULL,
  `contacts` varchar(255) NOT NULL,
  `street_address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `zip_code` varchar(255) DEFAULT NULL,
  `table_prefix` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `company_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `company_settings`
--

CREATE TABLE `company_settings` (
  `id` bigint(20) NOT NULL,
  `en_entry_name` varchar(500) NOT NULL,
  `entry_code_name` varchar(255) NOT NULL,
  `has_entry_value` tinyint(1) NOT NULL,
  `entry_value` varchar(500) DEFAULT NULL,
  `is_required` tinyint(1) NOT NULL,
  `is_default` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `is_modifiable` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `en_entry_description` varchar(500) DEFAULT NULL,
  `en_entry_help_text` varchar(500) DEFAULT NULL,
  `en_entry_label` varchar(500) DEFAULT NULL,
  `is_boolean` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

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

CREATE TABLE `countries` (
  `id` int(11) NOT NULL,
  `country_name` varchar(300) NOT NULL,
  `coutry_flag` varchar(300) DEFAULT NULL,
  `country_code` varchar(50) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `countries` (`id`, `country_name`, `coutry_flag`, `country_code`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Uganda', NULL, 'ug', 1, 0, '2022-12-08 19:13:45'),
(2, 'Kenya', NULL, 'ke', 0, 0, '2022-12-08 19:13:45'),
(3, 'Tanzania', NULL, 'tz', 0, 0, '2022-12-08 19:13:45'),
(4, 'Rwanda', NULL, 'rwd', 0, 0, '2022-12-08 19:13:45');

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

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

CREATE TABLE `currencies` (
  `id` int(11) NOT NULL,
  `country_id` int(11) DEFAULT NULL,
  `locale` varchar(300) NOT NULL,
  `currecy_name` varchar(255) NOT NULL,
  `iso_code` varchar(300) NOT NULL,
  `symbol` varchar(255) NOT NULL,
  `currencies_no` varchar(255) NOT NULL,
  `is_indented` tinyint(1) NOT NULL DEFAULT 0,
  `is_infront` tinyint(1) NOT NULL DEFAULT 0,
  `decimal_points` int(11) NOT NULL,
  `decimal_separator_id` int(11) NOT NULL,
  `athousand_separator_id` int(11) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `currencies` (`id`, `country_id`, `locale`, `currecy_name`, `iso_code`, `symbol`, `currencies_no`, `is_indented`, `is_infront`, `decimal_points`, `decimal_separator_id`, `athousand_separator_id`, `is_default`, `is_disabled`, `created`) VALUES
(1, 1, 'Ugandan Shillings', 'UGX - Ush', 'ush', 'Ush', '22', 1, 0, 0, 1, 1, 1, 0, '2022-12-08 19:47:51');

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

--
-- Table structure for table `date_formats`
--

CREATE TABLE `date_formats` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `date_formart` varchar(300) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `date_formats`
--

INSERT INTO `date_formats` (`id`, `display_name`, `is_default`, `date_formart`, `is_disabled`, `created`) VALUES
(1, 'dd/mm/yyyy', 1, 'dd/mm/yyyy', 0, '2022-12-08 20:01:51'),
(2, 'dd-mm-yyyy', 0, 'dd-mm-yyyy', 0, '2022-12-08 20:01:51');

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

--
-- Table structure for table `decimal_separator`
--

CREATE TABLE `decimal_separator` (
  `id` int(11) NOT NULL,
  `diplay_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `decimal_separator`
--

INSERT INTO `decimal_separator` (`id`, `diplay_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Dot(.)', '.', 0, '2022-12-08 20:08:44'),
(2, 'Comma(,)', ',', 0, '2022-12-08 20:08:44');

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

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(11) NOT NULL,
  `expense_name` varchar(300) NOT NULL,
  `description` varchar(5000) NOT NULL,
  `supplier` varchar(255) DEFAULT NULL,
  `recurries_every` varchar(255) DEFAULT NULL,
  `expense_date` date NOT NULL,
  `amount` float NOT NULL DEFAULT 0,
  `is_recurring` tinyint(1) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `expenses_transactions`
--

CREATE TABLE `expenses_transactions` (
  `id` int(11) NOT NULL,
  `expense_id` int(11) NOT NULL,
  `amount` float NOT NULL DEFAULT 0,
  `invoice_reciept_path` varchar(255) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `cancelled_by` int(11) NOT NULL,
  `is_canceled` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `fiscal_year`
--

CREATE TABLE `fiscal_year` (
  `id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_closed` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `genders`
--

CREATE TABLE `genders` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `genders`
--

INSERT INTO `genders` (`id`, `display_name`, `code_name`, `created`) VALUES
(1, 'Male', 'male', '2022-12-29 14:57:04'),
(2, 'Female', 'female', '2022-12-29 14:57:04');

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

--
-- Table structure for table `languages`
--

CREATE TABLE `languages` (
  `id` int(11) NOT NULL,
  `lang_name` varchar(255) NOT NULL,
  `iso_code` varchar(50) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_right_to_left` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `languages`
--

INSERT INTO `languages` (`id`, `lang_name`, `iso_code`, `is_default`, `is_right_to_left`, `is_disabled`, `created`) VALUES
(1, 'English', 'en', 1, 0, 0, '2022-12-08 19:07:41');

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

--
-- Table structure for table `loan_decimal_places`
--

CREATE TABLE `loan_decimal_places` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `value_decimal` int(50) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_decimal_places`
--

INSERT INTO `loan_decimal_places` (`id`, `display_name`, `code_name`, `value_decimal`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Round Off to 2 Decimal Places', 'round_off_to_two_decimal', 2, 0, 0, '2022-12-29 22:26:52'),
(2, 'Round Off to Integer', 'round_off_to_integer', 0, 0, 0, '2022-12-29 22:26:52'),
(3, 'Round Down to Integer', 'round_down_to_integer', 0, 0, 0, '2022-12-29 22:26:52'),
(4, 'Round Off to 1 Decimal Place', 'round_off_to_one_decimal', 1, 0, 0, '2022-12-29 22:26:52'),
(5, 'Round Up to 1 Decimal Place', 'round_up_to_one_decimal', 1, 0, 0, '2022-12-29 22:26:52'),
(6, 'Round Off to Nearest 5', 'round_up_to_five', 5, 0, 0, '2022-12-29 22:26:52'),
(7, 'Round Up to Nearest 10', 'round_up_to_ten', 10, 0, 0, '2022-12-29 22:26:52'),
(8, 'Round Off to Nearest 100', 'round_off_to_hundred', 100, 0, 0, '2022-12-29 22:26:52');

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

--
-- Table structure for table `loan_duration_periods`
--

CREATE TABLE `loan_duration_periods` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_duration_periods`
--

INSERT INTO `loan_duration_periods` (`id`, `display_name`, `code_name`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Days', 'Days', 0, 0, '2022-12-29 22:03:01'),
(2, 'Weeks', 'Weeks', 0, 0, '2022-12-29 22:03:01'),
(3, 'Months', 'Months', 0, 0, '2022-12-29 22:03:01'),
(4, 'Years', 'Years', 0, 0, '2022-12-29 22:03:01');

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

--
-- Table structure for table `loan_fees`
--

CREATE TABLE `loan_fees` (
  `id` int(11) NOT NULL,
  `loan_fee_name` varchar(255) NOT NULL,
  `is_fixed_amount` tinyint(1) NOT NULL DEFAULT 1,
  `loan_fees_percentage_calculation_on_id` int(11) NOT NULL,
  `deducted_on_fees_id` int(11) DEFAULT NULL,
  `is_deducted_on_another_fees` tinyint(1) NOT NULL DEFAULT 0,
  `is_deducted_on_principlal_amount` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `loan_fees_percentage_calculation_on`
--

CREATE TABLE `loan_fees_percentage_calculation_on` (
  `id` int(11) NOT NULL,
  `display_name` varchar(300) NOT NULL,
  `code_name` varchar(300) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_fees_percentage_calculation_on`
--

INSERT INTO `loan_fees_percentage_calculation_on` (`id`, `display_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Total Loan Due Principal Amount', 'principal_amount', 0, '2022-12-29 18:58:32'),
(2, 'Total Loan Due Interest Amount', 'interest_amount', 0, '2022-12-29 18:58:32'),
(3, 'Total Loan Due Principal and Interest Amount', 'principal_and_interest_amount', 0, '2022-12-29 18:58:32'),
(4, 'Select Fees Below', 'select_fees', 0, '2022-12-29 18:58:32');

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

--
-- Table structure for table `loan_intetrest_methods`
--

CREATE TABLE `loan_intetrest_methods` (
  `id` int(11) NOT NULL,
  `method_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_intetrest_methods`
--

INSERT INTO `loan_intetrest_methods` (`id`, `method_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Flat Rate', 'flat_rate', 0, 0),
(2, 'Reducing Balance - Equal Installments', 'reducing_rate_equal_installments', 0, 0),
(3, 'Interest-Only', 'interest_only', 0, 0),
(4, 'Compound Interest', 'compound_interest', 0, 0),
(5, 'Reducing Balance - Equal Principal', 'reducing_rate_equal_principal', 0, 0);

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

--
-- Table structure for table `loan_intrest_periods`
--

CREATE TABLE `loan_intrest_periods` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_intrest_periods`
--

INSERT INTO `loan_intrest_periods` (`id`, `display_name`, `code_name`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Per Day', 'Day', 0, 0, '2022-12-29 21:38:58'),
(2, 'Per Week', 'Week', 0, 0, '2022-12-29 21:38:58'),
(3, 'Per Month', 'Month', 0, 0, '2022-12-29 21:38:58'),
(4, 'Per Year', 'Year', 0, 0, '2022-12-29 21:38:58'),
(5, 'Per Loan', 'Loan', 0, 0, '2022-12-29 21:38:58');

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

--
-- Table structure for table `loan_repayment_cycles`
--

CREATE TABLE `loan_repayment_cycles` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_repayment_cycles`
--

INSERT INTO `loan_repayment_cycles` (`id`, `display_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Daily', 'daily', 0, '2022-12-29 18:43:11'),
(2, 'Weekly', 'weekly', 0, '2022-12-29 18:43:11'),
(3, 'Biweekly', 'biweekly', 0, '2022-12-29 18:43:11'),
(4, 'Monthly', 'monthly', 0, '2022-12-29 18:43:11'),
(5, 'Bimonthly', 'bimonthly', 0, '2022-12-29 18:43:11'),
(6, 'Quarterly', 'quarterly', 0, '2022-12-29 18:43:11'),
(7, 'Every 4 Months', 'every_4_months', 0, '2022-12-29 18:43:11'),
(8, 'Semi-Annual', 'semi_annual', 0, '2022-12-29 18:43:11'),
(9, 'Every 9 Months', 'every_9_months', 0, '2022-12-29 18:43:11'),
(10, 'Yearly', 'yearly', 0, '2022-12-29 18:43:11'),
(11, 'Lump-Sum', 'lump_sum', 0, '2022-12-29 18:43:11');

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

--
-- Table structure for table `loan_repayment_orderings`
--

CREATE TABLE `loan_repayment_orderings` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `sort_value` int(11) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_repayment_orderings`
--

INSERT INTO `loan_repayment_orderings` (`id`, `display_name`, `code_name`, `sort_value`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Interest', 'Interest', 1, 0, 0, '2022-12-29 23:14:13'),
(2, 'Penalty', 'Penalty', 2, 0, 0, '2022-12-29 23:14:13'),
(3, 'Fees', 'Fees', 3, 0, 0, '2022-12-29 23:14:13'),
(4, 'Principal', 'Principal', 4, 0, 0, '2022-12-29 23:14:13');

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

--
-- Table structure for table `loan_types`
--

CREATE TABLE `loan_types` (
  `id` int(11) NOT NULL,
  `diplay_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `loan_types`
--

INSERT INTO `loan_types` (`id`, `diplay_name`, `code_name`, `is_disabled`, `is_default`, `created`) VALUES
(1, 'I want Interest to be percentage % based', 'percentage', 0, 1, '2022-12-29 21:28:38'),
(2, 'I want Interest to be a fixed amount Per Cycle', 'fixed', 0, 0, '2022-12-29 21:28:38');

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

--
-- Table structure for table `modules`
--

CREATE TABLE `modules` (
  `id` bigint(20) NOT NULL,
  `en_module_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `route_path` varchar(255) NOT NULL,
  `is_a_sub_module` tinyint(1) NOT NULL,
  `main_module_id` int(11) DEFAULT NULL,
  `depth` int(11) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `show_in_sub_menu` tinyint(1) NOT NULL DEFAULT 1,
  `created` datetime(6) NOT NULL,
  `sort_value` int(11) NOT NULL,
  `has_children` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `modules`
--

INSERT INTO `modules` (`id`, `en_module_name`, `code_name`, `route_path`, `is_a_sub_module`, `main_module_id`, `depth`, `is_disabled`, `show_in_sub_menu`, `created`, `sort_value`, `has_children`) VALUES
(1, 'Borrowers', 'borrowers', 'borrowers/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 1, 1),
(2, 'View Borrowers', 'view_borrowers', 'view_borrowers/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(3, 'Add Borrower', 'add_borrower', 'add_borrower/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(4, 'View Borrowers Groups', 'view_borrower_groups', 'view_borrower_groups/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(5, 'Add Borrowers Groups', 'add_borrowers_groups', 'add_borrowers_groups/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(6, 'Send SMS to All Borrowers', 'send_sms_to_all_borrowers', 'send_sms_to_all_borrowers/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(7, 'Send Email to All Borrowers', 'send_email_to_all_borrowers', 'send_email_to_all_borrowers/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(8, 'Invite Borrowers', 'invite_borrowers', 'invite_borrowers/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 7, 0),
(9, 'Loans', 'loans', 'loans/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 2, 1),
(10, 'View All Loans', 'view_loans_branch', 'view_loans_branch/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(11, 'Add Loan', 'add_loan', 'add_loan/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(12, 'Due Loans', 'due_loans', 'due_loans/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(13, 'Missed Repayments', 'missed_repayments', 'missed_repayments/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(14, 'Loans in Arrears', 'arrears_loans', 'arrears_loans/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(15, 'No Repayments', 'no_repayment_loans', 'no_repayment_loans/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(16, 'Past Maturity Date', 'view_loans_past_maturity_date', 'view_loans_past_maturity_date/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 7, 0),
(17, 'Principal Outstanding', 'principal_outstanding_loans', 'principal_outstanding_loans/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 8, 0),
(18, '1 Month Late Loans', 'view_loans_late_1month_branch', 'view_loans_late_1month_branch/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 9, 0),
(19, '3 Months Late Loans', 'view_loans_late_3months_branch', 'view_loans_late_3months_branch/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 10, 0),
(20, 'Loan Calculator', 'loan_calculator', 'loan_calculator/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 11, 0),
(21, 'Guarantors', 'view_guarantors_branch', 'view_guarantors_branch/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 12, 0),
(22, 'Loan Comments', 'view_loans_comments', 'view_loans_comments/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 13, 0),
(23, 'Approve Loans', 'approve_loans_branch', 'approve_loans_branch/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 14, 0),
(24, 'Repayments', 'repayments', 'repayments/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 3, 1),
(25, 'View Repayments', 'view_repayments_branch', 'view_repayments_branch/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(26, 'Add Bulk Repayments', 'add_bulk_repayments', 'add_bulk_repayments/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(27, 'Upload Repayments from CSV file', 'add_bulk_repayments_csv', 'add_bulk_repayments_csv/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(28, 'Repayments Charts', 'repayments_charts', 'repayments_charts/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(29, 'Approve Repayments', 'approve_repayments_branch', 'approve_repayments_branch/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(30, 'Collateral Register', 'collateral_register', 'collateral_register/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 4, 1),
(31, 'Calendar', 'view_calendar', 'view_calendar/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(32, 'Collection Sheets', 'collection_sheets', 'collection_sheet/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 6, 1),
(33, 'Daily Collection Sheet', 'manage_daily_collection_sheet', 'manage_daily_collection_sheet?view_daily_collection=1', 1, 32, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(34, 'Missed Repayment Sheet', 'manage_daily_collection_sheet', 'manage_daily_collection_sheet?view_missed_repayments_sheet=1', 1, 32, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(35, 'Past Maturity Date Loans', 'manage_daily_collection_sheet', 'manage_daily_collection_sheet?view_past_maturity_date=1', 1, 32, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(36, 'Send SMS', 'send_sms', 'send_sms/', 1, 32, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(37, 'Send Email', 'send_email', 'send_email/', 1, 32, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(38, 'Savings', 'savings', 'savings/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 7, 1),
(39, 'View Savings Accounts', 'view_savings_branch', 'view_savings_branch/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(40, 'Add Savings Account', 'add_savings_account_branch', 'add_savings_account_branch/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(41, 'Savings Charts', 'savings_charts', 'savings_charts/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(42, 'Savings Report', 'savings_report', 'savings_report/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(43, 'Savings Products Report', 'savings_products_report', 'savings_products_report/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(44, 'Savings Fee Report', 'savings_fee_report', 'savings_fee_report/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(45, 'Cash Safe Management', 'view_cash_sources', 'view_cash_sources/', 1, 38, 1, 0, 1, '2023-01-13 00:00:00.000000', 7, 0),
(46, 'Savings Transactions', 'savings_transactions', 'savings_transactions/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 8, 1),
(47, 'View Savings Transactions', 'view_savings_transactions_branch', 'view_savings_transactions_branch/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(48, 'Add Bulk Transactions', 'add_bulk_transactions', 'add_bulk_transactions/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(49, 'Upload Transactions from CSV file', 'add_bulk_transactions_csv', 'add_bulk_transactions_csv/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(50, 'Staff Transactions Report', 'savings_staff_report', 'savings_staff_report/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(51, 'Approve Transactions', 'approve_savings_transactions_branch', 'approve_savings_transactions_branch/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(52, 'Investors', 'investors', 'investors/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 9, 1),
(53, 'View Investors', 'view_investors_branch', 'view_investors_branch/', 1, 52, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(54, 'Add Investor', 'add_investor', 'add_investor/', 1, 52, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(55, 'Send SMS to All Investors', 'send_sms_to_all_investors', 'send_sms_to_all_investors/', 1, 52, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(56, 'Send Email to All Investors', 'send_email_to_all_investors', 'send_email_to_all_investors/', 1, 52, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(57, 'Invite Investors', 'invite_investors', 'invite_investors/', 1, 52, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(58, 'Investor Accounts', 'investors_accounts_branch', 'investors_accounts_branch/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 10, 1),
(59, 'View All Investor Accounts', 'view_investors_accounts_branch', 'view_investors_accounts_branch/', 1, 58, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(60, 'Add Investor Account', 'add_investor_account', 'add_investor_account/', 1, 58, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(61, 'View All Loan Investments', 'view_investors_loans_branch', 'view_investors_loans_branch/', 1, 58, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(62, 'View Investor Transactions', 'view_transactions_branch', 'view_transactions_branch/', 1, 58, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(63, 'Approve Loan Investments', 'approve_loan_investments', 'approve_loan_investments/', 1, 58, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(64, 'View E-Signatures', 'view_esignatures_branch', 'view_esignatures_branch/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 11, 0),
(65, 'Payroll', 'payroll', 'payroll/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 12, 0),
(66, 'View Payroll', 'view_payroll_branch', 'view_payroll_branch/', 1, 65, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(67, 'Add Payroll', 'select_staff', 'select_staff/', 1, 65, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(68, 'Payroll Report', 'payroll_report', 'payroll_report/', 1, 65, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(69, 'Expenses', 'expenses', 'expenses/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 13, 0),
(70, 'View Expenses', 'view_expenses_branch', 'view_expenses_branch/', 1, 69, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(71, 'Add Expense', 'add_expense', 'add_expense/', 1, 69, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(72, 'Other Income', 'other_income', 'other_income/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 14, 0),
(73, 'View Other Income', 'view_other_income_branch', 'view_other_income_branch/', 1, 72, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(74, 'Add Other Income', 'add_other_income', 'add_other_income/', 1, 72, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(75, 'Asset Management', 'asset_management', 'asset_management/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 15, 0),
(76, 'View Asset Management', 'view_asset_management_branch', 'view_asset_management_branch/', 1, 75, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(77, 'Add Asset Management', 'add_asset_management', 'add_asset_management/', 1, 75, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(78, 'Reports', 'reports', 'reports/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 16, 0),
(79, 'Borrowers Report', 'borrowers_report', 'balance_due_report?report_type=borrowers', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(80, 'Loan Report', 'loan_report', 'balance_due_report?report_type=loan_report', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(81, 'Loan Arrears Aging Report', 'loan_arrears_aging_report', 'loan_arrears_aging_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(82, 'Collections Report', 'view_collections_report_branch', 'view_collections_report_branch/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(83, 'Collector Report (Staff)', 'collector_report', 'collector_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(84, 'Deferred Income', 'deferred_income', 'deferred_income/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(85, 'Deferred Income Monthly', 'deferred_income', 'deferred_income_monthly/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 7, 0),
(86, 'Pro-Rata Collections Monthly', 'pro_rata_collections_monthly', 'pro_rata_collections_monthly/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 8, 0),
(87, 'Disbursement Report', 'disbursement_report', 'disbursement_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 9, 0),
(88, 'Fees Report', 'fees_report', 'fees_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 10, 0),
(89, 'Loan Officer Report', 'loan_officer_report', 'balance_due_report?report_type=loan_officers', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 11, 0),
(90, 'Loan Products Report', 'loan_products_report', 'balance_due_report?report_type=loan_products', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 12, 0),
(91, 'Microfinance Financial Reporting Standards - Ratios', 'mfrs_ratios', 'mfrs_ratios/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 13, 0),
(92, 'Monthly Report', 'monthly_report', 'monthly_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 14, 0),
(93, 'Outstanding Report', 'outstanding_report', 'outstanding_report/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 15, 0),
(94, 'Portfolio At Risk (PAR)', 'portfolio_at_risk', 'portfolio_at_risk/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 16, 0),
(95, 'At a Glance Report', 'at_a_glance', 'at_a_glance/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 17, 0),
(96, 'All Entries', 'all_entries', 'all_entries/', 1, 78, 1, 0, 1, '2023-01-13 00:00:00.000000', 18, 0),
(97, 'Accounting', 'accounting', 'accounting/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 17, 0),
(98, 'Cash flow Accumulated', 'view_cash_flow_branch', 'view_cash_flow_branch/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(99, 'Cash Flow Monthly', 'view_cash_flow_monthly_branch', 'view_cash_flow_monthly_branch/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(100, 'Cash Flow Projection', 'view_cash_flow_projection_branch', 'view_cash_flow_projection_branch/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(101, 'Profit / Loss', 'view_profit_loss_branch', 'view_profit_loss_branch/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(102, 'Balance Sheet', 'balance_sheet', 'balance_sheet/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(103, 'Accounting Integration', 'accounting_intergration', 'accounting_intergration/', 1, 97, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(104, 'Settings', 'settings', 'settings/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 18, 0),
(105, 'Account Settings', 'account_setting', 'account_setting/', 1, 104, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(106, 'Custom Fields', 'custom_fields', 'custom_fields/', 1, 104, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(107, 'Manage Branches', 'manage_branches', 'manage_branches/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 19, 0),
(108, 'Branches', 'branches', 'branches/', 1, 107, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(109, 'Add Branch', 'add_branch', 'add_branch/', 1, 107, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(110, 'Collateral Types', 'collateral_types', 'collateral_types/', 1, 30, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(111, 'Download Borrower Statements', 'download_borrower_statements', 'download_borrower_statements/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 8, 0),
(112, 'Format Borrower Reports', 'format_borrower_reports', 'format_borrower_reports/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 9, 0),
(113, 'Rename Borrower Reports', 'rename_borrower_reports', 'rename_borrower_reports/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 10, 0),
(114, 'Invite Borrower Settings', 'invite_borrower_settings', 'invite_borrower_settings/', 1, 1, 1, 0, 1, '2023-01-13 00:00:00.000000', 11, 0),
(115, 'Manage Loan Officers', 'manage_loan_officers', 'manage_loan_officers/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 15, 0),
(116, 'Loan Products', 'loan_products', 'loan_products/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 16, 0),
(117, 'Loan Disbursed By', 'loan_disbursed_by', 'loan_disbursed_by/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 17, 0),
(118, 'Loan Penalty Settings', 'loan_penalty_settings', 'loan_penalty_settings/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 18, 0),
(119, 'Loan Fees', 'loan_fees', 'loan_fees/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 19, 0),
(120, 'Loan Repayment Cycles', 'loan_repayment_cycles', 'loan_repayment_cycles/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 20, 0),
(121, 'Loan Remainder Settings', 'loan_remainder_settings', 'loan_remainder_settings/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 21, 0),
(122, 'Loan Templates: Applications/Agreements', 'loan_templates_and_aggrements', 'loan_templates_and_aggrements/', 1, 9, 1, 0, 1, '2023-01-13 00:00:00.000000', 22, 0),
(123, 'Loan Repayment Methods', 'loan_repayment_methods', 'loan_repayment_methods/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 5, 0),
(124, 'Manage Collectors', 'manage_collectors', 'manage_collectors/', 1, 24, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(125, 'Manage Staff', 'manage_staff', 'manage_staff/', 0, NULL, 0, 0, 1, '2023-01-13 00:00:00.000000', 20, 0),
(126, 'Staff', 'staff', 'staff/', 1, 125, 1, 0, 1, '2023-01-13 00:00:00.000000', 1, 0),
(127, 'Staff Roles and Permissions', 'staff_roles_and_permissions', 'staff_roles_and_permissions/', 1, 125, 1, 0, 1, '2023-01-13 00:00:00.000000', 2, 0),
(128, 'Payroll Templates', 'payroll_templates', 'payroll_templates/', 1, 65, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(129, 'Savings Products', 'savings_products', 'savings_products/', 1, 42, 1, 0, 1, '2023-01-13 00:00:00.000000', 6, 0),
(130, 'Expense Transactions', 'expense_transactions', 'expense_transactions/', 1, 69, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(131, 'Approve Expense Transactions', 'approve_expense_transactions', 'approve_expense_transactions/', 1, 69, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0),
(132, 'SMS Settings', 'sms_settings', 'sms_settings/', 1, 104, 1, 0, 1, '2023-01-13 00:00:00.000000', 3, 0),
(133, 'Email Settings', 'email_settings', 'email_settings/', 1, 104, 1, 0, 1, '2023-01-13 00:00:00.000000', 4, 0);

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

--
-- Table structure for table `modules_dashboard_menu`
--

CREATE TABLE `modules_dashboard_menu` (
  `id` bigint(20) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `module_id` bigint(20) NOT NULL,
  `sort_value` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `modules_dashboard_menu`
--

INSERT INTO `modules_dashboard_menu` (`id`, `is_disabled`, `created`, `module_id`, `sort_value`) VALUES
(1, 0, '2023-01-20 00:00:00.000000', 104, 1),
(2, 0, '2023-01-20 00:00:00.000000', 107, 2),
(3, 0, '2023-01-20 00:00:00.000000', 125, 3);

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

--
-- Table structure for table `modules_side_menu`
--

CREATE TABLE `modules_side_menu` (
  `id` bigint(20) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `module_id` bigint(20) NOT NULL,
  `sort_value` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `modules_side_menu`
--

INSERT INTO `modules_side_menu` (`id`, `is_disabled`, `created`, `module_id`, `sort_value`) VALUES
(1, 0, '2023-01-20 00:00:00.000000', 1, 1),
(2, 0, '2023-01-20 00:00:00.000000', 9, 2),
(3, 0, '2023-01-20 00:00:00.000000', 3, 3),
(4, 0, '2023-01-20 00:00:00.000000', 30, 4),
(5, 0, '2023-01-20 00:00:00.000000', 31, 5),
(6, 0, '2023-01-20 00:00:00.000000', 32, 6),
(7, 0, '2023-01-20 00:00:00.000000', 38, 7),
(8, 0, '2023-01-20 00:00:00.000000', 46, 8),
(9, 0, '2023-01-20 00:00:00.000000', 52, 9),
(10, 0, '2023-01-20 00:00:00.000000', 58, 10),
(11, 0, '2023-01-20 00:00:00.000000', 64, 11),
(12, 0, '2023-01-20 00:00:00.000000', 65, 12),
(13, 0, '2023-01-20 00:00:00.000000', 69, 13),
(14, 0, '2023-01-20 00:00:00.000000', 72, 14),
(15, 0, '2023-01-20 00:00:00.000000', 75, 15),
(16, 0, '2023-01-20 00:00:00.000000', 78, 16),
(17, 0, '2023-01-20 00:00:00.000000', 97, 17);

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

--
-- Table structure for table `module_groups`
--

CREATE TABLE `module_groups` (
  `id` bigint(20) NOT NULL,
  `en_module_group_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `sort_value` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `payment_types`
--

CREATE TABLE `payment_types` (
  `id` int(11) NOT NULL,
  `en_payment_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `description` varchar(5000) DEFAULT NULL,
  `sort_value` int(11) NOT NULL DEFAULT 0,
  `has_standarded_charge` tinyint(1) NOT NULL DEFAULT 0,
  `payment_charge` float NOT NULL DEFAULT 0,
  `charge_in_percentage` tinyint(1) NOT NULL DEFAULT 1,
  `charge_fees_on_customer` tinyint(1) NOT NULL DEFAULT 1,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `payment_types`
--

INSERT INTO `payment_types` (`id`, `en_payment_name`, `code_name`, `description`, `sort_value`, `has_standarded_charge`, `payment_charge`, `charge_in_percentage`, `charge_fees_on_customer`, `is_default`, `is_disabled`, `created`) VALUES
(1, 'Cash', 'cash', '', 0, 0, 0, 1, 1, 0, 0, '2022-12-21 03:03:42'),
(2, 'Bank Wire', 'bank', '', 0, 0, 0, 1, 1, 0, 0, '2022-12-21 03:04:26'),
(3, 'Cheque', 'cheque', '', 0, 0, 0, 1, 1, 0, 0, '2022-12-21 03:04:56'),
(4, 'Visa & Mastercard (cards)', 'cards', '', 0, 0, 0, 1, 1, 0, 0, '2022-12-21 03:06:07'),
(5, 'Mobile Money', 'momo', '', 0, 0, 0, 1, 1, 0, 0, '2022-12-21 03:06:29');

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

--
-- Table structure for table `regions`
--

CREATE TABLE `regions` (
  `id` int(11) NOT NULL,
  `country_id` int(11) NOT NULL,
  `region_name` varchar(300) NOT NULL,
  `region_number` int(11) DEFAULT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `regions`
--

INSERT INTO `regions` (`id`, `country_id`, `region_name`, `region_number`, `is_disabled`, `created`) VALUES
(1, 1, 'Central region', 47, 0, '2022-12-08 19:29:16');

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

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

CREATE TABLE `roles` (
  `id` int(11) NOT NULL,
  `reports_to_id` int(11) DEFAULT NULL,
  `en_role_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `roles` (`id`, `reports_to_id`, `en_role_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, NULL, 'Admin', 'admin', 0, '2023-01-13 15:57:01'),
(2, NULL, 'Owner', 'owner', 0, '2023-01-13 15:57:01'),
(3, 0, 'Teller', 'teller', 0, '2023-01-13 15:57:01'),
(4, NULL, 'Loan Officer', 'loan_officer', 0, '2023-01-13 15:57:01');

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

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `last_login` datetime NOT NULL,
  `email` varchar(255) NOT NULL,
  `is_superuser` tinyint(1) NOT NULL DEFAULT 0,
  `is_staff` tinyint(1) NOT NULL DEFAULT 1,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `address` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `phoneno` varchar(255) DEFAULT NULL,
  `bio` varchar(3000) DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `id_no` varchar(255) DEFAULT NULL,
  `profile_picture` varchar(255) DEFAULT NULL,
  `is_deletable` tinyint(1) DEFAULT 1,
  `staff_type_id` int(11) NOT NULL,
  `branch_id` int(11) DEFAULT NULL,
  `apply_hourly_rate_on_salary` tinyint(1) NOT NULL DEFAULT 0,
  `is_full_time` tinyint(1) NOT NULL DEFAULT 1,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staff_permissions`
--

CREATE TABLE `staff_permissions` (
  `id` bigint(20) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL,
  `permission_id` bigint(20) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `has_permission` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staff_permission_groups`
--

CREATE TABLE `staff_permission_groups` (
  `id` bigint(20) NOT NULL,
  `en_group_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL,
  `created` datetime(6) NOT NULL,
  `has_been_modified` tinyint(1) NOT NULL,
  `last_modified` datetime(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staff_roles`
--

CREATE TABLE `staff_roles` (
  `id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `craeted` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staff_types`
--

CREATE TABLE `staff_types` (
  `id` int(11) NOT NULL,
  `en_staff_type_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `staff_types`
--

INSERT INTO `staff_types` (`id`, `en_staff_type_name`, `code_name`, `is_disabled`, `is_default`, `created`) VALUES
(1, 'Full-time', 'full_time', 0, 1, '2022-12-22 14:39:16'),
(2, 'Part-time', 'part_time', 0, 0, '2022-12-22 14:39:16'),
(3, 'Temporary', 'temporary', 0, 0, '2022-12-22 14:39:16'),
(4, 'Seasonal', 'seasonal', 0, 0, '2022-12-22 14:39:16');

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

--
-- Table structure for table `time_zones`
--

CREATE TABLE `time_zones` (
  `id` int(11) NOT NULL,
  `country_id` int(11) NOT NULL,
  `zone_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `time_zones`
--

INSERT INTO `time_zones` (`id`, `country_id`, `zone_name`, `is_disabled`, `created`) VALUES
(1, 1, 'Africa/Kampala', 0, '2022-12-08 19:54:41'),
(2, 2, 'Africa/Nairobi', 0, '2022-12-08 19:54:41');

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

--
-- Table structure for table `titles`
--

CREATE TABLE `titles` (
  `id` int(11) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `code_name` varchar(255) NOT NULL,
  `is_disabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `titles`
--

INSERT INTO `titles` (`id`, `display_name`, `code_name`, `is_disabled`, `created`) VALUES
(1, 'Mr.', 'Mr.', 0, '2022-12-29 15:09:55'),
(2, 'Mrs.', 'Mrs.', 0, '2022-12-29 15:09:55'),
(3, 'Miss', 'Miss', 0, '2022-12-29 15:09:55'),
(4, 'Ms.', 'Ms.', 0, '2022-12-29 15:09:55'),
(5, 'Dr.', 'Dr.', 0, '2022-12-29 15:09:55'),
(6, 'Prof.', 'Prof.', 0, '2022-12-29 15:09:55'),
(7, 'Rev.', 'Rev.', 0, '2022-12-29 15:09:55');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accounts`
--
ALTER TABLE `accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `accounts_accounts_group_id_0e566256_fk_accountssgroup_id` (`accounts_group_id`),
  ADD KEY `accounts_accounts_subgroup_id_d3813b6c_fk_api_accou` (`accounts_subgroup_id`),
  ADD KEY `accounts_accounts_class_id_53e6c193_fk_accountssclass_id` (`accounts_class_id`),
  ADD KEY `accounts_currency_id_47ca3452_fk_api_currencies_id` (`currency_id`),
  ADD KEY `accounts_created_by_id_746dc900_fk_auth_user_id` (`created_by_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `accounts_classes`
--
ALTER TABLE `accounts_classes`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

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

--
-- AUTO_INCREMENT for table `accounts_ledger_entries`
--
ALTER TABLE `accounts_ledger_entries`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `accounts_settings`
--
ALTER TABLE `accounts_settings`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

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

--
-- AUTO_INCREMENT for table `assets`
--
ALTER TABLE `assets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `assets_categories`
--
ALTER TABLE `assets_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `assets_types`
--
ALTER TABLE `assets_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `asset_current_value`
--
ALTER TABLE `asset_current_value`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `athousand_separator`
--
ALTER TABLE `athousand_separator`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `auth_users`
--
ALTER TABLE `auth_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `borrowers`
--
ALTER TABLE `borrowers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `borrower_files`
--
ALTER TABLE `borrower_files`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `borrower_loan_officers`
--
ALTER TABLE `borrower_loan_officers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `borrower_working_status`
--
ALTER TABLE `borrower_working_status`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `borrowing_groups`
--
ALTER TABLE `borrowing_groups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `borrowing_group_borrowers`
--
ALTER TABLE `borrowing_group_borrowers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

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

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

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

--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `date_formats`
--
ALTER TABLE `date_formats`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `decimal_separator`
--
ALTER TABLE `decimal_separator`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses_transactions`
--
ALTER TABLE `expenses_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fiscal_year`
--
ALTER TABLE `fiscal_year`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `genders`
--
ALTER TABLE `genders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `languages`
--
ALTER TABLE `languages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `loan_decimal_places`
--
ALTER TABLE `loan_decimal_places`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `loan_duration_periods`
--
ALTER TABLE `loan_duration_periods`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `loan_fees`
--
ALTER TABLE `loan_fees`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `loan_fees_percentage_calculation_on`
--
ALTER TABLE `loan_fees_percentage_calculation_on`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `loan_intetrest_methods`
--
ALTER TABLE `loan_intetrest_methods`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `loan_intrest_periods`
--
ALTER TABLE `loan_intrest_periods`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `loan_repayment_cycles`
--
ALTER TABLE `loan_repayment_cycles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `loan_repayment_orderings`
--
ALTER TABLE `loan_repayment_orderings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `loan_types`
--
ALTER TABLE `loan_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `modules`
--
ALTER TABLE `modules`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=134;

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

--
-- AUTO_INCREMENT for table `modules_side_menu`
--
ALTER TABLE `modules_side_menu`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

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

--
-- AUTO_INCREMENT for table `payment_types`
--
ALTER TABLE `payment_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `regions`
--
ALTER TABLE `regions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

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

--
-- AUTO_INCREMENT for table `staff_roles`
--
ALTER TABLE `staff_roles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `staff_types`
--
ALTER TABLE `staff_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `time_zones`
--
ALTER TABLE `time_zones`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `titles`
--
ALTER TABLE `titles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
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 */;
