-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `ramakrishna_db`
--

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

--
-- Table structure for table `2025_2026_assets_opening_balance`
--

CREATE TABLE `2025_2026_assets_opening_balance` (
  `id` int(11) NOT NULL,
  `assets_opening_balance` float(6,5) NOT NULL,
  `head_group_id` int(11) NOT NULL,
  `head_id` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `2025_2026_asset_mapping_transaction`
--

CREATE TABLE `2025_2026_asset_mapping_transaction` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `asset_id` int(11) DEFAULT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `journal_id` int(11) DEFAULT NULL,
  `amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `income_expense` enum('income','expense') DEFAULT NULL,
  `dr_cr` enum('dr','cr') DEFAULT 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 `2025_2026_contra_journal_trans_mapping`
--

CREATE TABLE `2025_2026_contra_journal_trans_mapping` (
  `id` int(11) NOT NULL,
  `journal_tran_id` int(11) NOT NULL,
  `bank_id` int(11) NOT NULL,
  `bank_amount` float NOT NULL,
  `bank_transaction_date` date DEFAULT NULL,
  `cash_amount` float DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `2025_2026_contra_journal_trans_mapping`
--

INSERT INTO `2025_2026_contra_journal_trans_mapping` (`id`, `journal_tran_id`, `bank_id`, `bank_amount`, `bank_transaction_date`, `cash_amount`, `created_at`, `updated_at`) VALUES
(1, 12, 9, 2000, '2025-11-22', 2000, '2025-11-28 16:05:57', '2025-11-28 16:05:57'),
(2, 13, 8, 3200, '2025-10-31', 3200, '2025-11-28 16:27:21', '2025-11-28 16:27:21'),
(3, 13, 4, 3200, '2025-10-31', 3200, '2025-11-28 16:27:21', '2025-11-28 16:27:21'),
(4, 13, 10, 6520, '2025-10-29', 6520, '2025-11-28 16:27:21', '2025-11-28 16:27:21'),
(5, 14, 2, 2500, '2025-11-11', 0, '2025-11-28 16:41:21', '2025-11-28 16:41:21'),
(6, 14, 2, 3200, '2025-10-23', 0, '2025-11-28 16:41:21', '2025-11-28 16:41:21');

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

--
-- Table structure for table `2025_2026_donor_mapping_transaction`
--

CREATE TABLE `2025_2026_donor_mapping_transaction` (
  `id` int(10) UNSIGNED NOT NULL,
  `asset_id` int(11) DEFAULT NULL,
  `liability_id` int(11) DEFAULT NULL,
  `donor_id` int(11) DEFAULT NULL,
  `journal_id` int(11) DEFAULT NULL,
  `paid_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `income_expense` enum('income','expense') NOT NULL,
  `dr_cr` enum('dr','cr') NOT NULL,
  `flag` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`flag`)),
  `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 `2025_2026_donor_mapping_transaction`
--

INSERT INTO `2025_2026_donor_mapping_transaction` (`id`, `asset_id`, `liability_id`, `donor_id`, `journal_id`, `paid_amount`, `income_expense`, `dr_cr`, `flag`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 1, 1, 500.00, 'income', 'dr', '{\"member_fee\": 400, \"contingent_fee\": 100}', '2025-10-03 12:14:58', '2025-10-03 12:14:58'),
(2, NULL, NULL, 1, 2, 100.00, 'income', 'dr', '\"Sadhu Seba\"', '2025-10-03 12:15:46', '2025-10-03 12:15:46'),
(3, NULL, NULL, 2, 3, 500.00, 'income', 'dr', '\"Jagadhatri Puja\"', '2025-10-03 12:16:31', '2025-10-03 12:16:31'),
(4, NULL, NULL, 7, 10, 100.00, 'income', 'dr', '\"Birthday (Maa)\"', '2025-10-03 12:21:07', '2025-10-03 12:21:07'),
(5, NULL, NULL, 3, 5, 2000.00, 'income', 'dr', '\"Pranami\"', '2025-10-03 12:21:07', '2025-10-03 12:21:07'),
(6, NULL, NULL, 3, 6, 5000.00, 'income', 'dr', '\"Ramakrishna Birthday\"', '2025-10-03 12:21:07', '2025-10-03 12:21:07'),
(7, NULL, NULL, 9, 7, 500.00, 'income', 'dr', '{\"member_fee\": 400, \"contingent_fee\": 100}', '2025-10-03 12:33:24', '2025-10-03 12:33:24'),
(8, NULL, NULL, 2, 8, 200.00, 'income', 'dr', '\"Ramakrishna Birthday\"', '2025-10-03 14:23:30', '2025-10-03 14:23:30'),
(9, NULL, NULL, 5, 9, 500.00, 'income', 'dr', '{\"member_fee\": 400, \"contingent_fee\": 100}', '2025-10-03 14:41:32', '2025-10-03 14:41:32'),
(10, NULL, NULL, 9, 10, 100.00, 'income', 'dr', '\"Pranami\"', '2025-10-03 15:04:06', '2025-10-03 15:04:06'),
(11, NULL, NULL, 9, 11, 200.00, 'income', 'dr', '\"Foundation Day\"', '2025-10-03 15:04:06', '2025-10-03 15:04:06'),
(12, NULL, NULL, 9, 12, 10.00, 'income', 'dr', '\"Sadhu Seba\"', '2025-10-03 15:04:06', '2025-10-03 15:04:06'),
(13, NULL, NULL, 13, 13, 100.00, 'income', 'dr', '\"Jagadhatri Puja\"', '2025-10-06 10:53:22', '2025-10-06 10:53:22'),
(14, NULL, NULL, 13, 14, 50.00, 'income', 'dr', '\"Foundation Day\"', '2025-10-06 10:53:22', '2025-10-06 10:53:22'),
(15, NULL, NULL, 13, 15, 100.00, 'income', 'dr', '\"Education Fund\"', '2025-10-06 10:53:22', '2025-10-06 10:53:22'),
(16, NULL, NULL, 13, 16, 500.00, 'income', 'dr', '{\"member_fee\": 400, \"contingent_fee\": 100}', '2025-10-06 10:54:40', '2025-10-06 10:54:40'),
(17, NULL, NULL, 11, 17, 500.00, 'income', 'dr', '{\"member_fee\": 400, \"contingent_fee\": 100}', '2025-10-06 11:09:42', '2025-10-06 11:09:42'),
(18, NULL, NULL, 11, 18, 200.00, 'income', 'dr', '\"Ramakrishna Birthday\"', '2025-10-06 11:16:45', '2025-10-06 11:16:45'),
(19, NULL, NULL, 12, 19, 200.00, 'income', 'dr', '\"Education Fund\"', '2025-10-06 11:19:04', '2025-10-06 11:19:04'),
(20, NULL, NULL, 3, 4, 7000.00, 'income', 'dr', '\"Jagadhatri Puja\"', '2025-10-14 08:00:42', '2025-10-14 08:00:42'),
(24, NULL, NULL, 1, 8, 500.00, 'income', 'dr', '{\"member_fee\":400,\"contingent_fee\":100}', '2025-10-17 03:23:42', '2025-10-17 03:23:42'),
(25, NULL, NULL, 2, 9, 2500.00, 'income', 'dr', '\"Foundation Day\"', '2025-10-17 04:11:26', '2025-10-17 04:11:26'),
(26, NULL, NULL, 1, 10, 5200.00, 'income', 'dr', '\"Foundation Day\"', '2025-10-17 04:12:51', '2025-10-17 04:12:51');

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

--
-- Table structure for table `2025_2026_journal_transactions`
--

CREATE TABLE `2025_2026_journal_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `organisation_id` bigint(20) UNSIGNED NOT NULL,
  `account_type_id` bigint(20) UNSIGNED DEFAULT NULL,
  `money_receipt_no` varchar(255) DEFAULT NULL,
  `head_id` bigint(20) UNSIGNED DEFAULT NULL,
  `head_group_id` bigint(20) UNSIGNED DEFAULT NULL,
  `transcation_type` enum('income','expense','contra') DEFAULT NULL,
  `paid_by` varchar(255) DEFAULT NULL,
  `donor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `vendor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `staff_id` bigint(20) UNSIGNED DEFAULT NULL,
  `pay_to` bigint(20) UNSIGNED DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `payment_type_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `transaction_reference` varchar(255) DEFAULT NULL,
  `transaction_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `contra_cash_depo_allocated_amount` float(15,2) DEFAULT NULL,
  `contra_total_transaction_amount` float(6,5) DEFAULT NULL,
  `contra_reference_type` enum('cash_deposite','cash_withdraw','bank_transfer') DEFAULT NULL,
  `transaction_date` date DEFAULT NULL,
  `transaction_narration` 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 `2025_2026_journal_transactions`
--

INSERT INTO `2025_2026_journal_transactions` (`id`, `organisation_id`, `account_type_id`, `money_receipt_no`, `head_id`, `head_group_id`, `transcation_type`, `paid_by`, `donor_id`, `vendor_id`, `staff_id`, `pay_to`, `file_path`, `payment_type_id`, `user_id`, `transaction_reference`, `transaction_amount`, `contra_cash_depo_allocated_amount`, `contra_total_transaction_amount`, `contra_reference_type`, `transaction_date`, `transaction_narration`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'AWED0035', 5, 7, 'income', NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, '56465456465', 5000.00, NULL, NULL, NULL, '2025-11-04', 'interest recived', NULL, NULL),
(2, 1, 1, 'ASDFA001', 5, 7, 'expense', NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 1000.00, NULL, NULL, NULL, '2025-11-01', NULL, '2025-11-04 07:22:48', NULL),
(3, 1, NULL, NULL, 6, 7, 'income', NULL, 2, NULL, NULL, NULL, NULL, 2, NULL, NULL, 6000.00, NULL, NULL, NULL, '2025-11-10', 'Donation Cloth Distribution', NULL, NULL),
(4, 1, NULL, NULL, 6, 7, 'income', NULL, 3, NULL, NULL, NULL, NULL, 1, NULL, NULL, 7000.00, NULL, NULL, NULL, '2025-11-08', 'Cloth Distribution for child', NULL, NULL),
(5, 1, NULL, NULL, 6, 7, 'income', NULL, 3, NULL, NULL, NULL, NULL, 1, NULL, NULL, 2000.00, NULL, NULL, NULL, '2025-11-05', 'Cloth Distribution for child', NULL, NULL),
(6, 1, NULL, '5842100', 6, 7, 'income', NULL, 3, NULL, NULL, NULL, NULL, 2, NULL, NULL, 5000.00, NULL, NULL, NULL, '2025-11-11', 'Cloth Distribution for child', NULL, NULL),
(7, 1, 1, NULL, 2, 2, 'expense', NULL, NULL, 10, NULL, NULL, NULL, 1, NULL, NULL, 10000.00, NULL, NULL, NULL, '2025-11-20', NULL, NULL, NULL),
(8, 1, 1, NULL, 20, 5, 'expense', NULL, NULL, 9, NULL, NULL, NULL, 2, NULL, NULL, 6000.00, NULL, NULL, NULL, '2025-11-20', NULL, NULL, NULL),
(12, 1, NULL, NULL, NULL, NULL, 'contra', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, 2000.00, 2500.00, NULL, 'cash_deposite', NULL, NULL, '2025-11-28 05:05:57', NULL),
(13, 1, NULL, NULL, NULL, NULL, 'contra', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, 12920.00, NULL, NULL, 'cash_withdraw', NULL, 'cash Withdraw from banks', '2025-11-28 05:27:21', NULL),
(14, 1, NULL, NULL, NULL, NULL, 'contra', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, 5700.00, NULL, NULL, 'bank_transfer', NULL, 'bank trasfer', '2025-11-28 05:41:21', NULL);

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

--
-- Table structure for table `2025_2026_liability_mapping_transaction`
--

CREATE TABLE `2025_2026_liability_mapping_transaction` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `donor_id` int(11) DEFAULT NULL,
  `liability_id` int(11) DEFAULT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `journal_id` int(11) DEFAULT NULL,
  `amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `income_expense` enum('income','expense') DEFAULT NULL,
  `dr_cr` enum('dr','cr') 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 `2025_2026_liability_mapping_transaction`
--

INSERT INTO `2025_2026_liability_mapping_transaction` (`id`, `donor_id`, `liability_id`, `vendor_id`, `journal_id`, `amount`, `income_expense`, `dr_cr`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, 4, 1, 500.00, 'expense', 'cr', '2025-09-18 13:24:37', '2025-09-18 13:24:37'),
(2, NULL, 3, NULL, 3, 152000.00, 'income', 'cr', '2025-10-15 07:45:11', '2025-10-15 07:45:11');

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

--
-- Table structure for table `2025_2026_vendor_mapping_transaction`
--

CREATE TABLE `2025_2026_vendor_mapping_transaction` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `asset_id` int(11) DEFAULT NULL,
  `liability_id` int(11) DEFAULT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `journal_id` int(11) DEFAULT NULL,
  `total_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `paid_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `income_expense` enum('income','expense') DEFAULT NULL,
  `dr_cr` enum('dr','cr') 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 `2025_2026_vendor_mapping_transaction`
--

INSERT INTO `2025_2026_vendor_mapping_transaction` (`id`, `asset_id`, `liability_id`, `vendor_id`, `journal_id`, `total_amount`, `paid_amount`, `income_expense`, `dr_cr`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 10, 7, 10000.00, 10000.00, 'expense', 'cr', '2025-10-14 06:27:31', '2025-10-14 06:27:31'),
(2, NULL, NULL, 9, 8, 6000.00, 6000.00, 'expense', 'cr', NULL, NULL);

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

--
-- Table structure for table `accounting_years`
--

CREATE TABLE `accounting_years` (
  `accounting_year_id` int(10) UNSIGNED NOT NULL,
  `accounting_year_financial` varchar(100) NOT NULL,
  `accounting_start_year` bigint(20) UNSIGNED DEFAULT NULL,
  `accounting_end_year` bigint(20) UNSIGNED DEFAULT NULL,
  `is_current` tinyint(1) NOT NULL DEFAULT 0,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `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 `accounting_years`
--

INSERT INTO `accounting_years` (`accounting_year_id`, `accounting_year_financial`, `accounting_start_year`, `accounting_end_year`, `is_current`, `status`, `created_at`, `updated_at`) VALUES
(1, '01-04-2024 to 31-03-2025', 2024, 2025, 0, 'inactive', '2025-08-22 11:54:45', '2025-09-08 08:22:43'),
(2, '01-04-2023 to 31-03-2024', 2023, 2024, 0, 'inactive', '2025-08-22 12:27:57', '2025-09-16 11:27:53'),
(3, '01-04-2025 to 31-03-2026', 2025, 2026, 1, 'active', '2025-08-25 11:22:08', '2025-10-03 12:14:17'),
(4, '01-04-2022 to 31-03-2023', 2022, 2023, 0, 'inactive', '2025-09-19 07:24:16', '2025-09-19 07:24:50');

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

--
-- Table structure for table `account_brought_forwards`
--

CREATE TABLE `account_brought_forwards` (
  `id` int(10) UNSIGNED NOT NULL,
  `organisation_id` int(11) NOT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `financial_year_id` int(11) NOT NULL,
  `cash_in_hand` decimal(15,2) NOT NULL DEFAULT 0.00,
  `cash_at_bank` decimal(15,2) NOT NULL DEFAULT 0.00,
  `user_id` int(11) NOT NULL,
  `dated_as_on` date 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 `account_brought_forwards`
--

INSERT INTO `account_brought_forwards` (`id`, `organisation_id`, `account_type_id`, `financial_year_id`, `cash_in_hand`, `cash_at_bank`, `user_id`, `dated_as_on`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 3, 20000.00, 75000.00, 1, '2025-04-01', '2025-09-16 11:28:52', '2025-09-16 11:28:52');

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

--
-- Table structure for table `account_types`
--

CREATE TABLE `account_types` (
  `account_type_id` bigint(20) UNSIGNED NOT NULL,
  `organisation_id` bigint(20) UNSIGNED NOT NULL,
  `account_type_Name` varchar(255) NOT NULL,
  `account_type_Description` varchar(255) DEFAULT NULL,
  `divition_flag` enum('general','member-suscription') NOT NULL DEFAULT 'general',
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `account_types`
--

INSERT INTO `account_types` (`account_type_id`, `organisation_id`, `account_type_Name`, `account_type_Description`, `divition_flag`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Sarada Samity', NULL, 'general', 'active', NULL, NULL),
(2, 1, 'Library Section', NULL, 'general', 'active', NULL, NULL),
(3, 1, 'Health Clinic Section', NULL, 'member-suscription', 'active', NULL, NULL),
(4, 1, 'New Temple', NULL, 'general', 'active', NULL, NULL),
(5, 1, 'Old Temple', NULL, 'general', 'active', NULL, NULL),
(7, 1, 'Yearly Subscription', NULL, 'member-suscription', 'active', NULL, NULL),
(8, 1, 'Foundation Day', NULL, 'member-suscription', 'active', NULL, NULL),
(9, 1, 'Jagadhatri Puja', NULL, 'member-suscription', 'active', NULL, NULL),
(10, 1, 'Birthday (Maa)', NULL, 'member-suscription', 'active', NULL, NULL),
(11, 1, 'Ramakrishna Birthday', NULL, 'member-suscription', 'active', NULL, NULL),
(12, 1, 'Sadhu Seba', NULL, 'member-suscription', 'active', NULL, NULL),
(13, 1, 'Pranami', NULL, 'member-suscription', 'active', NULL, NULL),
(14, 1, 'Cloth Distribution', NULL, 'member-suscription', 'active', NULL, NULL),
(15, 1, 'Education Fund', NULL, 'member-suscription', 'active', NULL, NULL),
(16, 1, 'Relief Fund', NULL, 'member-suscription', 'active', NULL, NULL),
(17, 1, 'Blood Donation', NULL, 'member-suscription', 'active', NULL, NULL),
(18, 1, 'Swamiji Birthday', NULL, 'member-suscription', 'active', NULL, NULL),
(19, 1, 'Contingency Fund', NULL, 'member-suscription', 'active', NULL, NULL);

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

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

CREATE TABLE `assets` (
  `asset_id` int(10) UNSIGNED NOT NULL,
  `organisation_id` int(11) NOT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `head_id` bigint(20) UNSIGNED DEFAULT NULL,
  `head_group_id` bigint(20) UNSIGNED DEFAULT NULL,
  `depriciation_calcutated_amount` varchar(255) DEFAULT NULL,
  `asset_purchase_date` date DEFAULT NULL,
  `financial_year_id` int(11) DEFAULT NULL,
  `asset_purchase_cost` decimal(15,2) NOT NULL DEFAULT 0.00,
  `asset_useful_life` int(11) DEFAULT 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;

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

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

CREATE TABLE `banks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_code` varchar(255) DEFAULT NULL,
  `ifsc_code` varchar(255) DEFAULT NULL,
  `branch` varchar(255) DEFAULT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `swift_code` varchar(255) DEFAULT NULL,
  `micr_code` varchar(255) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `contact_number` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `address_line1` varchar(255) DEFAULT NULL,
  `address_line2` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `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 `banks`
--

INSERT INTO `banks` (`id`, `name`, `short_code`, `ifsc_code`, `branch`, `account_number`, `swift_code`, `micr_code`, `contact_person`, `contact_number`, `email`, `address_line1`, `address_line2`, `city`, `state`, `country`, `postal_code`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'State Bank of Artemis', 'SBA', 'SBAR0001234', 'New Horizon Branch', '124567890123', 'SBARINBB001', '400002345', 'Priya Sharma', '9876543210', 'contact@sba-example.com', '12 Skyline Avenue', '4th Floor', 'Mumbai', 'Maharashtra', 'India', '400001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(2, 'Heritage Cooperative Bank', 'HCB', 'HERI0009876', 'Central Heritage Branch', '223456789012', 'HERIINBB002', '110002345', 'Arun Patel', '9123456780', 'hello@heritagecoop.com', '45 Heritage Lane', 'Suite 8', 'New Delhi', 'Delhi', 'India', '110001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(3, 'Riverfront Savings Bank', 'RSB', 'RIVF0004567', 'Riverfront Promenade', '334567890123', 'RIVFINBB003', '560002345', 'Meera Nair', '9034567812', 'support@riverfrontbank.com', '88 Riverside Road', 'Block B', 'Bengaluru', 'Karnataka', 'India', '560001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(4, 'Evergreen Urban Bank', 'EUB', 'EVER0007654', 'Green Meadows Branch', '445678901234', 'EVERINBB004', '700002345', 'Rohit Sen', '9988776655', 'service@evergreenurban.com', '22 Garden Street', 'Near City Park', 'Kolkata', 'West Bengal', 'India', '700001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(5, 'Summit National Bank', 'SNB', 'SUMT0003210', 'Summit Heights Branch', '556789012345', 'SUMTINBB005', '600002345', 'Divya Reddy', '9012345678', 'info@summitnb.com', '18 Cloudline Avenue', 'Summit Towers', 'Chennai', 'Tamil Nadu', 'India', '600002', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(6, 'Lighthouse Community Bank', 'LCB', 'LIGH0006543', 'Beacon District Branch', '667890123456', 'LIGHINBB006', '682002345', 'Manoj Thomas', '9845123456', 'care@lighthousebank.com', '9 Beacon Street', 'Opp. Marine Plaza', 'Kochi', 'Kerala', 'India', '682001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(7, 'Sunrise Mutual Bank', 'SMB', 'SUNM0008521', 'Sunrise Vista Branch', '778901234567', 'SUNMINBB007', '380002345', 'Kiran Desai', '9823456710', 'contact@sunrisemutual.com', '56 Morning Glory Road', 'Suite 5A', 'Ahmedabad', 'Gujarat', 'India', '380001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(8, 'Harborline Trust Bank', 'HTB', 'HARB0009632', 'Coastal Harbor Branch', '889012345678', 'HARBINBB008', '403002345', 'Anita Fernandes', '9922334455', 'support@harborlinebank.com', '101 Seaside Boulevard', 'Palm Residency', 'Panaji', 'Goa', 'India', '403001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(9, 'Aurora Financial Bank', 'AFB', 'AURF0007412', 'Aurora Heights Branch', '990123456789', 'AURFINBB009', '452002345', 'Sneha Kapoor', '9776655443', 'hello@aurorafinbank.com', '64 Aurora Heights', '5th Cross', 'Indore', 'Madhya Pradesh', 'India', '452001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52'),
(10, 'Silverline Metro Bank', 'SMB2', 'SILM0001597', 'Metro Central Branch', '101234567890', 'SILMINBB010', '500002345', 'Vikram Rao', '9654321870', 'metro@silverlinebank.com', '77 Metro Avenue', 'Tech Hub', 'Hyderabad', 'Telangana', 'India', '500001', 1, '2025-11-12 05:35:52', '2025-11-12 05:35:52');

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

--
-- Table structure for table `donors`
--

CREATE TABLE `donors` (
  `donor_id` int(10) UNSIGNED NOT NULL,
  `donor_type` enum('members','foreign_members','non_members') NOT NULL,
  `organisation_id` int(11) NOT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `donor_name` varchar(255) NOT NULL,
  `donor_folio_no` varchar(255) DEFAULT NULL,
  `donor_contact_person` varchar(255) DEFAULT NULL,
  `donor_phone_number` varchar(20) DEFAULT NULL,
  `donor_email` varchar(255) DEFAULT NULL,
  `donor_address` text DEFAULT NULL,
  `donor_pan_number` varchar(20) DEFAULT NULL,
  `donor_aadhar_number` varchar(20) DEFAULT NULL,
  `donor_status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `donor_opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `donor_current_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `amount_flag` enum('not_paid','paid') NOT NULL DEFAULT 'not_paid',
  `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 `donors`
--

INSERT INTO `donors` (`donor_id`, `donor_type`, `organisation_id`, `account_type_id`, `donor_name`, `donor_folio_no`, `donor_contact_person`, `donor_phone_number`, `donor_email`, `donor_address`, `donor_pan_number`, `donor_aadhar_number`, `donor_status`, `donor_opening_balance`, `donor_current_balance`, `amount_flag`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'members', 1, 2, 'Rittika Saha', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'paid', '2025-09-23 12:59:05', '2025-11-19 06:04:57', NULL),
(2, 'members', 1, 4, 'Aindrilla bose', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-09-23 12:59:22', '2025-11-13 07:06:05', NULL),
(3, 'members', 1, 3, 'Ram jana', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-09-23 12:59:32', '2025-11-14 06:32:11', NULL),
(4, 'non_members', 1, NULL, 'Sneha Saha', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-09-23 13:01:47', '2025-09-23 13:01:47', NULL),
(5, 'members', 2, NULL, 'Arjan Mishra', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-09-24 05:46:26', '2025-11-14 06:10:09', NULL),
(6, 'members', 1, 1, 'Nepal Naskar', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-10-03 05:34:09', '2025-11-14 06:37:06', NULL),
(7, 'non_members', 1, NULL, 'Tarun Mitra', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-10-03 05:55:23', '2025-10-03 05:55:23', NULL),
(8, 'members', 1, 3, 'Satya Ranjan Dutta', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-10-03 06:23:59', '2025-11-19 06:04:36', NULL),
(9, 'members', 2, NULL, 'Amit Kar', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-10-03 11:02:33', '2025-10-03 11:02:33', NULL),
(10, 'foreign_members', 1, 4, 'Rajesh Shaw', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-10-03 12:57:57', '2025-10-03 12:57:57', NULL),
(11, 'members', 1, NULL, 'Rajesh Sharma', 'FOL123', NULL, '9876543210', NULL, '24, Lakeview Apartments, Salt Lake, Kolkata, West Bengal ? 700091', 'ABCDE1234F', NULL, 'active', 0.00, 0.00, 'not_paid', NULL, NULL, NULL),
(12, 'members', 1, NULL, 'Anjali Mehta', 'FOL124', NULL, '98230 45678', NULL, '102, Green Park Residency, Andheri East, Mumbai, Maharashtra', 'BCFPM6789K', NULL, 'active', 0.00, 0.00, 'not_paid', NULL, NULL, NULL),
(13, 'members', 1, NULL, 'Arvind Kumar', 'FOL125', NULL, '99580 12345', NULL, '24, Lakeview Apartments, Salt Lake, Kolkata, West Bengal ? 700091', 'CDTPA2345M', NULL, 'active', 0.00, 0.00, 'not_paid', NULL, NULL, NULL),
(14, 'members', 1, NULL, 'Subhodeep', 'FOL12356', NULL, '9876543210', NULL, 'ABCDE1234F', 'ABCDE1234H', NULL, 'active', 0.00, 0.00, 'not_paid', NULL, NULL, NULL),
(15, 'members', 1, 1, 'Sangita Das', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-11-21 05:41:45', '2025-11-21 05:41:45', NULL),
(16, 'foreign_members', 1, 3, 'Abhijeet Das', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'active', 0.00, 0.00, 'not_paid', '2025-11-21 05:43:39', '2025-11-21 05:43:39', NULL);

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

--
-- Table structure for table `donor_records`
--

CREATE TABLE `donor_records` (
  `id` int(10) UNSIGNED NOT NULL,
  `asset_id` int(11) DEFAULT NULL,
  `liability_id` int(11) DEFAULT NULL,
  `donor_id` int(11) DEFAULT NULL,
  `journal_id` int(11) DEFAULT NULL,
  `paid_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `income_expense` enum('income','expense') NOT NULL,
  `dr_cr` enum('dr','cr') NOT NULL,
  `flag` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`flag`)),
  `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 `donor_records`
--

INSERT INTO `donor_records` (`id`, `asset_id`, `liability_id`, `donor_id`, `journal_id`, `paid_amount`, `income_expense`, `dr_cr`, `flag`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 1, 1, 200.00, 'income', 'dr', '{\"member_fee\":100,\"contingent_fee\":100}', '2025-11-13 05:57:06', '2025-11-13 05:57:06'),
(2, NULL, NULL, 1, 2, 300.00, 'income', 'dr', '{\"member_fee\":300,\"contingent_fee\":0}', '2025-11-13 06:34:21', '2025-11-13 06:34:21'),
(3, NULL, NULL, 2, 3, 100.00, 'income', 'dr', '{\"member_fee\":0,\"contingent_fee\":100}', '2025-11-13 06:39:06', '2025-11-13 06:39:06'),
(4, NULL, NULL, 2, 4, 150.00, 'income', 'dr', '{\"member_fee\":150,\"contingent_fee\":0}', '2025-11-13 06:39:23', '2025-11-13 06:39:23'),
(5, NULL, NULL, 2, 5, 300.00, 'income', 'dr', '{\"member_fee\":300,\"contingent_fee\":0}', '2025-11-13 07:06:05', '2025-11-13 07:06:05'),
(6, NULL, NULL, 3, 6, 400.00, 'income', 'dr', '{\"member_fee\":300,\"contingent_fee\":100}', '2025-11-13 08:47:35', '2025-11-13 08:47:35'),
(7, NULL, NULL, 5, 7, 100.00, 'income', 'dr', '{\"member_fee\":0,\"contingent_fee\":100}', '2025-11-14 06:09:37', '2025-11-14 06:09:37'),
(8, NULL, NULL, 5, 8, 300.00, 'income', 'dr', '{\"member_fee\":300,\"contingent_fee\":0}', '2025-11-14 06:09:59', '2025-11-14 06:09:59'),
(9, NULL, NULL, 5, 9, 100.00, 'income', 'dr', '{\"member_fee\":100,\"contingent_fee\":0}', '2025-11-14 06:10:09', '2025-11-14 06:10:09'),
(10, NULL, NULL, 1, 10, 250.00, 'income', 'dr', '\"Transfer from School\"', '2025-11-14 06:10:25', '2025-11-14 06:10:25'),
(11, NULL, NULL, 3, 11, 1.00, 'income', 'dr', '{\"member_fee\":1,\"contingent_fee\":0}', '2025-11-14 06:21:24', '2025-11-14 06:21:24'),
(12, NULL, NULL, 3, 12, 9.00, 'income', 'dr', '{\"member_fee\":9,\"contingent_fee\":0}', '2025-11-14 06:21:34', '2025-11-14 06:21:34'),
(13, NULL, NULL, 3, 13, 90.00, 'income', 'dr', '{\"member_fee\":90,\"contingent_fee\":0}', '2025-11-14 06:32:11', '2025-11-14 06:32:11'),
(14, NULL, NULL, 6, 14, 350.00, 'income', 'dr', '{\"member_fee\":250,\"contingent_fee\":100}', '2025-11-14 06:36:39', '2025-11-14 06:36:39'),
(15, NULL, NULL, 6, 15, 150.00, 'income', 'dr', '{\"member_fee\":150,\"contingent_fee\":0}', '2025-11-14 06:37:06', '2025-11-14 06:37:06'),
(16, NULL, NULL, 8, 16, 150.00, 'income', 'dr', '{\"member_fee\":50,\"contingent_fee\":100}', '2025-11-14 06:37:28', '2025-11-14 06:37:28'),
(17, NULL, NULL, 8, 17, 350.00, 'income', 'dr', '{\"member_fee\":350,\"contingent_fee\":0}', '2025-11-19 06:04:36', '2025-11-19 06:04:36'),
(18, NULL, NULL, 1, 18, 500.00, 'income', 'dr', '\"Donation\"', '2025-11-19 06:04:57', '2025-11-19 06:04:57');

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

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

CREATE TABLE `expenses` (
  `expense_id` int(10) UNSIGNED NOT NULL,
  `receipt_no` varchar(255) DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `expense_type` enum('asset','liability','expense') DEFAULT NULL,
  `pay_to` enum('internal','external') DEFAULT NULL,
  `staff_id` int(11) DEFAULT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `purpose_id` int(11) DEFAULT NULL,
  `payment_type_id` int(11) DEFAULT NULL,
  `organisation_id` int(11) DEFAULT NULL,
  `financial_year_id` int(11) DEFAULT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `expense_head` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `transaction_reference` varchar(255) DEFAULT NULL,
  `transaction_amount` decimal(15,2) NOT NULL,
  `transaction_date` date NOT NULL,
  `transaction_narration` 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;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`expense_id`, `receipt_no`, `file_path`, `expense_type`, `pay_to`, `staff_id`, `vendor_id`, `purpose_id`, `payment_type_id`, `organisation_id`, `financial_year_id`, `account_type_id`, `expense_head`, `user_id`, `transaction_reference`, `transaction_amount`, `transaction_date`, `transaction_narration`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '4561285', NULL, 'expense', NULL, NULL, NULL, NULL, 1, 1, 3, 1, 10, 1, NULL, 50000.00, '2025-10-14', NULL, '2025-10-14 06:21:50', '2025-10-14 06:21:50', NULL),
(2, '4561285', NULL, 'expense', NULL, NULL, NULL, NULL, 4, 1, 3, 2, 9, 1, NULL, 54654.00, '2025-10-14', NULL, '2025-10-14 06:25:10', '2025-10-14 06:25:10', NULL),
(4, NULL, NULL, 'expense', 'internal', 11, NULL, NULL, 2, 1, 3, 2, 8, 1, NULL, 10000.00, '2025-10-14', NULL, '2025-10-14 06:27:31', '2025-10-14 06:27:31', NULL);

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

--
-- Table structure for table `expense_heads`
--

CREATE TABLE `expense_heads` (
  `expense_head_id` int(11) NOT NULL,
  `organisation_id` int(11) DEFAULT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `expense_head_group_id` bigint(20) UNSIGNED DEFAULT NULL,
  `expense_head_name` varchar(255) NOT NULL,
  `head_type` varchar(255) DEFAULT NULL,
  `depriciation_rate` varchar(255) DEFAULT NULL,
  `depriciation_tenure` varchar(255) DEFAULT NULL,
  `asset_opening_balance` varchar(255) DEFAULT NULL,
  `expense_head_group_opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `expense_heads`
--

INSERT INTO `expense_heads` (`expense_head_id`, `organisation_id`, `account_type_id`, `expense_head_group_id`, `expense_head_name`, `head_type`, `depriciation_rate`, `depriciation_tenure`, `asset_opening_balance`, `expense_head_group_opening_balance`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 3, 'Purchase of Land', 'fixed_asset', '10%', '12', NULL, 0.00, 'active', '2025-10-13 06:04:53', '2025-10-13 06:04:53'),
(2, 1, NULL, 3, 'Purchase of Furniture', 'fixed_asset', '10%', '12', NULL, 0.00, 'active', '2025-10-13 06:06:14', '2025-10-13 06:06:14'),
(3, 1, NULL, 2, 'Electricity Bill', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:06:35', '2025-10-13 06:06:35'),
(4, 1, NULL, 2, 'Telephone Bill', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:06:54', '2025-10-13 06:06:54'),
(5, 1, NULL, 2, 'Salary', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:07:21', '2025-10-13 06:07:21'),
(6, 1, NULL, 2, 'Office Expenses', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:07:41', '2025-10-13 06:07:41'),
(7, 1, NULL, 2, 'Travelling Allowances', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:08:02', '2025-10-13 06:08:02'),
(8, 1, NULL, 1, 'Loan Repayment', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:08:33', '2025-10-13 06:08:33'),
(9, 1, NULL, 1, 'Interest on Loan', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:08:51', '2025-10-13 06:08:51'),
(10, 1, NULL, 4, 'Transfer to School', 'payment', NULL, NULL, NULL, 0.00, 'active', '2025-10-13 06:09:46', '2025-10-13 06:09:46');

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

--
-- Table structure for table `expense_head_groups`
--

CREATE TABLE `expense_head_groups` (
  `expense_head_group_ID` bigint(20) UNSIGNED NOT NULL,
  `expense_head_group_Name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `expense_head_groups`
--

INSERT INTO `expense_head_groups` (`expense_head_group_ID`, `expense_head_group_Name`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Payments', 'active', '2025-09-13 04:55:28', '2025-09-13 04:55:28'),
(2, 'General Expense', 'active', '2025-09-13 04:55:28', '2025-09-13 04:55:28'),
(3, 'Assets', 'active', '2025-09-13 04:55:28', '2025-09-13 04:55:28'),
(4, 'Payment Transfer', 'active', '2025-09-13 04:55:28', '2025-09-13 04:55:28');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `heads`
--

CREATE TABLE `heads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `head_group_id` bigint(20) UNSIGNED NOT NULL,
  `account_type_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) DEFAULT NULL,
  `organisation_id` int(11) NOT NULL,
  `asset_or_liability_type` varchar(255) DEFAULT NULL,
  `depriciation_type` enum('flat','percentage') DEFAULT NULL,
  `depriciation_rate` varchar(255) DEFAULT NULL,
  `depriciation_tenure` varchar(255) DEFAULT NULL COMMENT 'Depriciation tenure in months',
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `sort_order` int(11) 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 `heads`
--

INSERT INTO `heads` (`id`, `name`, `head_group_id`, `account_type_id`, `type`, `organisation_id`, `asset_or_liability_type`, `depriciation_type`, `depriciation_rate`, `depriciation_tenure`, `status`, `sort_order`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Contingency Fund', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 1, NULL, '2025-11-24 07:51:45', NULL),
(2, 'Swamiji Birthday', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 4, NULL, '2025-11-24 07:51:45', NULL),
(3, 'Blood Donation', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 3, NULL, '2025-11-24 07:51:45', NULL),
(4, 'Relief Fund', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 2, NULL, '2025-11-24 07:51:45', NULL),
(5, 'Education Fund', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 5, NULL, '2025-11-24 07:51:45', NULL),
(6, 'Cloth Distribution', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 6, NULL, '2025-11-24 07:51:45', NULL),
(7, 'Pranami', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 7, NULL, '2025-11-24 07:51:45', NULL),
(8, 'Sadu Seba', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 8, NULL, '2025-11-24 07:51:45', NULL),
(9, 'Ramakrishna Birthday', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 9, NULL, '2025-11-24 07:51:45', NULL),
(10, 'Birthday Maa', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 10, NULL, '2025-11-24 07:51:45', NULL),
(11, 'Jagadhatri Puja', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 11, NULL, NULL, NULL),
(12, 'Foundation Day', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 12, NULL, NULL, NULL),
(13, 'Yearly Subscription', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 13, NULL, NULL, NULL),
(14, 'Sale of Products', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 14, NULL, NULL, NULL),
(15, 'Subscription', 7, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 15, NULL, NULL, NULL),
(16, 'Loan Received', 8, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 16, NULL, NULL, NULL),
(17, 'Provision for Tax', 8, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 17, NULL, NULL, NULL),
(18, 'Donation', 9, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 18, NULL, '2025-11-24 02:43:28', NULL),
(19, 'Transfer from School', 5, 1, 'recipt', 1, NULL, NULL, NULL, NULL, 'active', 19, NULL, NULL, NULL),
(20, 'Puja expense', 5, 1, 'expenditure', 1, NULL, NULL, NULL, NULL, 'active', 20, NULL, '2025-11-24 02:43:08', NULL),
(21, 'Travelling Allowance', 2, 2, 'expenditure', 1, NULL, NULL, NULL, NULL, 'active', 21, NULL, NULL, NULL);

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

--
-- Table structure for table `head_groups`
--

CREATE TABLE `head_groups` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `organisation_id` int(11) 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `head_groups`
--

INSERT INTO `head_groups` (`id`, `name`, `organisation_id`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Payments', 1, 'active', '2025-10-22 08:42:19', '2025-10-22 08:42:19', NULL),
(2, 'General Expenses', 1, 'active', NULL, NULL, NULL),
(3, 'Assets', 1, 'active', NULL, NULL, NULL),
(4, 'Payment Transfer', 1, 'active', NULL, NULL, NULL),
(5, 'Income Transfer', 1, 'active', NULL, NULL, NULL),
(6, 'Payment Transfer', 1, 'active', NULL, NULL, NULL),
(7, 'General Income', 1, 'active', NULL, NULL, NULL),
(8, 'Libilities', 1, 'active', NULL, NULL, NULL),
(9, 'Receipts', 1, 'active', NULL, NULL, NULL);

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

--
-- Table structure for table `incomes`
--

CREATE TABLE `incomes` (
  `income_id` int(10) UNSIGNED NOT NULL,
  `money_receipt_no` varchar(255) DEFAULT NULL,
  `income_type` enum('asset','liability','income','member_subscription') DEFAULT NULL,
  `asset_id` int(11) DEFAULT NULL,
  `liability_id` int(11) DEFAULT NULL,
  `paid_by` enum('donor','') DEFAULT NULL,
  `donor_id` int(11) DEFAULT NULL,
  `file_path` longtext DEFAULT NULL,
  `purpose_id` int(11) DEFAULT NULL,
  `payment_type_id` int(11) DEFAULT NULL,
  `organisation_id` int(11) DEFAULT NULL,
  `financial_year_id` int(11) DEFAULT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `income_head` int(11) DEFAULT NULL,
  `income_head_group_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `transaction_reference` varchar(255) DEFAULT NULL,
  `transaction_amount` decimal(15,2) NOT NULL,
  `transaction_date` date NOT NULL,
  `transaction_narration` 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;

--
-- Dumping data for table `incomes`
--

INSERT INTO `incomes` (`income_id`, `money_receipt_no`, `income_type`, `asset_id`, `liability_id`, `paid_by`, `donor_id`, `file_path`, `purpose_id`, `payment_type_id`, `organisation_id`, `financial_year_id`, `account_type_id`, `income_head`, `income_head_group_id`, `user_id`, `transaction_reference`, `transaction_amount`, `transaction_date`, `transaction_narration`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, NULL, 'member_subscription', NULL, NULL, 'donor', 1, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 200.00, '2025-11-13', NULL, '2025-11-13 05:57:06', '2025-11-13 05:57:06', NULL),
(2, NULL, 'member_subscription', NULL, NULL, 'donor', 1, NULL, NULL, 1, 1, 3, NULL, 7, NULL, 1, NULL, 300.00, '2025-11-13', NULL, '2025-11-13 06:34:21', '2025-11-13 06:34:21', NULL),
(3, '354654564', 'member_subscription', NULL, NULL, 'donor', 2, NULL, NULL, 3, 1, 3, NULL, 7, NULL, 1, NULL, 100.00, '2025-11-13', NULL, '2025-11-13 06:39:06', '2025-11-13 06:39:06', NULL),
(4, NULL, 'member_subscription', NULL, NULL, 'donor', 2, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 150.00, '2025-11-13', NULL, '2025-11-13 06:39:23', '2025-11-13 06:39:23', NULL),
(5, NULL, 'member_subscription', NULL, NULL, 'donor', 2, NULL, NULL, 1, 1, 3, NULL, 7, NULL, 1, NULL, 300.00, '2025-11-13', NULL, '2025-11-13 07:06:05', '2025-11-13 07:06:05', NULL),
(6, NULL, 'member_subscription', NULL, NULL, 'donor', 3, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 400.00, '2025-11-13', NULL, '2025-11-13 08:47:35', '2025-11-13 08:47:35', NULL),
(7, '564654654654', 'member_subscription', NULL, NULL, 'donor', 5, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 100.00, '2025-11-14', NULL, '2025-11-14 06:09:37', '2025-11-14 06:09:37', NULL),
(8, NULL, 'member_subscription', NULL, NULL, 'donor', 5, NULL, NULL, 3, 1, 3, NULL, 7, NULL, 1, NULL, 300.00, '2025-11-14', NULL, '2025-11-14 06:09:59', '2025-11-14 06:09:59', NULL),
(9, NULL, 'member_subscription', NULL, NULL, 'donor', 5, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 100.00, '2025-11-14', NULL, '2025-11-14 06:10:09', '2025-11-14 06:10:09', NULL),
(10, NULL, 'income', NULL, NULL, 'donor', 1, NULL, NULL, 2, 1, 3, NULL, 1, NULL, 1, NULL, 250.00, '2025-11-14', NULL, '2025-11-14 06:10:25', '2025-11-14 06:10:25', NULL),
(11, NULL, 'member_subscription', NULL, NULL, 'donor', 3, NULL, NULL, 3, 1, 3, NULL, 7, NULL, 1, NULL, 1.00, '2025-11-14', NULL, '2025-11-14 06:21:24', '2025-11-14 06:21:24', NULL),
(12, NULL, 'member_subscription', NULL, NULL, 'donor', 3, NULL, NULL, 3, 1, 3, NULL, 7, NULL, 1, NULL, 9.00, '2025-11-14', NULL, '2025-11-14 06:21:34', '2025-11-14 06:21:34', NULL),
(13, NULL, 'member_subscription', NULL, NULL, 'donor', 3, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 90.00, '2025-11-14', NULL, '2025-11-14 06:32:11', '2025-11-14 06:32:11', NULL),
(14, 'DS001255', 'member_subscription', NULL, NULL, 'donor', 6, NULL, NULL, 1, 1, 3, NULL, 7, NULL, 1, NULL, 350.00, '2025-11-14', NULL, '2025-11-14 06:36:39', '2025-11-14 06:36:39', NULL),
(15, NULL, 'member_subscription', NULL, NULL, 'donor', 6, NULL, NULL, 1, 1, 3, NULL, 7, NULL, 1, NULL, 150.00, '2025-11-14', NULL, '2025-11-14 06:37:06', '2025-11-14 06:37:06', NULL),
(16, '122001', 'member_subscription', NULL, NULL, 'donor', 8, NULL, NULL, 2, 1, 3, NULL, 7, NULL, 1, NULL, 150.00, '2025-11-14', NULL, '2025-11-14 06:37:28', '2025-11-14 06:37:28', NULL),
(17, '54', 'member_subscription', NULL, NULL, 'donor', 8, NULL, NULL, 1, 1, 3, NULL, 7, NULL, 1, NULL, 350.00, '2025-11-19', NULL, '2025-11-19 06:04:36', '2025-11-19 06:04:36', NULL),
(18, '66546jkkk', 'income', NULL, NULL, 'donor', 1, NULL, NULL, 2, 1, 3, NULL, 2, NULL, 1, NULL, 500.00, '2025-11-13', NULL, '2025-11-19 06:04:57', '2025-11-19 06:04:57', NULL);

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

--
-- Table structure for table `income_heads`
--

CREATE TABLE `income_heads` (
  `income_head_id` int(11) NOT NULL,
  `organisation_id` int(11) DEFAULT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `income_head_group_id` int(11) DEFAULT NULL,
  `income_head_name` varchar(255) NOT NULL,
  `head_type` varchar(255) DEFAULT NULL,
  `liability_opening_balance` varchar(255) DEFAULT NULL,
  `income_ac_type_flg` enum('general_income_heads','member_suscription_heads') NOT NULL DEFAULT 'general_income_heads',
  `income_head_group_opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `income_heads`
--

INSERT INTO `income_heads` (`income_head_id`, `organisation_id`, `account_type_id`, `income_head_group_id`, `income_head_name`, `head_type`, `liability_opening_balance`, `income_ac_type_flg`, `income_head_group_opening_balance`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 2, 'Transfer from School', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:02:43', '2025-10-13 06:02:43'),
(2, 1, NULL, 4, 'Donation', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:03:16', '2025-10-13 06:03:16'),
(3, 1, NULL, 3, 'Loan Received', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:03:55', '2025-10-13 06:03:55'),
(4, 1, NULL, 3, 'Provision for Tax', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:04:11', '2025-10-13 06:04:11'),
(5, 1, NULL, 5, 'Subscription', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:10:47', '2025-10-13 06:10:47'),
(6, 1, NULL, 5, 'Sale of Products', 'recipt', NULL, 'general_income_heads', 0.00, 'active', '2025-10-13 06:11:02', '2025-10-13 06:11:02'),
(7, NULL, NULL, 5, 'Yearly Subscription', NULL, NULL, 'member_suscription_heads', 0.00, 'active', NULL, NULL),
(8, NULL, NULL, 5, 'Foundation Day', NULL, NULL, 'member_suscription_heads', 0.00, 'active', NULL, NULL),
(9, NULL, NULL, 5, 'Jagadhatri Puja', NULL, NULL, 'member_suscription_heads', 0.00, 'active', NULL, NULL);

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

--
-- Table structure for table `income_head_groups`
--

CREATE TABLE `income_head_groups` (
  `income_head_group_ID` bigint(20) UNSIGNED NOT NULL,
  `income_head_group_Name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `income_head_groups`
--

INSERT INTO `income_head_groups` (`income_head_group_ID`, `income_head_group_Name`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Assets', 'inactive', '2025-09-13 04:53:49', '2025-09-13 04:53:49'),
(2, 'IncomeTransfer', 'active', '2025-09-13 04:53:49', '2025-09-13 04:53:49'),
(3, 'Libilities', 'active', '2025-09-13 04:53:49', '2025-09-13 04:53:49'),
(4, 'Receipts', 'active', '2025-09-13 04:53:49', '2025-09-13 04:53:49'),
(5, 'General Income', 'active', '2025-09-13 04:53:49', '2025-09-13 04:53:49'),
(6, 'Medical Help Center', 'inactive', '2025-09-13 04:53:49', '2025-09-13 04:53:49');

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `liabilities`
--

CREATE TABLE `liabilities` (
  `liability_id` int(10) UNSIGNED NOT NULL,
  `organisation_id` int(11) NOT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `financial_year_id` int(11) DEFAULT NULL,
  `head_id` bigint(20) UNSIGNED DEFAULT NULL,
  `group_head_id` bigint(20) UNSIGNED DEFAULT NULL,
  `liability_date` date DEFAULT NULL,
  `liability_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `liability_status` enum('active','closed','inactive') NOT NULL DEFAULT 'active',
  `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 `liabilities`
--

INSERT INTO `liabilities` (`liability_id`, `organisation_id`, `account_type_id`, `financial_year_id`, `head_id`, `group_head_id`, `liability_date`, `liability_amount`, `liability_status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 2, NULL, 3, NULL, NULL, NULL, 0.00, 'active', '2025-09-18 13:23:35', '2025-09-18 13:23:35', NULL),
(2, 1, 2, 3, NULL, NULL, '2025-10-15', 152000.00, 'active', '2025-10-15 07:45:11', '2025-10-15 07:45:11', NULL);

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

--
-- Table structure for table `menus`
--

CREATE TABLE `menus` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `parent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `route` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `menus`
--

INSERT INTO `menus` (`id`, `name`, `parent_id`, `route`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Accounting Years\r\n', 0, 'accounting_years.index', 'active', NULL, NULL),
(2, 'Account Brought Forward\r\n', 0, 'capital.index', 'active', NULL, NULL),
(3, 'Users', 0, 'users.index', 'active', NULL, NULL),
(5, 'Transactions', 0, '', 'active', NULL, NULL),
(6, 'Income', 5, 'transactions.income', 'active', NULL, NULL),
(7, 'Expense ', 5, 'transactions.expense', 'active', NULL, NULL),
(45, 'Ledgers', 0, NULL, 'active', NULL, NULL),
(46, 'Income Ledger', 45, 'ledger.incomes', 'active', NULL, NULL),
(47, 'Expense Ledger', 45, 'ledger.expenses', 'active', NULL, NULL),
(48, 'Vendors Ledger', 45, 'ledger.vendors', 'active', NULL, NULL),
(49, 'Donors Ledger', 45, 'ledger.donors', 'active', NULL, NULL),
(50, 'Income Head', 0, 'incomehead.index', 'active', NULL, NULL),
(51, 'Expense Head', 0, 'expensehead.index', 'active', NULL, NULL),
(52, 'Assets', 0, 'asset.index', 'active', NULL, NULL),
(53, 'Liabilities', 0, 'liability.index', 'active', NULL, NULL),
(54, 'Members', 0, 'donor.index', 'active', NULL, NULL);

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

--
-- 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
(15, '0001_01_01_000000_create_users_table', 1),
(16, '0001_01_01_000001_create_cache_table', 1),
(17, '0001_01_01_000002_create_jobs_table', 1),
(18, '2025_08_18_084451_create_accounting_years_table', 1),
(19, '2025_08_19_053027_add_is_current_and_status_to_accounting_years_table', 1),
(20, '2025_08_19_111344_create_menus_table', 1),
(21, '2025_08_19_111918_create_roles_table', 1),
(22, '2025_08_19_113922_create_permission_codes_table', 1),
(23, '2025_08_19_122444_user_menu_permissions', 1),
(24, '2025_08_19_132509_update_users_table_add_username_status_roleid', 1),
(25, '2025_08_21_080308_create_organisations_table', 1),
(26, '2025_08_21_082134_create_tbl_account_types_table', 1),
(27, '2025_08_21_083634_create_income_head_groups_table', 1),
(28, '2025_08_21_084503_create_income_heads_table', 1),
(29, '2025_08_21_095429_create_expense_heads_table', 1),
(30, '2025_08_21_110000_expense_head_groups_table', 1),
(31, '2025_08_22_054821_transactions', 1),
(32, '2025_08_25_140344_create_incomes_table', 2),
(33, '2025_08_25_140358_create_expenses_table', 2),
(34, '2025_08_26_053105_rename_and_update_income_heads_table', 2),
(35, '2025_08_26_054605_update_organisations_table_columns', 2),
(36, '2025_08_26_070931_add_is_current_to_accounting_years_table', 3),
(37, '2025_08_26_105041_rename_columns_in_expense_heads_table', 3),
(38, '2025_08_26_110144_rename_expense_table_to_expenses', 3),
(39, '2025_08_26_134739_rename_columns_in_tbl_account_types', 4),
(40, '2025_08_27_104015_create_account_brought_forwards_table', 5),
(41, '2025_08_28_053828_remove_total_capital_from_account_brought_forwards_table', 6),
(42, '2025_08_28_054539_create_purposes_table', 6),
(43, '2025_08_28_070924_add_purpose_and_payment_type_to_incomes_and_expenses', 6),
(45, '2025_08_28_072859_create_payment_types_table', 7),
(46, '2025_08_29_112138_rename_tbl_account_types_to_account_types', 8),
(47, '2025_09_02_062823_add_purpose_for_field_in_purposes_table', 9),
(48, '2025_09_02_082513_assets_table', 10),
(49, '2025_09_03_120524_add_asset_type_and_depreciation_in_assets_table', 10),
(50, '2025_09_03_122058_create_liabilities_table', 10),
(51, '2025_08_25_102537_create_vendors_table', 11),
(52, '2025_09_03_124203_add_vendor_type_to_vendor_table', 11),
(53, '2025_09_03_130612_create_donors_table', 11),
(54, '2025_09_04_095031_add_fields_to_expenses_table', 11),
(55, '2025_09_04_095638_create_asset_records_table', 11),
(56, '2025_09_04_100041_create_liability_records_table', 11),
(57, '2025_09_04_100143_create_vendor_records_table', 11),
(58, '2025_09_05_055545_create_donor_records_table', 11),
(59, '2025_09_05_061937_add_fields_to_incomes_table', 11),
(60, '2025_09_05_081438_add_donor_id_to_asset_and_liability_records_table', 11),
(61, '2025_09_05_095306_add_fields_in_expenses_table', 11),
(62, '2025_09_05_132454_update_pay_to_to_paid_by_in_incomes_table', 11),
(63, '2025_09_05_133155_add_donor_type_to_donors_table', 11),
(64, '2025_09_08_080028_make_account_type_id_nullable_in_donors_table', 12),
(65, '2025_09_10_112652_alter_incomes_file_path_column', 13),
(66, '2025_09_12_103259_update_income_heads_fields', 14),
(67, '2025_09_15_062535_add_organisation_id_to_income_and_expense_heads', 15),
(68, '2025_09_17_082951_add_donor_folio_no_to_donors_table', 16),
(69, '2025_09_17_114506_add_flag_to_donors_table', 16),
(70, '2025_09_18_084617_add_income_head_group_to_incomes_table', 17),
(71, '2025_09_19_072353_add_is_current_field_to_organisations_table', 18),
(72, '2025_09_19_084648_add_organisation_id_and_financial_year_id_to_account_brought_forwards_table', 18),
(73, '2025_09_19_102008_add_organisation_id_and_financial_year_id_to_users_table', 18),
(74, '2025_09_22_073543_add_organisation_id_field_to_income_heads_table', 19),
(75, '2025_09_22_080422_add_organisation_id_field_to_expense_heads_table', 20),
(76, '2025_10_09_062337_add_column_name_to_expense_heads_table', 21),
(77, '2025_10_09_063238_remove_column_name_to_assets_table', 21),
(78, '2025_10_09_133712_remove_column_name_to_expense_table', 22),
(79, '2025_10_09_133821_add_column_name_to_expense_heads_table', 22),
(80, '2025_10_13_081706_add_column_name_to_income_heads_table', 23),
(81, '2025_10_14_061824_add_column_name_to_assets--table=assets', 24),
(82, '2025_10_14_062254_remove_column_name_to_assets--table=assets', 25),
(83, '2025_10_14_062409_remove_column_name_to_assets--table=assets', 26),
(84, '2025_10_14_062804_add_column_name_to_assets--table=assets', 27),
(85, '2025_10_14_082216_remove_column_name_to_expenses--table=expenses', 28),
(86, '2025_10_14_131840_add_column_name_to_income_heads--table=income_heads', 29),
(87, '2025_10_15_104533_add_column_name_to_expense_heads--table=expense_heads', 30),
(88, '2025_10_15_105354_remove_column_name_to_assets--table=assets', 31),
(89, '2025_10_15_122601_remove_column_name_to_liabilities--table=liabilities', 32),
(90, '2025_10_15_122954_add_column_name_to_income_heads--table=income_heads', 32),
(91, '2025_10_15_123910_add_column_name_to_libilities--table=libilities', 33),
(92, '2025_10_15_124112_remove_column_name_to_liabilities--table=liabilities', 33),
(93, '2025_10_17_073821_add_column_name_to_donors--table=donor', 34),
(94, '2025_10_17_112829_add_column_name_to_account_types--table=acount_types', 35),
(95, '2025_10_18_180500_create_head_groups_table', 36),
(96, '2025_10_18_181835_create_heads_table', 36),
(97, '2025_10_22_101056_drop_opening_balance_and_head_group_type', 37),
(98, '2025_10_24_125455_remove_column_name_to_opening_balance--table=heads', 38),
(99, '2025_10_27_133635_create_journal_transaction_table', 39),
(100, '2025_10_28_083658_remove_column_name_to_assets--table=assets', 40),
(101, '2025_10_28_084109_add_column_name_to_journal_transactions--table=journal_transactions', 40),
(102, '2025_10_28_111007_remove_column_name_to_assets--table=assets', 41),
(103, '2025_10_28_112719_remove_column_name_to_libilities--table=libilities', 41),
(104, '2025_10_28_120215_add_column_name_to_assets--table=assets', 42),
(105, '2025_10_30_130613_add_column_name_to_accounting_years--table=accounting_years', 43),
(106, '2025_11_12_103126_create_banks_table', 44);

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

--
-- Table structure for table `organisations`
--

CREATE TABLE `organisations` (
  `organisation_id` int(11) NOT NULL,
  `accounting_year_id` bigint(20) UNSIGNED DEFAULT NULL,
  `organisation_name` varchar(255) NOT NULL,
  `organisation_address` text DEFAULT NULL,
  `organisation_contact_number` varchar(255) DEFAULT NULL,
  `organisation_email` varchar(255) DEFAULT NULL,
  `organisation_gstin` varchar(50) DEFAULT NULL,
  `organisation_pan` varchar(20) DEFAULT NULL,
  `organisation_reg_no` varchar(50) DEFAULT NULL,
  `is_current` tinyint(1) NOT NULL DEFAULT 0,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `organisations`
--

INSERT INTO `organisations` (`organisation_id`, `accounting_year_id`, `organisation_name`, `organisation_address`, `organisation_contact_number`, `organisation_email`, `organisation_gstin`, `organisation_pan`, `organisation_reg_no`, `is_current`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Kaliyaganj Sri Ramkrishna Sevashram', 'Kaliyaganj , Uttar Dinajpur , West Bengal , Pin-733129', '8900330370 / 9647549188 / 8250147750', NULL, NULL, NULL, 'S0025003', 1, 'active', NULL, '2025-10-03 12:14:17'),
(2, 1, 'Sri Ramkrishna Bani Tirtha', 'Kaliyaganj , Uttar Dinajpur , West Bengal , Pin-733129', '7319596577', NULL, NULL, NULL, 'S/82078', 0, 'active', NULL, '2025-10-03 12:14:17');

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

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

CREATE TABLE `payment_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `payment_types`
--

INSERT INTO `payment_types` (`id`, `parent_id`, `name`, `status`, `created_at`, `updated_at`) VALUES
(1, 0, 'Cash', 'active', NULL, NULL),
(2, 0, 'UPI', 'active', NULL, NULL),
(3, 0, 'QR / Scanner\r\n', 'active', NULL, NULL),
(4, 0, 'NEFT', 'active', NULL, NULL),
(5, 0, 'RTGS', 'active', NULL, NULL),
(6, 0, 'Cheque', 'active', NULL, NULL);

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

--
-- Table structure for table `permission_codes`
--

CREATE TABLE `permission_codes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `description` 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 `permission_codes`
--

INSERT INTO `permission_codes` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(1, 'r', 'for read', NULL, NULL),
(2, 'r,w', 'for read and write', NULL, NULL),
(3, 'r,w,x', 'for read , write and execute', NULL, NULL);

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

--
-- Table structure for table `purposes`
--

CREATE TABLE `purposes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `purpose_for` enum('income','expense') NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `purposes`
--

INSERT INTO `purposes` (`id`, `name`, `purpose_for`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Monthly Subsription', 'income', 'active', '2025-09-13 19:22:48', '2025-09-13 19:22:48'),
(2, 'Donation for Anusthan', 'income', 'active', '2025-09-13 19:32:11', '2025-09-13 19:32:11'),
(3, 'Pranami', 'income', 'active', '2025-09-13 19:43:47', '2025-09-13 19:43:47'),
(4, 'Jagadhatri Pratima', 'expense', 'active', '2025-09-14 00:46:37', '2025-09-14 00:46:37'),
(5, 'Flowers', 'expense', 'active', '2025-09-14 00:46:52', '2025-09-14 00:46:52'),
(6, 'Swwets for puja', 'expense', 'active', '2025-09-14 00:47:02', '2025-09-14 00:47:02'),
(7, 'Dasakarma', 'expense', 'active', '2025-09-14 00:58:17', '2025-09-14 00:58:17');

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

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

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Super Admin', 'active', NULL, NULL),
(2, 'Manager', 'active', NULL, NULL),
(3, 'Staff', 'active', NULL, NULL);

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

--
-- 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
('8ALGF839JDIl3RJkzJ3qFZZxuKiyIUIuzKYKzkyC', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiSTFKS0RtUzF3YjZTVlRhZkhralhkMXdUVjAweWFsaGRCQmRRWHZ5TCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC90cmFuc2FjdGlvbnMvY29udHJhIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1764251412),
('jGVn0ezCfye1IbPVq7j1md1TMPycl2EFds9mzKom', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiNDZoeExWNjZpaEFGTTBkTlBLaWlxVXpLMkxwV3d3QjhzcnpaYTFVdCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC90cmFuc2FjdGlvbnMvY29udHJhIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1764333887);

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `transaction_id` bigint(20) UNSIGNED NOT NULL,
  `organisation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `account_type_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `transaction_reference` varchar(255) DEFAULT NULL,
  `transaction_type` enum('income','expense') DEFAULT NULL,
  `transaction_amount` decimal(15,2) DEFAULT NULL,
  `transaction_date` date DEFAULT NULL,
  `dr_cr` enum('Dr','Cr') DEFAULT NULL,
  `transaction_narration` 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 `user_menu_permissions`
--

CREATE TABLE `user_menu_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `menu_id` bigint(20) UNSIGNED NOT NULL,
  `permissions` 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;

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

--
-- Table structure for table `vendors`
--

CREATE TABLE `vendors` (
  `vendor_id` bigint(20) UNSIGNED NOT NULL,
  `vendor_name` varchar(255) NOT NULL,
  `vendor_type` enum('internal','external') NOT NULL DEFAULT 'external',
  `vendor_contact_person` varchar(255) DEFAULT NULL,
  `vendor_phone_number` varchar(20) DEFAULT NULL,
  `vendor_email` varchar(255) DEFAULT NULL,
  `vendor_address` text DEFAULT NULL,
  `vendor_gst_number` varchar(255) DEFAULT NULL,
  `vendor_pan_number` varchar(255) DEFAULT NULL,
  `vendor_payment_terms` varchar(255) DEFAULT NULL,
  `vendor_bank_account_number` varchar(255) DEFAULT NULL,
  `vendor_bank_ifsc` varchar(255) DEFAULT NULL,
  `vendor_preferred_payment_mode` enum('neft','rtgs','cheque','cash') DEFAULT NULL,
  `vendor_opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `vendor_current_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `vendor_status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `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 `vendors`
--

INSERT INTO `vendors` (`vendor_id`, `vendor_name`, `vendor_type`, `vendor_contact_person`, `vendor_phone_number`, `vendor_email`, `vendor_address`, `vendor_gst_number`, `vendor_pan_number`, `vendor_payment_terms`, `vendor_bank_account_number`, `vendor_bank_ifsc`, `vendor_preferred_payment_mode`, `vendor_opening_balance`, `vendor_current_balance`, `vendor_status`, `created_at`, `updated_at`) VALUES
(1, 'SG Furniture', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-16 11:51:39', '2025-09-16 11:51:39'),
(2, 'XYZ', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-16 13:40:11', '2025-09-16 13:40:11'),
(3, 'ABC', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-18 12:17:03', '2025-09-18 12:17:03'),
(4, 'PQR', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-18 13:20:48', '2025-09-18 13:20:48'),
(5, 'ABC', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-19 06:42:18', '2025-09-19 06:42:18'),
(6, 'ABC', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-23 13:03:58', '2025-09-23 13:03:58'),
(7, 'SmartBuild Constructions', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-09-24 05:34:01', '2025-09-24 05:34:01'),
(8, 'AstroBuild', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-10-03 06:00:33', '2025-10-03 06:00:33'),
(9, 'Sonali Saha', 'external', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-10-03 06:34:50', '2025-10-03 06:34:50'),
(10, 'Ram Samanta', 'external', NULL, '9874562135', NULL, 'ram nagar', NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-10-14 03:06:22', '2025-10-14 03:06:22'),
(11, 'nilima', 'internal', NULL, '4565656000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, 'active', '2025-10-14 06:26:34', '2025-10-14 06:26:34');

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

--
-- Indexes for table `accounting_years`
--
ALTER TABLE `accounting_years`
  ADD PRIMARY KEY (`accounting_year_id`);

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

--
-- Indexes for table `account_types`
--
ALTER TABLE `account_types`
  ADD PRIMARY KEY (`account_type_id`);

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

--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `banks_short_code_unique` (`short_code`),
  ADD UNIQUE KEY `banks_ifsc_code_unique` (`ifsc_code`);

--
-- Indexes for table `donors`
--
ALTER TABLE `donors`
  ADD PRIMARY KEY (`donor_id`);

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

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

--
-- Indexes for table `expense_heads`
--
ALTER TABLE `expense_heads`
  ADD PRIMARY KEY (`expense_head_id`);

--
-- Indexes for table `expense_head_groups`
--
ALTER TABLE `expense_head_groups`
  ADD PRIMARY KEY (`expense_head_group_ID`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

--
-- Indexes for table `incomes`
--
ALTER TABLE `incomes`
  ADD PRIMARY KEY (`income_id`);

--
-- Indexes for table `income_heads`
--
ALTER TABLE `income_heads`
  ADD PRIMARY KEY (`income_head_id`);

--
-- Indexes for table `income_head_groups`
--
ALTER TABLE `income_head_groups`
  ADD PRIMARY KEY (`income_head_group_ID`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

--
-- Indexes for table `liabilities`
--
ALTER TABLE `liabilities`
  ADD PRIMARY KEY (`liability_id`);

--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`id`),
  ADD KEY `menus_parent_id_index` (`parent_id`);

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

--
-- Indexes for table `organisations`
--
ALTER TABLE `organisations`
  ADD PRIMARY KEY (`organisation_id`);

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

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

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

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

--
-- 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 `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`transaction_id`);

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

--
-- Indexes for table `vendors`
--
ALTER TABLE `vendors`
  ADD PRIMARY KEY (`vendor_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- AUTO_INCREMENT for table `2025_2026_contra_journal_trans_mapping`
--
ALTER TABLE `2025_2026_contra_journal_trans_mapping`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `2025_2026_donor_mapping_transaction`
--
ALTER TABLE `2025_2026_donor_mapping_transaction`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

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

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

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

--
-- AUTO_INCREMENT for table `accounting_years`
--
ALTER TABLE `accounting_years`
  MODIFY `accounting_year_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

--
-- AUTO_INCREMENT for table `account_types`
--
ALTER TABLE `account_types`
  MODIFY `account_type_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `assets`
--
ALTER TABLE `assets`
  MODIFY `asset_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `donors`
--
ALTER TABLE `donors`
  MODIFY `donor_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

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

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `expense_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

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

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

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

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

--
-- AUTO_INCREMENT for table `incomes`
--
ALTER TABLE `incomes`
  MODIFY `income_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `income_heads`
--
ALTER TABLE `income_heads`
  MODIFY `income_head_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

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

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

--
-- AUTO_INCREMENT for table `liabilities`
--
ALTER TABLE `liabilities`
  MODIFY `liability_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `vendors`
--
ALTER TABLE `vendors`
  MODIFY `vendor_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
COMMIT;

