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

START TRANSACTION;



--
-- Database: `mini`
--

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

--
-- Table structure for table `api_requests`
--

CREATE TABLE `api_requests` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `request_count` int(11) NOT NULL DEFAULT 0,
  `last_request_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `api_requests`
--

INSERT INTO `api_requests` (`id`, `user_id`, `request_count`, `last_request_time`) VALUES
(29, 41, 2, '2024-07-15 10:00:26');

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

--
-- Stand-in structure for view `approval_details`
-- (See below for the actual view)
--
CREATE TABLE `approval_details` (
`ID` int(11)
,`rtable` int(11)
,`name` varchar(255)
,`record_id` int(11)
,`Status` enum('pending','approved','rejected')
,`replied_by` int(11)
,`replied_at` datetime
,`rejected_reason` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `assessment_read_details`
-- (See below for the actual view)
--
CREATE TABLE `assessment_read_details` (
`id` int(11)
,`type_name` varchar(255)
,`type_id` int(11)
,`assessment_color` text
,`value` decimal(10,2)
,`evaluation` text
,`recommendation` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `asset_details`
-- (See below for the actual view)
--
CREATE TABLE `asset_details` (
`Id` int(11)
,`location_name` varchar(255)
,`location_id` int(11)
,`client_name` varchar(255)
,`client_id` int(11)
,`asset_title` varchar(255)
,`Description` text
,`Serial_Number` varchar(255)
,`model_name` varchar(255)
,`Model_id` int(11)
,`model_color` text
,`manufacturer_name` varchar(255)
,`manufacturer_id` int(11)
,`manufacturer_color` text
,`Year` year(4)
,`asset_type` varchar(255)
,`asset_type_id` int(11)
,`assets_type_color` text
,`asset_barcode` varchar(255)
,`asset_status` varchar(255)
,`asset_status_id` int(11)
,`asset_status_color` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `camp_details`
-- (See below for the actual view)
--
CREATE TABLE `camp_details` (
`Id` int(11)
,`title` varchar(255)
,`city_name` varchar(255)
,`city_id` int(11)
,`location` varchar(255)
,`map` varchar(255)
,`camp_supervisor_name` varchar(100)
,`camp_supervisor` int(11)
,`camp_capacity` int(11)
,`camp_current_number_of_residents` int(11)
,`camp_code` varchar(255)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `client_details`
-- (See below for the actual view)
--
CREATE TABLE `client_details` (
`id` int(11)
,`name` varchar(255)
,`additional_name` varchar(255)
,`Client_Code` varchar(255)
,`client_type` varchar(255)
,`Client_Type_id` int(11)
,`Mobile` varchar(20)
,`Email` varchar(255)
,`city_name` varchar(255)
,`City_id` int(11)
,`Address_Line_1` varchar(255)
,`Address_Line_2` varchar(255)
,`client_status` varchar(255)
,`Client_Status_id` int(11)
,`client_type_color` text
,`client_status_color` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `contract_details`
-- (See below for the actual view)
--
CREATE TABLE `contract_details` (
`id` int(11)
,`contact_number` varchar(255)
,`client_name` varchar(255)
,`client_id` int(11)
,`start_date` date
,`end_date` date
,`contract_type` varchar(255)
,`contract_type_id` int(11)
,`color` text
,`contract_amount` decimal(10,2)
,`description` text
,`status` enum('Active','Inactive','Expired')
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `department_code_details`
-- (See below for the actual view)
--
CREATE TABLE `department_code_details` (
`Id` int(11)
,`title` varchar(255)
,`department_name` varchar(255)
,`dept_id` int(11)
,`code_number` varchar(10)
,`job_description` text
,`color` varchar(7)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `employee_attendance`
-- (See below for the actual view)
--
CREATE TABLE `employee_attendance` (
`Id` int(11)
,`employee_name` varchar(100)
,`emp_id` int(11)
,`Basic_Salary` decimal(10,2)
,`date` date
,`attended` tinyint(1)
,`is_public_holiday` tinyint(1)
,`overtime` int(11)
,`cost` decimal(10,2)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `enquiry_details`
-- (See below for the actual view)
--
CREATE TABLE `enquiry_details` (
`id` int(11)
,`enquiry_number` varchar(255)
,`client_name` varchar(255)
,`client_id` int(11)
,`requested_by` varchar(255)
,`reported_by_name` varchar(100)
,`priority_name` varchar(255)
,`priority_id` int(11)
,`enquiry_status_color` varchar(255)
,`request_date` date
,`expected_start_date` date
,`next_follow_up` date
,`contract_id` int(11)
,`priority_list_color` text
,`work_description` text
,`special_instructions` text
,`status_name` varchar(255)
,`status_id` int(11)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `enquiry_location_details`
-- (See below for the actual view)
--
CREATE TABLE `enquiry_location_details` (
`id` int(11)
,`enquiry_number` varchar(255)
,`enquery_id` int(11)
,`location_name` varchar(255)
,`locations_id` int(11)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `file_details`
-- (See below for the actual view)
--
CREATE TABLE `file_details` (
`id` int(11)
,`table_name` varchar(255)
,`table_id` int(11)
,`file_name` varchar(255)
,`record_id` int(11)
,`description` text
,`title` text
,`doc_type_name` varchar(255)
,`doc_type_id` int(11)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Table structure for table `isn_accommodation_types`
--

CREATE TABLE `isn_accommodation_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `color` varchar(30) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_accommodation_types`
--

INSERT INTO `isn_accommodation_types` (`id`, `name`, `color`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Camp', '0091ff', '', 10, '2024-06-06 17:16:30', '2024-06-22 18:22:21', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Personal', 'f00000', '', 10, '2024-06-06 17:16:45', '2024-06-22 18:22:06', 40, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_action`
--

CREATE TABLE `isn_action` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_action`
--

INSERT INTO `isn_action` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'create', NULL, NULL, '2024-05-21 19:09:01', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'get_all', NULL, NULL, '2024-05-21 19:30:48', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'delete', NULL, NULL, '2024-05-25 05:38:20', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'update', NULL, NULL, '2024-05-25 06:23:14', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'restore', NULL, NULL, '2024-05-25 17:02:37', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(6, 'search', NULL, NULL, '2024-05-25 17:02:53', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_allowances`
--

CREATE TABLE `isn_allowances` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_allowances`
--

INSERT INTO `isn_allowances` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Housing Allowance', NULL, 10, '2024-06-06 19:16:11', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Transportation Allowance', NULL, 10, '2024-06-06 19:16:26', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Communication Allowance', NULL, 10, '2024-06-06 19:16:47', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_approvals`
--

CREATE TABLE `isn_approvals` (
  `ID` int(11) NOT NULL,
  `rtable` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `Status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `Reply_by` int(11) DEFAULT NULL,
  `Reply_at` datetime DEFAULT NULL,
  `rejected_reason` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_approvals`
--

INSERT INTO `isn_approvals` (`ID`, `rtable`, `record_id`, `Status`, `Reply_by`, `Reply_at`, `rejected_reason`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 1, 1, 'rejected', 1, NULL, 'rejected', 39, '2024-06-16 18:51:28', '2024-06-16 18:54:25', 39, '2024-06-16 18:58:24', 39, '2024-06-16 18:58:52', 39, 0, NULL);

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

--
-- Table structure for table `isn_assessment_reading_type`
--

CREATE TABLE `isn_assessment_reading_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `unit_id` int(11) NOT NULL,
  `asset_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assessment_reading_type`
--

INSERT INTO `isn_assessment_reading_type` (`id`, `name`, `description`, `color`, `unit_id`, `asset_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, '', 'test', NULL, 1, 1, 39, '2024-06-19 09:18:10', '2024-06-19 09:19:42', 39, '2024-06-19 09:30:22', 39, '2024-06-19 09:30:51', 39, 0, NULL);

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

--
-- Table structure for table `isn_assessment_reads`
--

CREATE TABLE `isn_assessment_reads` (
  `id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `value` decimal(10,2) NOT NULL,
  `evaluation` text NOT NULL,
  `recommendation` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assessment_reads`
--

INSERT INTO `isn_assessment_reads` (`id`, `type_id`, `value`, `evaluation`, `recommendation`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 1, '3.50', 'good input 2', 'no', 39, '2024-06-21 18:24:55', '2024-06-21 18:27:03', 39, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_assets`
--

CREATE TABLE `isn_assets` (
  `Id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `Title` varchar(255) NOT NULL,
  `Description` text DEFAULT NULL,
  `Serial_Number` varchar(255) DEFAULT NULL,
  `Model_id` int(11) NOT NULL,
  `manufacturer_id` int(11) NOT NULL,
  `Year` year(4) DEFAULT NULL,
  `asset_type_id` int(11) NOT NULL,
  `asset_barcode` varchar(255) DEFAULT NULL,
  `asset_status_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assets`
--

INSERT INTO `isn_assets` (`Id`, `location_id`, `client_id`, `Title`, `Description`, `Serial_Number`, `Model_id`, `manufacturer_id`, `Year`, `asset_type_id`, `asset_barcode`, `asset_status_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 1, 1, 'My Asset 2024', 'test', NULL, 2, 1, NULL, 1, NULL, 1, 39, '2024-06-16 07:41:11', '2024-06-16 07:43:05', 39, '2024-06-16 07:57:06', 39, '2024-06-16 07:57:26', 39, 0, NULL);

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

--
-- Table structure for table `isn_assets_model`
--

CREATE TABLE `isn_assets_model` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assets_model`
--

INSERT INTO `isn_assets_model` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'CoolBreeze 3000', NULL, NULL, 39, '2024-06-15 18:45:11', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'AquaChill 450', NULL, NULL, 39, '2024-06-15 18:46:15', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'EcoCool Pro', NULL, NULL, 39, '2024-06-15 18:46:26', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_assets_status`
--

CREATE TABLE `isn_assets_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assets_status`
--

INSERT INTO `isn_assets_status` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Active', '', '2b00ff', 39, '2024-06-15 18:50:15', '2024-06-22 18:32:45', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Good condition', '', '00ff1e', 39, '2024-06-15 18:50:27', '2024-06-22 18:32:32', 40, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Warning', '', 'ffd500', 39, '2024-06-15 18:50:38', '2024-06-22 18:32:16', 40, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Issue', '', 'ff513d', 39, '2024-06-15 18:50:51', '2024-06-22 18:32:02', 40, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'Not Working', '', 'ff0000', 39, '2024-06-15 18:50:58', '2024-06-22 18:31:29', 40, NULL, NULL, NULL, NULL, 0, NULL),
(6, 'Removed', '', '595959', 40, '2024-06-22 18:33:09', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_assets_type`
--

CREATE TABLE `isn_assets_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_assets_type`
--

INSERT INTO `isn_assets_type` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Tools', '', '0091ff', 39, '2024-06-15 18:48:30', '2024-06-22 18:28:41', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'HVAC', '', '00ff88', 39, '2024-06-15 18:48:42', '2024-06-22 18:28:53', 40, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'AC', '', 'ff0000', 39, '2024-06-15 18:48:50', '2024-06-22 18:28:01', 40, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_attendance`
--

CREATE TABLE `isn_attendance` (
  `Id` int(11) NOT NULL,
  `emp_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `attended` tinyint(1) DEFAULT NULL,
  `is_holiday` tinyint(1) NOT NULL DEFAULT 0,
  `overtime` int(11) DEFAULT NULL,
  `cost` decimal(10,2) NOT NULL DEFAULT 0.00,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_attendance`
--

INSERT INTO `isn_attendance` (`Id`, `emp_id`, `date`, `attended`, `is_holiday`, `overtime`, `cost`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(3, 41, '2024-06-11', 1, 0, 4, '10000.00', 39, '2024-06-11 16:52:44', '2024-06-11 19:06:54', 39, '2024-06-11 17:14:56', 39, '2024-06-11 17:15:21', 39, 0, ' salary_per_day= 2000'),
(4, 42, '2024-06-09', 1, 0, 3, '6250.00', 39, '2024-06-11 16:58:53', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Worked on project XSun 1666.6666666667 6250'),
(5, 42, '2024-06-09', 1, 1, 3, '6250.00', 39, '2024-06-11 17:08:58', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Worked on project X salary_per_day= 1666.6666666667'),
(6, 42, '2024-06-11', 1, 0, 3, '5208.33', 39, '2024-06-11 17:09:32', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Worked on project X salary_per_day= 1666.6666666667'),
(7, 42, '2024-06-11', 0, 0, 3, '5208.33', 39, '2024-06-11 17:10:26', NULL, NULL, NULL, NULL, NULL, NULL, 0, ' salary_per_day= 1666.6666666667'),
(8, 42, '2024-06-11', 1, 0, 3, '5208.33', 39, '2024-06-11 17:33:43', NULL, NULL, NULL, NULL, NULL, NULL, 0, ' salary_per_day= 1666.6666666667');

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

--
-- Table structure for table `isn_budget_status`
--

CREATE TABLE `isn_budget_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_budget_types`
--

CREATE TABLE `isn_budget_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_camps`
--

CREATE TABLE `isn_camps` (
  `Id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `city_id` int(11) NOT NULL,
  `location` varchar(255) DEFAULT NULL,
  `map` varchar(255) DEFAULT NULL,
  `camp_supervisor` int(11) DEFAULT NULL,
  `camp_capacity` int(11) DEFAULT NULL,
  `camp_current_number_of_residents` int(11) DEFAULT 0,
  `camp_code` varchar(255) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_camps`
--

INSERT INTO `isn_camps` (`Id`, `title`, `city_id`, `location`, `map`, `camp_supervisor`, `camp_capacity`, `camp_current_number_of_residents`, `camp_code`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Camp Alpha 2', 1, 'North Sector', 'http://maps.example.com/camp-alpha', 40, 200, 2, '', 10, '2024-06-09 17:49:22', '2024-06-09 17:50:20', 10, '2024-06-09 17:50:54', 10, '2024-06-09 17:51:16', 10, 0, 'Nothing'),
(2, 'Camp 2', 1, 'North city', 'http://maps.example.com/camp-alpha', 40, 200, 3, 'cam_2', 10, '2024-06-09 17:53:28', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_category_list`
--

CREATE TABLE `isn_category_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_city`
--

CREATE TABLE `isn_city` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_city`
--

INSERT INTO `isn_city` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Dubai', NULL, NULL, '2024-05-21 18:46:15', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'al-aein', '', 10, '2024-06-01 07:25:52', '2024-07-07 14:59:45', 41, '2024-06-01 07:46:36', 10, '2024-06-01 07:55:40', 10, 0, NULL),
(3, 'Abu Dhabi', '', 40, '2024-06-22 18:21:10', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_clients`
--

CREATE TABLE `isn_clients` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `name_Addon` varchar(255) DEFAULT NULL,
  `Client_Code` varchar(255) NOT NULL,
  `Client_Type_id` int(11) NOT NULL,
  `Mobile` varchar(20) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  `City_id` int(11) NOT NULL,
  `Address_Line_1` varchar(255) DEFAULT NULL,
  `Address_Line_2` varchar(255) DEFAULT NULL,
  `Client_Status_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_clients`
--

INSERT INTO `isn_clients` (`id`, `name`, `name_Addon`, `Client_Code`, `Client_Type_id`, `Mobile`, `Email`, `City_id`, `Address_Line_1`, `Address_Line_2`, `Client_Status_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Ali', NULL, 'cli_1', 1, NULL, 'dan@gmail.com', 1, 'Address_Line_1_value', NULL, 1, 10, '2024-06-03 19:35:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'Mohammad', NULL, 'cli_2', 1, NULL, 'da1n@gmail.com', 1, 'Address_Line_1_value', NULL, 1, 10, '2024-06-03 19:40:32', '2024-06-03 19:42:04', 10, '2024-06-03 19:43:08', 10, '2024-06-03 19:43:32', 10, 0, NULL);

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

--
-- Table structure for table `isn_client_invoices_status`
--

CREATE TABLE `isn_client_invoices_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_client_status`
--

CREATE TABLE `isn_client_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_client_status`
--

INSERT INTO `isn_client_status` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'active', NULL, 'green', 10, '2024-06-03 18:56:43', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'inactive', NULL, 'red', 10, '2024-06-03 18:56:56', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_client_type`
--

CREATE TABLE `isn_client_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_client_type`
--

INSERT INTO `isn_client_type` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'company', '', 'ff0000', 10, '2024-06-03 18:54:41', '2024-06-22 18:26:18', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Tenant', '', '009dff', 40, '2024-06-22 18:26:11', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'B2C', '', '00ff33', 40, '2024-06-22 18:26:32', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Owner', '', 'ffdd00', 40, '2024-06-22 18:26:49', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_contracts`
--

CREATE TABLE `isn_contracts` (
  `id` int(11) NOT NULL,
  `contact_number` varchar(255) NOT NULL,
  `client_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `contract_type_id` int(11) NOT NULL,
  `contract_amount` decimal(10,2) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` enum('Active','Inactive','Expired') NOT NULL DEFAULT 'Active',
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_contracts`
--

INSERT INTO `isn_contracts` (`id`, `contact_number`, `client_id`, `start_date`, `end_date`, `contract_type_id`, `contract_amount`, `description`, `status`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'cnt_1', 5, '2024-06-01', '2025-06-01', 2, '15000.75', 'description', 'Inactive', 39, '2024-06-17 12:29:08', '2024-06-17 12:32:14', 39, '2024-06-17 12:32:36', 39, '2024-06-17 12:32:52', 39, 0, NULL),
(2, 'cnt_2', 5, '2024-06-01', '2025-06-01', 2, '15000.75', 'This contract', 'Active', 39, '2024-06-17 12:30:32', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_contract_types`
--

CREATE TABLE `isn_contract_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_contract_types`
--

INSERT INTO `isn_contract_types` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Hard Service', '', 'ff0000', 39, '2024-06-17 09:47:51', '2024-06-22 18:34:28', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'OutSource Service', '', 'c800ff', 39, '2024-06-17 09:48:53', '2024-06-22 18:35:02', 40, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Security Service', '', '00ff04', 39, '2024-06-17 09:49:07', '2024-06-22 18:35:27', 40, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Soft Service', '', 'fe9862', 39, '2024-06-17 09:49:21', '2024-06-22 18:35:47', 40, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'TFM Services', '', '00fffb', 39, '2024-06-17 09:49:30', '2024-06-22 18:36:06', 40, NULL, NULL, NULL, NULL, 0, NULL),
(6, 'Fit-Out', '', 'bf81fe', 39, '2024-06-17 09:49:42', '2024-06-22 18:36:25', 40, NULL, NULL, NULL, NULL, 0, NULL),
(7, 'B2C HS', '', 'fbff00', 40, '2024-06-22 18:36:46', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(8, 'B2C SS', '', '0055ff', 40, '2024-06-22 18:37:01', '2024-06-22 18:37:33', 40, NULL, NULL, NULL, NULL, 0, NULL),
(9, 'B2C AMC', '', '90c0fe', 40, '2024-06-22 18:37:22', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_department`
--

CREATE TABLE `isn_department` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_department`
--

INSERT INTO `isn_department` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'IT', NULL, NULL, NULL, '2024-05-21 18:46:33', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'finance', NULL, NULL, NULL, '2024-05-21 18:46:33', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_departments_codes`
--

CREATE TABLE `isn_departments_codes` (
  `Id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `dept_id` int(11) NOT NULL,
  `code_number` varchar(10) NOT NULL,
  `job_description` text DEFAULT NULL,
  `color` varchar(7) DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_departments_codes`
--

INSERT INTO `isn_departments_codes` (`Id`, `title`, `dept_id`, `code_number`, `job_description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Software Engineer 2024', 2, 'dc_1', 'Responsible for developing and maintaining software applications. 2024', '#FF0000', 10, '2024-06-06 18:57:24', '2024-06-06 19:04:02', 10, '2024-06-26 11:56:20', 40, NULL, NULL, 1, NULL),
(2, 'Data Analyst', 2, 'dc_2', 'Analyzes data to support business decisions.', '#17A2B8', 10, '2024-06-06 18:57:57', NULL, NULL, '2024-06-06 19:04:41', 10, '2024-06-06 19:05:31', 10, 0, NULL),
(3, 'UI/UX Designer', 1, 'dc_3', 'Designs user interfaces and user experiences.', '#FFC107', 10, '2024-06-06 19:01:39', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_doc_types`
--

CREATE TABLE `isn_doc_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_doc_types`
--

INSERT INTO `isn_doc_types` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'cv', NULL, 10, '2024-06-06 16:41:22', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'certificate', NULL, 10, '2024-06-06 16:41:34', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'avatar', NULL, 10, '2024-06-06 16:41:47', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_enquery_locations`
--

CREATE TABLE `isn_enquery_locations` (
  `id` int(11) NOT NULL,
  `enquery_id` int(11) NOT NULL,
  `locations_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_enquiry`
--

CREATE TABLE `isn_enquiry` (
  `id` int(11) NOT NULL,
  `enquiry_number` varchar(255) NOT NULL,
  `client_id` int(11) NOT NULL,
  `requested_by` varchar(255) NOT NULL,
  `reported_by` int(11) NOT NULL,
  `priority_id` int(11) NOT NULL,
  `request_date` date NOT NULL,
  `expected_start_date` date DEFAULT NULL,
  `next_follow_up` date DEFAULT NULL,
  `contract_id` int(11) NOT NULL,
  `work_description` text NOT NULL,
  `special_instructions` text DEFAULT NULL,
  `status_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_enquiry`
--

INSERT INTO `isn_enquiry` (`id`, `enquiry_number`, `client_id`, `requested_by`, `reported_by`, `priority_id`, `request_date`, `expected_start_date`, `next_follow_up`, `contract_id`, `work_description`, `special_instructions`, `status_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'enq_1', 1, '', 42, 1, '2024-06-17', '2024-06-20', '2024-06-22', 2, 'Detailed description of the work requested', NULL, 2, 39, '2024-06-17 16:49:16', '2024-06-17 16:50:11', 39, '2024-06-17 16:50:49', 39, '2024-06-17 16:51:14', 39, 0, NULL);

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

--
-- Table structure for table `isn_enquiry_status`
--

CREATE TABLE `isn_enquiry_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_enquiry_status`
--

INSERT INTO `isn_enquiry_status` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Pending', NULL, NULL, 39, '2024-06-17 09:40:02', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Approved', NULL, NULL, 39, '2024-06-17 09:40:15', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Rejected', NULL, NULL, 39, '2024-06-17 09:40:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'In Progress', NULL, NULL, 39, '2024-06-17 09:40:49', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'Completed', NULL, NULL, 39, '2024-06-17 09:40:59', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(6, 'On Hold', NULL, NULL, 39, '2024-06-17 09:41:09', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(7, 'Cancelled', NULL, NULL, 39, '2024-06-17 09:41:18', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_details`
--

CREATE TABLE `isn_estimation_details` (
  `id` int(11) NOT NULL,
  `number` varchar(50) NOT NULL,
  `type_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `est_date` date NOT NULL,
  `valid_till` date DEFAULT NULL,
  `remarks_notes` text DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `additions` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL,
  `approval_status` tinyint(4) DEFAULT 0 COMMENT '''Pending'',''Approved'',''Rejected''',
  `rejected_reason` text DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_details`
--

INSERT INTO `isn_estimation_details` (`id`, `number`, `type_id`, `title`, `description`, `est_date`, `valid_till`, `remarks_notes`, `status`, `additions`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`, `approval_status`, `rejected_reason`, `approved_by`) VALUES
(3, 'EST-000001', 1, 'Manpower Estimation', 'Detailed estimation for manpower', '2024-07-01', '2024-12-31', 'Remark for manpower estimation', NULL, 'Additional information', 1, '2024-07-12 14:35:20', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Notes for manpower estimation', 0, NULL, NULL),
(4, 'EST-000002', 2, 'Material Estimation', 'Detailed estimation for materials', '2024-07-02', '2024-12-31', 'Remark for material estimation', NULL, 'Additional information', 1, '2024-07-12 14:35:20', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Notes for material estimation', 0, NULL, NULL),
(5, 'est_5', 3, 'Project Estimation for New Website', 'just test', '2024-08-01', '2024-12-31', NULL, NULL, NULL, 41, '2024-07-22 17:08:50', '2024-07-22 17:17:31', 41, '2024-07-22 17:18:07', 41, '2024-07-22 17:18:44', 41, 0, NULL, 0, NULL, NULL);

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

--
-- Table structure for table `isn_estimation_exclusions`
--

CREATE TABLE `isn_estimation_exclusions` (
  `id` int(11) NOT NULL,
  `estimation_id` int(11) NOT NULL,
  `exclusions_id` int(11) NOT NULL,
  `type_exclusion` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0- normal / 1- extra',
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_exclusions`
--

INSERT INTO `isn_estimation_exclusions` (`id`, `estimation_id`, `exclusions_id`, `type_exclusion`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 4, 1, 0, 41, '2024-07-22 17:50:01', '2024-07-22 17:57:25', 41, '2024-07-22 17:57:49', 41, '2024-07-22 17:58:01', 41, 0, NULL);

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

--
-- Table structure for table `isn_estimation_lines`
--

CREATE TABLE `isn_estimation_lines` (
  `id` int(11) NOT NULL,
  `estimation_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `remarks_notes` text DEFAULT NULL,
  `unit` int(11) DEFAULT NULL,
  `quantity` float DEFAULT 0,
  `unit_cost` decimal(10,2) DEFAULT NULL,
  `total_cost` decimal(10,2) DEFAULT NULL,
  `years` float DEFAULT 0,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_estimation_line_type`
--

CREATE TABLE `isn_estimation_line_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_line_type`
--

INSERT INTO `isn_estimation_line_type` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Man', NULL, NULL, NULL, '2024-07-23 10:01:48', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_line_unit`
--

CREATE TABLE `isn_estimation_line_unit` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_line_unit`
--

INSERT INTO `isn_estimation_line_unit` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Manpower', NULL, 41, '2024-07-12 15:37:23', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Material', NULL, 41, '2024-07-12 15:37:40', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_payment`
--

CREATE TABLE `isn_estimation_payment` (
  `id` int(11) NOT NULL,
  `estimation_id` int(11) NOT NULL,
  `payment_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_payment`
--

INSERT INTO `isn_estimation_payment` (`id`, `estimation_id`, `payment_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 5, 2, 41, '2024-07-22 18:58:07', '2024-07-22 18:58:54', 41, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_status`
--

CREATE TABLE `isn_estimation_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_status`
--

INSERT INTO `isn_estimation_status` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Pending', NULL, NULL, '2024-07-22 17:45:15', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_terms`
--

CREATE TABLE `isn_estimation_terms` (
  `id` int(11) NOT NULL,
  `estimation_id` int(11) NOT NULL,
  `term_id` int(11) NOT NULL,
  `type_terms` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0- normal / 1- extra',
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_terms`
--

INSERT INTO `isn_estimation_terms` (`id`, `estimation_id`, `term_id`, `type_terms`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(2, 5, 1, 1, 41, '2024-07-22 18:37:40', '2024-07-22 18:40:04', 41, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_estimation_type`
--

CREATE TABLE `isn_estimation_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_estimation_type`
--

INSERT INTO `isn_estimation_type` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Outsource Company Man Power', NULL, NULL, 1, '2024-07-12 14:34:40', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'This is for outsourcing company manpower.'),
(2, 'Material', NULL, NULL, 1, '2024-07-12 14:34:40', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'This is for materials required for the project.'),
(3, 'Transportation', NULL, NULL, 1, '2024-07-12 14:34:40', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'This is for transportation costs.'),
(4, 'Fees', NULL, NULL, 1, '2024-07-12 14:34:40', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'This is for various fees involved.');

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

--
-- Table structure for table `isn_exclusions_list`
--

CREATE TABLE `isn_exclusions_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_exclusions_list`
--

INSERT INTO `isn_exclusions_list` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Engine Overhaul', NULL, NULL, 41, '2024-07-22 17:32:57', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_expenses_category`
--

CREATE TABLE `isn_expenses_category` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_files`
--

CREATE TABLE `isn_files` (
  `id` int(11) NOT NULL,
  `table_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `title` text DEFAULT NULL,
  `doc_type_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_locations`
--

CREATE TABLE `isn_locations` (
  `id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `city_id` int(11) NOT NULL,
  `address_line_1` varchar(255) NOT NULL,
  `address_line_2` varchar(255) DEFAULT NULL,
  `maps_url` varchar(255) DEFAULT NULL,
  `location_status_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_locations`
--

INSERT INTO `isn_locations` (`id`, `client_id`, `title`, `description`, `city_id`, `address_line_1`, `address_line_2`, `maps_url`, `location_status_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 1, 'Main Office 2024', 'Main corporate 2024', 1, '123 Main St 2024', 'Suite 2024', 'https://maps.example.com/?q=123+Main+St+New+York', 1, 39, '2024-06-14 19:34:05', '2024-06-14 19:35:34', 39, '2024-06-14 19:36:25', 39, '2024-06-14 19:36:45', 39, 0, 'No additional notes.');

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

--
-- Table structure for table `isn_location_inventory_id`
--

CREATE TABLE `isn_location_inventory_id` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_location_status`
--

CREATE TABLE `isn_location_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_location_status`
--

INSERT INTO `isn_location_status` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Active', '', '11ff00', 39, '2024-06-14 19:13:15', '2024-06-22 18:27:28', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Inactive', '', 'ff0000', 39, '2024-06-14 19:13:24', '2024-06-22 18:27:16', 40, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_manufacturer`
--

CREATE TABLE `isn_manufacturer` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_manufacturer`
--

INSERT INTO `isn_manufacturer` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'LG Electronics', NULL, NULL, 39, '2024-06-15 18:36:35', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Samsung Electronics', NULL, NULL, 39, '2024-06-15 18:36:49', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Daikin Industries', NULL, NULL, 39, '2024-06-15 18:36:59', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Mitsubishi Electric', NULL, NULL, 39, '2024-06-15 18:37:14', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'Airwell', '', NULL, 40, '2024-06-22 18:33:34', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_payment_method`
--

CREATE TABLE `isn_payment_method` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_payment_term_list`
--

CREATE TABLE `isn_payment_term_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_payment_term_list`
--

INSERT INTO `isn_payment_term_list` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'cash', NULL, NULL, NULL, '2024-07-22 17:48:07', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Prepaid', NULL, NULL, NULL, '2024-07-22 17:49:29', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_permissions`
--

CREATE TABLE `isn_permissions` (
  `id` int(11) NOT NULL,
  `table_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `allow_create` tinyint(1) NOT NULL DEFAULT 0,
  `allow_read` tinyint(1) NOT NULL DEFAULT 0,
  `allow_update` tinyint(1) NOT NULL DEFAULT 0,
  `allow_delete` tinyint(1) NOT NULL DEFAULT 0,
  `allow_serach` tinyint(1) NOT NULL DEFAULT 0,
  `allow_upload` tinyint(1) NOT NULL DEFAULT 0,
  `allow_send_email` tinyint(1) NOT NULL DEFAULT 0,
  `allow_approval` tinyint(1) NOT NULL DEFAULT 0,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_permissions`
--

INSERT INTO `isn_permissions` (`id`, `table_id`, `role_id`, `allow_create`, `allow_read`, `allow_update`, `allow_delete`, `allow_serach`, `allow_upload`, `allow_send_email`, `allow_approval`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 40, '2024-06-25 19:17:02', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(7, 1, 8, 1, 1, 0, 0, 0, 0, 0, 0, NULL, '2024-06-22 19:39:31', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(15, 16, 9, 1, 1, 0, 0, 1, 0, 0, 0, NULL, '2024-06-22 19:39:31', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(16, 26, 8, 1, 0, 0, 0, 0, 0, 0, 1, NULL, '2024-06-22 19:39:31', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(17, 2, 1, 1, 0, 1, 0, 1, 0, 0, 1, 41, '2024-07-14 14:30:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_permission_roles`
--

CREATE TABLE `isn_permission_roles` (
  `id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_permission_roles`
--

INSERT INTO `isn_permission_roles` (`id`, `permission_id`, `role_id`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(7, 7, 8, NULL, '2024-06-22 19:42:08', '2024-06-22 19:42:08', NULL, NULL, NULL, NULL, NULL, 0, NULL),
(8, 8, 8, NULL, '2024-06-22 19:42:08', '2024-06-22 19:42:08', NULL, NULL, NULL, NULL, NULL, 0, NULL),
(9, 9, 8, NULL, '2024-06-22 19:42:21', '2024-06-22 19:42:21', NULL, NULL, NULL, NULL, NULL, 0, NULL),
(10, 10, 8, NULL, '2024-06-22 19:42:21', '2024-06-22 19:42:21', NULL, NULL, NULL, NULL, NULL, 0, NULL),
(11, 11, 8, NULL, '2024-06-22 19:42:35', '2024-06-22 19:42:35', NULL, NULL, NULL, NULL, NULL, 0, NULL),
(12, 12, 8, NULL, '2024-06-22 19:42:35', '2024-06-22 19:42:35', NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_positions`
--

CREATE TABLE `isn_positions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_positions`
--

INSERT INTO `isn_positions` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'HR Specialist', '', 10, '2024-06-06 19:09:22', '2024-06-22 18:24:03', 40, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Operations Manager', '', 10, '2024-06-06 19:09:36', '2024-06-22 18:23:43', 40, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Sales Manager', '', 10, '2024-06-06 19:09:47', '2024-06-22 18:22:56', 40, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Sales', '', 40, '2024-06-22 18:24:09', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_priority_list`
--

CREATE TABLE `isn_priority_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_priority_list`
--

INSERT INTO `isn_priority_list` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'High', NULL, NULL, 39, '2024-06-17 09:43:49', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Medium', NULL, NULL, 39, '2024-06-17 09:43:58', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Low', NULL, NULL, 39, '2024-06-17 09:44:17', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'Urgent', NULL, NULL, 39, '2024-06-17 09:45:08', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'Routine', NULL, NULL, 39, '2024-06-17 09:45:13', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_promotion`
--

CREATE TABLE `isn_promotion` (
  `Id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `pro_code` varchar(20) NOT NULL,
  `emp_id` int(11) NOT NULL,
  `description` text DEFAULT NULL,
  `value` decimal(10,2) DEFAULT NULL,
  `approval_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0=''pending''\r\n1=''approved''\r\n2=''rejected''',
  `approval_reason` text DEFAULT NULL,
  `rejected_reason` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_promotion`
--

INSERT INTO `isn_promotion` (`Id`, `title`, `pro_code`, `emp_id`, `description`, `value`, `approval_status`, `approval_reason`, `rejected_reason`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`, `approved_by`, `approved_at`) VALUES
(1, 'Senior Developer Promotion 2024', '', 42, NULL, '1800.00', 0, NULL, NULL, 10, '2024-06-06 19:36:14', '2024-06-09 17:23:24', 10, '2024-06-09 17:30:02', 10, '2024-06-09 17:31:36', 10, 0, NULL, NULL, NULL),
(2, 'Example Title', 'pro_1', 40, 'Example description', '100.00', 0, 'No reason', NULL, 41, '2024-07-14 05:07:28', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Example notes', NULL, NULL),
(3, 'Summer Sale', 'pro_3', 40, 'This promotion applies to all summer products', '150.00', 0, NULL, NULL, 41, '2024-07-14 05:10:00', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Annual summer sale promotion', NULL, NULL);

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

--
-- Table structure for table `isn_roles`
--

CREATE TABLE `isn_roles` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_roles`
--

INSERT INTO `isn_roles` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(4, 'super admin', NULL, NULL, '2024-06-23 08:43:37', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(8, 'HR Manager', NULL, NULL, '2024-06-22 19:35:21', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(9, 'user', NULL, NULL, '2024-06-22 19:35:21', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(10, 'IT Manager', NULL, NULL, '2024-06-22 19:35:21', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_rule_evaluation_id`
--

CREATE TABLE `isn_rule_evaluation_id` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_rule_unit_id`
--

CREATE TABLE `isn_rule_unit_id` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_rule_unit_id`
--

INSERT INTO `isn_rule_unit_id` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Volt', NULL, NULL, 39, '2024-06-19 08:42:45', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Am', NULL, NULL, 41, '2024-07-07 14:59:01', NULL, NULL, '2024-07-07 15:00:47', 41, '2024-07-07 15:02:15', 41, 0, NULL);

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

--
-- Table structure for table `isn_suppliers_list`
--

CREATE TABLE `isn_suppliers_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_suppliers_status`
--

CREATE TABLE `isn_suppliers_status` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `isn_table`
--

CREATE TABLE `isn_table` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_table`
--

INSERT INTO `isn_table` (`id`, `name`, `description`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'users', 'company user', NULL, '2024-05-21 19:02:39', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'api_requests', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'accommodation_types', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(4, 'action', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(5, 'allowances', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(6, 'approvals', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(7, 'assessment_reading_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(8, 'assessment_reads', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(9, 'assets', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(10, 'assets_model', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(11, 'assets_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(12, 'assets_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(13, 'attendance', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(14, 'budget_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(15, 'budget_types', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(16, 'camps', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(17, 'category_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(18, 'city', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(19, 'client_invoices_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(20, 'client_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(21, 'client_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(22, 'clients', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(23, 'contract_types', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(24, 'contracts', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(25, 'department', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(26, 'departments_codes', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(27, 'doc_types', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(28, 'enquery_locations', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(29, 'enquiry', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(30, 'enquiry_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(31, 'estimation_line_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(32, 'estimation_line_unit', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(33, 'estimation_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(34, 'estimation_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(35, 'estimation_types', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(36, 'exclusions_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(37, 'expenses_category', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(38, 'files', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(39, 'location_inventory_id', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(40, 'location_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(41, 'locations', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(42, 'manufacturer', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(43, 'payment_method', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(44, 'payment_term_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(45, 'permission_roles', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(46, 'permissions', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(47, 'positions', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(48, 'priority_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(49, 'promotion', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(50, 'roles', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(51, 'rule_evaluation_id', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(52, 'rule_unit_id', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(53, 'suppliers_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(54, 'suppliers_status', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(55, 'table', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(56, 'terms_list', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(57, 'vacation_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(58, 'vacations', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(59, 'work_type', NULL, NULL, '2024-06-22 08:59:30', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_terms_list`
--

CREATE TABLE `isn_terms_list` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_terms_list`
--

INSERT INTO `isn_terms_list` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Basic Service Check', NULL, NULL, 41, '2024-07-22 18:33:58', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Oil Change', NULL, NULL, 41, '2024-07-22 18:34:14', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_users`
--

CREATE TABLE `isn_users` (
  `id` int(11) NOT NULL,
  `full_name` varchar(100) DEFAULT NULL,
  `username` varchar(250) DEFAULT NULL,
  `password` varchar(500) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `dept_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `city_id` int(11) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `active` int(11) DEFAULT 1,
  `verified` int(11) DEFAULT 0,
  `verification_code` varchar(50) DEFAULT NULL,
  `is_deleted` int(11) NOT NULL DEFAULT 0,
  `inserted_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `restored_at` datetime DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `Mobile` varchar(20) DEFAULT NULL,
  `Evaluated_by` int(11) DEFAULT NULL,
  `Accommodation_type` int(11) DEFAULT NULL,
  `Camp_location_or_address` varchar(255) DEFAULT NULL,
  `Join_date` date DEFAULT NULL,
  `department_code` int(11) DEFAULT NULL,
  `Position` int(11) DEFAULT NULL,
  `Emp_code` varchar(255) DEFAULT NULL,
  `reporting_to` int(11) DEFAULT NULL,
  `Basic_Salary` decimal(10,2) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `IBAN` varchar(34) DEFAULT NULL,
  `Swift` varchar(11) DEFAULT NULL,
  `account_number` varchar(20) DEFAULT NULL,
  `account_name` varchar(255) DEFAULT NULL,
  `Camp_id` int(11) DEFAULT NULL,
  `Allowances_accommodation` varchar(255) DEFAULT NULL,
  `transportation` varchar(255) DEFAULT NULL,
  `telecom` varchar(255) DEFAULT NULL,
  `Allowances_empty_1` varchar(255) DEFAULT NULL,
  `Allowances_empty_2` varchar(255) DEFAULT NULL,
  `Allowances_empty_3` varchar(255) DEFAULT NULL,
  `end_of_contract` date DEFAULT NULL,
  `birthdate` date DEFAULT NULL,
  `nationality` varchar(50) NOT NULL,
  `gender` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_users`
--

INSERT INTO `isn_users` (`id`, `full_name`, `username`, `password`, `email`, `dept_id`, `role_id`, `city_id`, `address`, `last_login`, `active`, `verified`, `verification_code`, `is_deleted`, `inserted_at`, `updated_at`, `deleted_at`, `inserted_by`, `updated_by`, `deleted_by`, `token`, `restored_at`, `restored_by`, `notes`, `Mobile`, `Evaluated_by`, `Accommodation_type`, `Camp_location_or_address`, `Join_date`, `department_code`, `Position`, `Emp_code`, `reporting_to`, `Basic_Salary`, `bank_name`, `IBAN`, `Swift`, `account_number`, `account_name`, `Camp_id`, `Allowances_accommodation`, `transportation`, `telecom`, `Allowances_empty_1`, `Allowances_empty_2`, `Allowances_empty_3`, `end_of_contract`, `birthdate`, `nationality`, `gender`) VALUES
(1, 'Ahmed Ali', 'ahmed.ali', '$2y$10$nKcC5psOsx8z479SSPeca.3UJOwSME8KLrE6EoRJfhiiWffPE9zm2', 'ahmed.ali@example.com', 2, 9, 2, NULL, '2024-07-04 12:40:36', 1, NULL, NULL, 0, '2024-07-04 12:39:01', '2024-07-04 12:40:36', NULL, 42, 1, NULL, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjUsImlhdCI6MTcyMDA4MjQzNiwiZXhwIjoxNzIwMDg2MDM2fQ.ZKzy4f3qRy_pbPwd2jkjbxJd2vuZc5KaQ0N1-lxWJuU', NULL, NULL, 'No additional notes', '+1234567890', 40, 1, '123 Camp St, City', '2022-01-01', 1, 1, 'emp_43', 41, '8000.00', 'National Bank', 'SA4420000001234567891234', 'NBKSAXXX', '123456789', 'Ahmed Ali', 1, '1000', '300', '200', '50', '75', '100', '2025-01-01', '1990-01-01', 'Saudi', 0),
(40, 'Adham Baouz', 'Adhamboauz', '$2y$10$48Qk1Q9Gmv5etVRNlGvpgeOLiETUlw/xMJw29gP9HPaN2bEwiRmqO', 'adhambaouz@gmail.com', 1, 4, 2, 'Test Address', '2024-07-25 19:05:14', 1, NULL, NULL, 0, '2024-06-10 08:40:21', '2024-07-03 14:46:42', '2024-06-19 12:34:56', 10, 40, 39, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjUsImlhdCI6MTcyMTkxOTkxNCwiZXhwIjoxNzIxOTIzNTE0fQ.53LljT5dvuuu93t6zTmw5lcg6PW5gD7DB6dV7avfffI', NULL, NULL, NULL, '+971523738748', 40, 1, '1234 Camp St, City, Country', '2021-06-22', 1, 1, 'emp_40', 40, '5000.00', 'Emirates NBD', 'GB33BUKB20201555555555', 'NWBKGB2L', '12345678', 'Adham Baouz', 2, '1000', '200', '50', NULL, NULL, NULL, NULL, NULL, '', 0),
(41, 'Dani Wehbi', 'Daniwehbi', '$2y$10$48Qk1Q9Gmv5etVRNlGvpgeOLiETUlw/xMJw29gP9HPaN2bEwiRmqO', 'dansyr2015@gmail.com', 2, 4, 1, 'Test Address 2', '2024-07-29 14:24:23', 1, NULL, NULL, 0, '2024-06-10 08:40:21', '2024-07-22 20:08:24', '2024-06-19 12:34:56', 10, 41, 39, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjUsImlhdCI6MTcyMjI0ODY2MywiZXhwIjoxNzIyMjUyMjYzfQ.revrlZuNmW72h16Q4xM_tlzUB5FpNzQbKc-FQoWyjRs', NULL, NULL, NULL, '+963969939673', 40, 1, '1234 Camp St, City, Country', '2023-06-22', 1, 1, 'emp_41', 41, '3000.00', 'National Bank', 'GB33BUKB20201555555555', 'NWBKGB2L', '12345678', 'Dani Wehbi', 2, '1000', '200', '50', NULL, NULL, NULL, NULL, NULL, '', 0),
(42, 'Maha Abu Assi', 'Maha', '$2y$10$48Qk1Q9Gmv5etVRNlGvpgeOLiETUlw/xMJw29gP9HPaN2bEwiRmqO', 'eng.mahaab96@gmail.com', 2, 8, 3, 'Test Address 3', '2024-07-04 23:38:29', 1, NULL, NULL, 0, '2024-06-10 08:40:21', '2024-07-04 23:38:29', '2024-06-19 12:34:56', 10, 42, 39, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjUsImlhdCI6MTcyMDEyMTkwOSwiZXhwIjoxNzIwMTI1NTA5fQ.0CGYOhBsBqucDNka1PgPtmkIZ5pCW77GaTzdWQf3oYQ', NULL, NULL, NULL, '+96997944207', 40, 1, '1234 Camp St, City, Country', '2020-06-22', 1, 1, 'emp_42', 40, '5000.00', 'National Bank', 'GB33BUKB20201555555555', 'NWBKGB2L', '12345678', 'Maha', 2, '1000', '200', '50', NULL, NULL, NULL, NULL, NULL, '', 0),
(43, 'Ahmed Ali', 'ahmed.ali', '$2y$10$n2bpYez.GeZ/wDQ3LWY01ulx.i2cAO4qp60OPBKpYRa0U1obuZfKy', 'ahmed.22ali22@example.com', 2, 9, 2, NULL, NULL, 1, 0, NULL, 0, '2024-07-07 18:10:42', NULL, NULL, 41, NULL, NULL, NULL, NULL, NULL, 'No additional notes', '+1234567890', 40, 1, '123 Camp St, City', '2022-01-01', 1, 1, 'emp_43', 41, '5000.00', 'National Bank', 'SA4420000001234567891234', 'NBKSAXXX', '123456789', 'Ahmed Ali', 1, '1000', '300', '200', '50', '75', '100', '2025-01-01', '1990-01-01', 'Saudi', 0),
(44, 'Ahmed Ali', 'ahmed.ali', '$2y$10$AxhY2r.iYDy/q6qd.Rmai.cyRdrjjP4w/nLMbo8qgnJLgxZtymbG2', 'ahmed@example.com', 2, 9, 2, NULL, NULL, 1, 0, NULL, 1, '2024-07-14 17:45:44', NULL, NULL, 41, NULL, NULL, NULL, NULL, NULL, 'No additional notes', '+1234567890', 40, 1, '123 Camp St, City', '2022-01-01', 1, 1, 'emp_44', 41, '5000.00', 'National Bank', 'SA4420000001234567891234', 'NBKSAXXX', '123456789', 'Ahmed Ali', 2, '1000', '300', '200', '50', '75', '100', '2025-01-01', '1990-01-01', 'Saudi', 1);

--
-- Triggers `isn_users`
--
DELIMITER $$
CREATE TRIGGER `after_user_insert` AFTER INSERT ON `isn_users` FOR EACH ROW BEGIN
  IF NEW.is_deleted = 0 THEN
    UPDATE isn_camps
    SET camp_current_number_of_residents = (
      SELECT COUNT(*)
      FROM isn_users
      WHERE Camp_id = NEW.Camp_id AND is_deleted = 0
    )
    WHERE id = NEW.Camp_id;
  END IF;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `after_user_update` AFTER UPDATE ON `isn_users` FOR EACH ROW BEGIN
  IF OLD.Camp_id != NEW.Camp_id THEN
    IF OLD.is_deleted = 0 THEN
      UPDATE isn_camps
      SET camp_current_number_of_residents = (
        SELECT COUNT(*)
        FROM isn_users
        WHERE Camp_id = OLD.Camp_id AND is_deleted = 0
      )
      WHERE id = OLD.Camp_id;
    END IF;
    IF NEW.is_deleted = 0 THEN
      UPDATE isn_camps
      SET camp_current_number_of_residents = (
        SELECT COUNT(*)
        FROM isn_users
        WHERE Camp_id = NEW.Camp_id AND is_deleted = 0
      )
      WHERE id = NEW.Camp_id;
    END IF;
  ELSEIF OLD.is_deleted != NEW.is_deleted THEN
    UPDATE isn_camps
    SET camp_current_number_of_residents = (
      SELECT COUNT(*)
      FROM isn_users
      WHERE Camp_id = NEW.Camp_id AND is_deleted = 0
    )
    WHERE id = NEW.Camp_id;
  END IF;
END
$$
DELIMITER ;

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

--
-- Table structure for table `isn_vacations`
--

CREATE TABLE `isn_vacations` (
  `Id` int(11) NOT NULL,
  `emp_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `vacation_type_id` int(11) NOT NULL,
  `approval_reason` text DEFAULT NULL,
  `approval_status` tinyint(1) DEFAULT 0,
  `rejected_reason` text DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_vacations`
--

INSERT INTO `isn_vacations` (`Id`, `emp_id`, `start_date`, `end_date`, `vacation_type_id`, `approval_reason`, `approval_status`, `rejected_reason`, `approved_by`, `approved_at`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(3, 42, '2024-07-10', '2024-07-15', 2, 'I m tired', 2, NULL, NULL, NULL, 1, '2024-06-15 17:57:09', '2024-06-15 18:03:44', 39, '2024-06-15 18:05:11', 39, '2024-06-15 18:05:38', 39, 0, NULL),
(4, 42, '2024-07-01', '2024-07-03', 2, 'I m tired', 1, NULL, NULL, NULL, 39, '2024-06-15 17:57:09', '2024-06-15 18:03:44', 39, '2024-06-15 18:05:11', 39, '2024-06-15 18:05:38', 39, 0, NULL),
(5, 41, '2024-07-01', '2024-07-03', 2, 'I m tired', 2, NULL, NULL, NULL, 39, '2024-06-15 17:57:09', '2024-06-15 18:03:44', 39, '2024-06-15 18:05:11', 39, '2024-06-15 18:05:38', 39, 0, NULL),
(6, 42, '2024-07-14', '2024-07-20', 1, 'I m tired', 2, NULL, NULL, NULL, 39, '2024-06-15 17:57:09', '2024-06-15 18:03:44', 39, '2024-06-15 18:05:11', 39, '2024-06-15 18:05:38', 39, 0, NULL);

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

--
-- Table structure for table `isn_vacation_type`
--

CREATE TABLE `isn_vacation_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `isn_vacation_type`
--

INSERT INTO `isn_vacation_type` (`id`, `name`, `description`, `color`, `inserted_by`, `inserted_at`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`, `restored_at`, `restored_by`, `is_deleted`, `notes`) VALUES
(1, 'Sick Leave', 'Leave taken due to illness or medical reasons', NULL, 39, '2024-06-15 17:27:11', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(2, 'Personal Leave', 'Leave taken for personal reasons or emergencies', NULL, 39, '2024-06-15 17:27:35', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL),
(3, 'Annual Leave', 'Paid leave for vacation or personal time off', NULL, 39, '2024-06-15 17:28:00', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL);

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

--
-- Table structure for table `isn_work_type`
--

CREATE TABLE `isn_work_type` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `color` text DEFAULT NULL,
  `inserted_by` int(11) DEFAULT NULL,
  `inserted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `restored_at` timestamp NULL DEFAULT NULL,
  `restored_by` int(11) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Stand-in structure for view `location_details`
-- (See below for the actual view)
--
CREATE TABLE `location_details` (
`id` int(11)
,`client_name` varchar(255)
,`client_id` int(11)
,`title` varchar(255)
,`description` text
,`city_name` varchar(255)
,`city_id` int(11)
,`address_line_1` varchar(255)
,`address_line_2` varchar(255)
,`maps_url` varchar(255)
,`location_status` varchar(255)
,`location_status_id` int(11)
,`color` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `promotion_details`
-- (See below for the actual view)
--
CREATE TABLE `promotion_details` (
`Id` int(11)
,`title` varchar(255)
,`employee_name` varchar(100)
,`emp_id` int(11)
,`description` text
,`value` decimal(10,2)
,`pro_code` varchar(20)
,`approval_status` tinyint(1)
,`Reply_name` varchar(100)
,`approved_at` datetime
,`approved_by` int(11)
,`rejected_reason` text
,`approval_reason` text
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `user_details`
-- (See below for the actual view)
--
CREATE TABLE `user_details` (
`id` int(11)
,`full_name` varchar(100)
,`username` varchar(250)
,`daysoff` bigint(23)
,`password` varchar(500)
,`email` varchar(255)
,`department_name` varchar(255)
,`dept_id` int(11)
,`role_name` varchar(255)
,`role_id` int(11)
,`city_name` varchar(255)
,`city_id` int(11)
,`end_of_service` bigint(25)
,`address` varchar(255)
,`last_login` datetime
,`active` int(11)
,`verified` int(11)
,`verification_code` varchar(50)
,`is_deleted` int(11)
,`inserted_at` datetime
,`updated_at` datetime
,`deleted_at` datetime
,`inserted_by` int(11)
,`updated_by` int(11)
,`deleted_by` int(11)
,`token` varchar(255)
,`restored_at` datetime
,`restored_by` int(11)
,`notes` text
,`Mobile` varchar(20)
,`Evaluated_by` int(11)
,`Evaluated_full_name` varchar(100)
,`Accommodation_type` int(11)
,`Accommodation_type_name` varchar(255)
,`Accommodation_type_color` varchar(30)
,`Camp_location_or_address` varchar(255)
,`Join_date` date
,`department_code` int(11)
,`code_number` varchar(10)
,`Position` int(11)
,`Position_name` varchar(255)
,`Emp_code` varchar(255)
,`reporting_to` int(11)
,`reporting_full_name` varchar(100)
,`Basic_Salary` decimal(10,2)
,`bank_name` varchar(255)
,`IBAN` varchar(34)
,`Swift` varchar(11)
,`account_number` varchar(20)
,`account_name` varchar(255)
,`camp_name` varchar(255)
,`Camp_id` int(11)
,`Allowances_accommodation` varchar(255)
,`transportation` varchar(255)
,`telecom` varchar(255)
,`Allowances_empty_1` varchar(255)
,`Allowances_empty_2` varchar(255)
,`Allowances_empty_3` varchar(255)
,`end_of_contract` date
,`birthdate` date
,`nationality` varchar(50)
,`gender` tinyint(1)
);

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

--
-- Stand-in structure for view `user_report_depart`
-- (See below for the actual view)
--
CREATE TABLE `user_report_depart` (
`role_name` varchar(255)
,`role_id` int(11)
,`table_name` varchar(255)
,`table_id` int(11)
,`allow_approval` tinyint(1)
,`full_name` varchar(100)
,`id` int(11)
,`department_name` varchar(255)
,`dept_id` int(11)
,`reporting_full_name` varchar(100)
,`reporting_to` int(11)
);

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

--
-- Stand-in structure for view `vacation_details`
-- (See below for the actual view)
--
CREATE TABLE `vacation_details` (
`Id` int(11)
,`employee_name` varchar(100)
,`emp_id` int(11)
,`start_date` date
,`end_date` date
,`vacation_type` varchar(255)
,`vacation_type_id` int(11)
,`color` text
,`approval_reason` text
,`approval_status` tinyint(1)
,`rejected_reason` text
,`approved_by` int(11)
,`approved_at` datetime
,`inserted_by` int(11)
,`inserted_by_name` varchar(100)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Stand-in structure for view `v_permission_table`
-- (See below for the actual view)
--
CREATE TABLE `v_permission_table` (
`id` int(11)
,`role_name` varchar(255)
,`role_id` int(11)
,`table_id` int(11)
,`table_name` varchar(255)
,`allow_create` tinyint(1)
,`allow_read` tinyint(1)
,`allow_update` tinyint(1)
,`allow_delete` tinyint(1)
,`allow_serach` tinyint(1)
,`allow_upload` tinyint(1)
,`allow_send_email` tinyint(1)
,`allow_approval` tinyint(1)
,`inserted_by` int(11)
,`inserted_at` timestamp
,`updated_at` timestamp
,`updated_by` int(11)
,`deleted_at` timestamp
,`deleted_by` int(11)
,`restored_at` timestamp
,`restored_by` int(11)
,`is_deleted` tinyint(1)
,`notes` text
);

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

--
-- Structure for view `approval_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `approval_details`  AS SELECT `a`.`ID` AS `ID`, `a`.`rtable` AS `rtable`, `tb`.`name` AS `name`, `a`.`record_id` AS `record_id`, `a`.`Status` AS `Status`, `a`.`Reply_by` AS `replied_by`, `a`.`Reply_at` AS `replied_at`, `a`.`rejected_reason` AS `rejected_reason`, `a`.`inserted_by` AS `inserted_by`, `a`.`inserted_at` AS `inserted_at`, `a`.`updated_at` AS `updated_at`, `a`.`updated_by` AS `updated_by`, `a`.`deleted_at` AS `deleted_at`, `a`.`deleted_by` AS `deleted_by`, `a`.`restored_at` AS `restored_at`, `a`.`restored_by` AS `restored_by`, `a`.`is_deleted` AS `is_deleted`, `a`.`notes` AS `notes` FROM (`isn_approvals` `a` left join `isn_table` `tb` on(`tb`.`id` = `a`.`rtable`))  ;

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

--
-- Structure for view `assessment_read_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `assessment_read_details`  AS SELECT `ar`.`id` AS `id`, `at`.`name` AS `type_name`, `ar`.`type_id` AS `type_id`, `at`.`color` AS `assessment_color`, `ar`.`value` AS `value`, `ar`.`evaluation` AS `evaluation`, `ar`.`recommendation` AS `recommendation`, `ar`.`inserted_by` AS `inserted_by`, `ar`.`inserted_at` AS `inserted_at`, `ar`.`updated_at` AS `updated_at`, `ar`.`updated_by` AS `updated_by`, `ar`.`deleted_at` AS `deleted_at`, `ar`.`deleted_by` AS `deleted_by`, `ar`.`restored_at` AS `restored_at`, `ar`.`restored_by` AS `restored_by`, `ar`.`is_deleted` AS `is_deleted`, `ar`.`notes` AS `notes` FROM (`isn_assessment_reads` `ar` left join `isn_assessment_reading_type` `at` on(`ar`.`type_id` = `at`.`id`))  ;

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

--
-- Structure for view `asset_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `asset_details`  AS SELECT `a`.`Id` AS `Id`, `l`.`title` AS `location_name`, `a`.`location_id` AS `location_id`, `cl`.`name` AS `client_name`, `a`.`client_id` AS `client_id`, `a`.`Title` AS `asset_title`, `a`.`Description` AS `Description`, `a`.`Serial_Number` AS `Serial_Number`, `m`.`name` AS `model_name`, `a`.`Model_id` AS `Model_id`, `m`.`color` AS `model_color`, `ma`.`name` AS `manufacturer_name`, `a`.`manufacturer_id` AS `manufacturer_id`, `ma`.`color` AS `manufacturer_color`, `a`.`Year` AS `Year`, `at`.`name` AS `asset_type`, `a`.`asset_type_id` AS `asset_type_id`, `at`.`color` AS `assets_type_color`, `a`.`asset_barcode` AS `asset_barcode`, `ast`.`name` AS `asset_status`, `a`.`asset_status_id` AS `asset_status_id`, `ast`.`color` AS `asset_status_color`, `a`.`inserted_by` AS `inserted_by`, `a`.`inserted_at` AS `inserted_at`, `a`.`updated_at` AS `updated_at`, `a`.`updated_by` AS `updated_by`, `a`.`deleted_at` AS `deleted_at`, `a`.`deleted_by` AS `deleted_by`, `a`.`restored_at` AS `restored_at`, `a`.`restored_by` AS `restored_by`, `a`.`is_deleted` AS `is_deleted`, `a`.`notes` AS `notes` FROM ((((((`isn_assets` `a` left join `isn_locations` `l` on(`a`.`location_id` = `l`.`id`)) left join `isn_clients` `cl` on(`a`.`client_id` = `cl`.`id`)) left join `isn_assets_model` `m` on(`a`.`Model_id` = `m`.`id`)) left join `isn_manufacturer` `ma` on(`a`.`manufacturer_id` = `ma`.`id`)) left join `isn_assets_type` `at` on(`a`.`asset_type_id` = `at`.`id`)) left join `isn_assets_status` `ast` on(`a`.`asset_status_id` = `ast`.`id`))  ;

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

--
-- Structure for view `camp_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `camp_details`  AS SELECT `c`.`Id` AS `Id`, `c`.`title` AS `title`, `cty`.`name` AS `city_name`, `c`.`city_id` AS `city_id`, `c`.`location` AS `location`, `c`.`map` AS `map`, `u`.`full_name` AS `camp_supervisor_name`, `c`.`camp_supervisor` AS `camp_supervisor`, `c`.`camp_capacity` AS `camp_capacity`, `c`.`camp_current_number_of_residents` AS `camp_current_number_of_residents`, `c`.`camp_code` AS `camp_code`, `c`.`inserted_by` AS `inserted_by`, `c`.`inserted_at` AS `inserted_at`, `c`.`updated_at` AS `updated_at`, `c`.`updated_by` AS `updated_by`, `c`.`deleted_at` AS `deleted_at`, `c`.`deleted_by` AS `deleted_by`, `c`.`restored_at` AS `restored_at`, `c`.`restored_by` AS `restored_by`, `c`.`is_deleted` AS `is_deleted`, `c`.`notes` AS `notes` FROM ((`isn_camps` `c` left join `isn_city` `cty` on(`c`.`city_id` = `cty`.`id`)) left join `isn_users` `u` on(`c`.`camp_supervisor` = `u`.`id`))  ;

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

--
-- Structure for view `client_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `client_details`  AS SELECT `c`.`id` AS `id`, `c`.`name` AS `name`, `c`.`name_Addon` AS `additional_name`, `c`.`Client_Code` AS `Client_Code`, `ct`.`name` AS `client_type`, `c`.`Client_Type_id` AS `Client_Type_id`, `c`.`Mobile` AS `Mobile`, `c`.`Email` AS `Email`, `cty`.`name` AS `city_name`, `c`.`City_id` AS `City_id`, `c`.`Address_Line_1` AS `Address_Line_1`, `c`.`Address_Line_2` AS `Address_Line_2`, `cs`.`name` AS `client_status`, `c`.`Client_Status_id` AS `Client_Status_id`, `ct`.`color` AS `client_type_color`, `cs`.`color` AS `client_status_color`, `c`.`inserted_by` AS `inserted_by`, `c`.`inserted_at` AS `inserted_at`, `c`.`updated_at` AS `updated_at`, `c`.`updated_by` AS `updated_by`, `c`.`deleted_at` AS `deleted_at`, `c`.`deleted_by` AS `deleted_by`, `c`.`restored_at` AS `restored_at`, `c`.`restored_by` AS `restored_by`, `c`.`is_deleted` AS `is_deleted`, `c`.`notes` AS `notes` FROM (((`isn_clients` `c` left join `isn_client_type` `ct` on(`c`.`Client_Type_id` = `ct`.`id`)) left join `isn_city` `cty` on(`c`.`City_id` = `cty`.`id`)) left join `isn_client_status` `cs` on(`c`.`Client_Status_id` = `cs`.`id`))  ;

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

--
-- Structure for view `contract_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `contract_details`  AS SELECT `c`.`id` AS `id`, `c`.`contact_number` AS `contact_number`, `cl`.`name` AS `client_name`, `c`.`client_id` AS `client_id`, `c`.`start_date` AS `start_date`, `c`.`end_date` AS `end_date`, `ct`.`name` AS `contract_type`, `c`.`contract_type_id` AS `contract_type_id`, `ct`.`color` AS `color`, `c`.`contract_amount` AS `contract_amount`, `c`.`description` AS `description`, `c`.`status` AS `status`, `c`.`inserted_by` AS `inserted_by`, `c`.`inserted_at` AS `inserted_at`, `c`.`updated_at` AS `updated_at`, `c`.`updated_by` AS `updated_by`, `c`.`deleted_at` AS `deleted_at`, `c`.`deleted_by` AS `deleted_by`, `c`.`restored_at` AS `restored_at`, `c`.`restored_by` AS `restored_by`, `c`.`is_deleted` AS `is_deleted`, `c`.`notes` AS `notes` FROM ((`isn_contracts` `c` left join `isn_clients` `cl` on(`c`.`client_id` = `cl`.`id`)) left join `isn_contract_types` `ct` on(`c`.`contract_type_id` = `ct`.`id`))  ;

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

--
-- Structure for view `department_code_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `department_code_details`  AS SELECT `dc`.`Id` AS `Id`, `dc`.`title` AS `title`, `d`.`name` AS `department_name`, `dc`.`dept_id` AS `dept_id`, `dc`.`code_number` AS `code_number`, `dc`.`job_description` AS `job_description`, `dc`.`color` AS `color`, `dc`.`inserted_by` AS `inserted_by`, `dc`.`inserted_at` AS `inserted_at`, `dc`.`updated_at` AS `updated_at`, `dc`.`updated_by` AS `updated_by`, `dc`.`deleted_at` AS `deleted_at`, `dc`.`deleted_by` AS `deleted_by`, `dc`.`restored_at` AS `restored_at`, `dc`.`restored_by` AS `restored_by`, `dc`.`is_deleted` AS `is_deleted`, `dc`.`notes` AS `notes` FROM (`isn_departments_codes` `dc` left join `isn_department` `d` on(`dc`.`dept_id` = `d`.`id`))  ;

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

--
-- Structure for view `employee_attendance`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `employee_attendance`  AS SELECT `a`.`Id` AS `Id`, `e`.`full_name` AS `employee_name`, `a`.`emp_id` AS `emp_id`, `e`.`Basic_Salary` AS `Basic_Salary`, `a`.`date` AS `date`, `a`.`attended` AS `attended`, `a`.`is_holiday` AS `is_public_holiday`, `a`.`overtime` AS `overtime`, `a`.`cost` AS `cost`, `a`.`inserted_by` AS `inserted_by`, `a`.`inserted_at` AS `inserted_at`, `a`.`updated_at` AS `updated_at`, `a`.`updated_by` AS `updated_by`, `a`.`deleted_at` AS `deleted_at`, `a`.`deleted_by` AS `deleted_by`, `a`.`restored_at` AS `restored_at`, `a`.`restored_by` AS `restored_by`, `a`.`is_deleted` AS `is_deleted`, `a`.`notes` AS `notes` FROM (`isn_attendance` `a` left join `isn_users` `e` on(`a`.`emp_id` = `e`.`id`))  ;

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

--
-- Structure for view `enquiry_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `enquiry_details`  AS SELECT `e`.`id` AS `id`, `e`.`enquiry_number` AS `enquiry_number`, `cl`.`name` AS `client_name`, `e`.`client_id` AS `client_id`, `e`.`requested_by` AS `requested_by`, `r`.`full_name` AS `reported_by_name`, `p`.`name` AS `priority_name`, `e`.`priority_id` AS `priority_id`, `s`.`color` AS `enquiry_status_color`, `e`.`request_date` AS `request_date`, `e`.`expected_start_date` AS `expected_start_date`, `e`.`next_follow_up` AS `next_follow_up`, `e`.`contract_id` AS `contract_id`, `p`.`color` AS `priority_list_color`, `e`.`work_description` AS `work_description`, `e`.`special_instructions` AS `special_instructions`, `s`.`name` AS `status_name`, `e`.`status_id` AS `status_id`, `e`.`inserted_by` AS `inserted_by`, `e`.`inserted_at` AS `inserted_at`, `e`.`updated_at` AS `updated_at`, `e`.`updated_by` AS `updated_by`, `e`.`deleted_at` AS `deleted_at`, `e`.`deleted_by` AS `deleted_by`, `e`.`restored_at` AS `restored_at`, `e`.`restored_by` AS `restored_by`, `e`.`is_deleted` AS `is_deleted`, `e`.`notes` AS `notes` FROM ((((`isn_enquiry` `e` left join `isn_clients` `cl` on(`e`.`client_id` = `cl`.`id`)) left join `isn_users` `r` on(`e`.`reported_by` = `r`.`id`)) left join `isn_priority_list` `p` on(`e`.`priority_id` = `p`.`id`)) left join `isn_enquiry_status` `s` on(`e`.`status_id` = `s`.`id`))  ;

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

--
-- Structure for view `enquiry_location_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `enquiry_location_details`  AS SELECT `el`.`id` AS `id`, `e`.`enquiry_number` AS `enquiry_number`, `el`.`enquery_id` AS `enquery_id`, `l`.`title` AS `location_name`, `el`.`locations_id` AS `locations_id`, `el`.`inserted_by` AS `inserted_by`, `el`.`inserted_at` AS `inserted_at`, `el`.`updated_at` AS `updated_at`, `el`.`updated_by` AS `updated_by`, `el`.`deleted_at` AS `deleted_at`, `el`.`deleted_by` AS `deleted_by`, `el`.`restored_at` AS `restored_at`, `el`.`restored_by` AS `restored_by`, `el`.`is_deleted` AS `is_deleted`, `el`.`notes` AS `notes` FROM ((`isn_enquery_locations` `el` left join `isn_enquiry` `e` on(`el`.`enquery_id` = `e`.`id`)) left join `isn_locations` `l` on(`el`.`locations_id` = `l`.`id`))  ;

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

--
-- Structure for view `file_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `file_details`  AS SELECT `f`.`id` AS `id`, `t`.`name` AS `table_name`, `f`.`table_id` AS `table_id`, `f`.`file_name` AS `file_name`, `f`.`record_id` AS `record_id`, `f`.`description` AS `description`, `f`.`title` AS `title`, `dt`.`name` AS `doc_type_name`, `f`.`doc_type_id` AS `doc_type_id`, `f`.`inserted_by` AS `inserted_by`, `f`.`inserted_at` AS `inserted_at`, `f`.`updated_at` AS `updated_at`, `f`.`updated_by` AS `updated_by`, `f`.`deleted_at` AS `deleted_at`, `f`.`deleted_by` AS `deleted_by`, `f`.`restored_at` AS `restored_at`, `f`.`restored_by` AS `restored_by`, `f`.`is_deleted` AS `is_deleted`, `f`.`notes` AS `notes` FROM ((`isn_files` `f` left join `isn_table` `t` on(`f`.`table_id` = `t`.`id`)) left join `isn_doc_types` `dt` on(`f`.`doc_type_id` = `dt`.`id`))  ;

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

--
-- Structure for view `location_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `location_details`  AS SELECT `l`.`id` AS `id`, `c`.`name` AS `client_name`, `l`.`client_id` AS `client_id`, `l`.`title` AS `title`, `l`.`description` AS `description`, `ct`.`name` AS `city_name`, `l`.`city_id` AS `city_id`, `l`.`address_line_1` AS `address_line_1`, `l`.`address_line_2` AS `address_line_2`, `l`.`maps_url` AS `maps_url`, `ls`.`name` AS `location_status`, `l`.`location_status_id` AS `location_status_id`, `ls`.`color` AS `color`, `l`.`inserted_by` AS `inserted_by`, `l`.`inserted_at` AS `inserted_at`, `l`.`updated_at` AS `updated_at`, `l`.`updated_by` AS `updated_by`, `l`.`deleted_at` AS `deleted_at`, `l`.`deleted_by` AS `deleted_by`, `l`.`restored_at` AS `restored_at`, `l`.`restored_by` AS `restored_by`, `l`.`is_deleted` AS `is_deleted`, `l`.`notes` AS `notes` FROM (((`isn_locations` `l` left join `isn_clients` `c` on(`l`.`client_id` = `c`.`id`)) left join `isn_city` `ct` on(`l`.`city_id` = `ct`.`id`)) left join `isn_location_status` `ls` on(`l`.`location_status_id` = `ls`.`id`))  ;

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

--
-- Structure for view `promotion_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `promotion_details`  AS SELECT `p`.`Id` AS `Id`, `p`.`title` AS `title`, `u`.`full_name` AS `employee_name`, `p`.`emp_id` AS `emp_id`, `p`.`description` AS `description`, `p`.`value` AS `value`, `p`.`pro_code` AS `pro_code`, `p`.`approval_status` AS `approval_status`, `u1`.`full_name` AS `Reply_name`, `p`.`approved_at` AS `approved_at`, `p`.`approved_by` AS `approved_by`, `p`.`rejected_reason` AS `rejected_reason`, `p`.`approval_reason` AS `approval_reason`, `p`.`inserted_by` AS `inserted_by`, `p`.`inserted_at` AS `inserted_at`, `p`.`updated_at` AS `updated_at`, `p`.`updated_by` AS `updated_by`, `p`.`deleted_at` AS `deleted_at`, `p`.`deleted_by` AS `deleted_by`, `p`.`restored_at` AS `restored_at`, `p`.`restored_by` AS `restored_by`, `p`.`is_deleted` AS `is_deleted`, `p`.`notes` AS `notes` FROM ((`isn_promotion` `p` left join `isn_users` `u` on(`p`.`emp_id` = `u`.`id`)) left join `isn_users` `u1` on(`p`.`approved_by` = `u1`.`id`))  ;

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

--
-- Structure for view `user_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user_details`  AS SELECT `u`.`id` AS `id`, `u`.`full_name` AS `full_name`, `u`.`username` AS `username`, timestampdiff(YEAR,`u`.`Join_date`,curdate()) * 30 AS `daysoff`, `u`.`password` AS `password`, `u`.`email` AS `email`, `d`.`name` AS `department_name`, `u`.`dept_id` AS `dept_id`, `r`.`name` AS `role_name`, `u`.`role_id` AS `role_id`, `c`.`name` AS `city_name`, `u`.`city_id` AS `city_id`, CASE WHEN timestampdiff(YEAR,`u`.`Join_date`,curdate()) <= 5 THEN timestampdiff(YEAR,`u`.`Join_date`,curdate()) * 21 ELSE 5 * 21 + (timestampdiff(YEAR,`u`.`Join_date`,curdate()) - 5) * 30 END AS `end_of_service`, `u`.`address` AS `address`, `u`.`last_login` AS `last_login`, `u`.`active` AS `active`, `u`.`verified` AS `verified`, `u`.`verification_code` AS `verification_code`, `u`.`is_deleted` AS `is_deleted`, `u`.`inserted_at` AS `inserted_at`, `u`.`updated_at` AS `updated_at`, `u`.`deleted_at` AS `deleted_at`, `u`.`inserted_by` AS `inserted_by`, `u`.`updated_by` AS `updated_by`, `u`.`deleted_by` AS `deleted_by`, `u`.`token` AS `token`, `u`.`restored_at` AS `restored_at`, `u`.`restored_by` AS `restored_by`, `u`.`notes` AS `notes`, `u`.`Mobile` AS `Mobile`, `u`.`Evaluated_by` AS `Evaluated_by`, `ue`.`full_name` AS `Evaluated_full_name`, `u`.`Accommodation_type` AS `Accommodation_type`, `acctype`.`name` AS `Accommodation_type_name`, `acctype`.`color` AS `Accommodation_type_color`, `u`.`Camp_location_or_address` AS `Camp_location_or_address`, `u`.`Join_date` AS `Join_date`, `u`.`department_code` AS `department_code`, `dep_code`.`code_number` AS `code_number`, `u`.`Position` AS `Position`, `poi`.`name` AS `Position_name`, `u`.`Emp_code` AS `Emp_code`, `u`.`reporting_to` AS `reporting_to`, `ux`.`full_name` AS `reporting_full_name`, `u`.`Basic_Salary` AS `Basic_Salary`, `u`.`bank_name` AS `bank_name`, `u`.`IBAN` AS `IBAN`, `u`.`Swift` AS `Swift`, `u`.`account_number` AS `account_number`, `u`.`account_name` AS `account_name`, `camp`.`title` AS `camp_name`, `u`.`Camp_id` AS `Camp_id`, `u`.`Allowances_accommodation` AS `Allowances_accommodation`, `u`.`transportation` AS `transportation`, `u`.`telecom` AS `telecom`, `u`.`Allowances_empty_1` AS `Allowances_empty_1`, `u`.`Allowances_empty_2` AS `Allowances_empty_2`, `u`.`Allowances_empty_3` AS `Allowances_empty_3`, `u`.`end_of_contract` AS `end_of_contract`, `u`.`birthdate` AS `birthdate`, `u`.`nationality` AS `nationality`, `u`.`gender` AS `gender` FROM (((((((((`isn_users` `u` left join `isn_department` `d` on(`u`.`dept_id` = `d`.`id`)) left join `isn_roles` `r` on(`u`.`role_id` = `r`.`id`)) left join `isn_city` `c` on(`u`.`city_id` = `c`.`id`)) left join `isn_camps` `camp` on(`u`.`Camp_id` = `camp`.`Id`)) left join `isn_accommodation_types` `acctype` on(`u`.`Accommodation_type` = `acctype`.`id`)) left join `isn_positions` `poi` on(`u`.`Position` = `poi`.`id`)) left join `department_code_details` `dep_code` on(`u`.`department_code` = `dep_code`.`Id`)) left join `isn_users` `ux` on(`u`.`reporting_to` = `ux`.`id`)) left join `isn_users` `ue` on(`u`.`Evaluated_by` = `ue`.`id`))  ;

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

--
-- Structure for view `user_report_depart`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user_report_depart`  AS SELECT `p`.`role_name` AS `role_name`, `p`.`role_id` AS `role_id`, `p`.`table_name` AS `table_name`, `p`.`table_id` AS `table_id`, `p`.`allow_approval` AS `allow_approval`, `u`.`full_name` AS `full_name`, `u`.`id` AS `id`, `u`.`department_name` AS `department_name`, `u`.`dept_id` AS `dept_id`, `u`.`reporting_full_name` AS `reporting_full_name`, `u`.`reporting_to` AS `reporting_to` FROM (`v_permission_table` `p` left join `user_details` `u` on(`p`.`role_id` = `u`.`role_id`)) WHERE `p`.`allow_approval` = 1 AND `u`.`is_deleted` = 00  ;

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

--
-- Structure for view `vacation_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vacation_details`  AS SELECT `v`.`Id` AS `Id`, `u`.`full_name` AS `employee_name`, `v`.`emp_id` AS `emp_id`, `v`.`start_date` AS `start_date`, `v`.`end_date` AS `end_date`, `vt`.`name` AS `vacation_type`, `v`.`vacation_type_id` AS `vacation_type_id`, `vt`.`color` AS `color`, `v`.`approval_reason` AS `approval_reason`, `v`.`approval_status` AS `approval_status`, `v`.`rejected_reason` AS `rejected_reason`, `v`.`approved_by` AS `approved_by`, `v`.`approved_at` AS `approved_at`, `v`.`inserted_by` AS `inserted_by`, `u1`.`full_name` AS `inserted_by_name`, `v`.`inserted_at` AS `inserted_at`, `v`.`updated_at` AS `updated_at`, `v`.`updated_by` AS `updated_by`, `v`.`deleted_at` AS `deleted_at`, `v`.`deleted_by` AS `deleted_by`, `v`.`restored_at` AS `restored_at`, `v`.`restored_by` AS `restored_by`, `v`.`is_deleted` AS `is_deleted`, `v`.`notes` AS `notes` FROM (((`isn_vacations` `v` left join `isn_users` `u` on(`v`.`emp_id` = `u`.`id`)) left join `isn_vacation_type` `vt` on(`v`.`vacation_type_id` = `vt`.`id`)) left join `isn_users` `u1` on(`v`.`inserted_by` = `u1`.`id`))  ;

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

--
-- Structure for view `v_permission_table`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_permission_table`  AS SELECT `isn_permissions`.`id` AS `id`, `isn_roles`.`name` AS `role_name`, `isn_permissions`.`role_id` AS `role_id`, `isn_permissions`.`table_id` AS `table_id`, `isn_table`.`name` AS `table_name`, `isn_permissions`.`allow_create` AS `allow_create`, `isn_permissions`.`allow_read` AS `allow_read`, `isn_permissions`.`allow_update` AS `allow_update`, `isn_permissions`.`allow_delete` AS `allow_delete`, `isn_permissions`.`allow_serach` AS `allow_serach`, `isn_permissions`.`allow_upload` AS `allow_upload`, `isn_permissions`.`allow_send_email` AS `allow_send_email`, `isn_permissions`.`allow_approval` AS `allow_approval`, `isn_permissions`.`inserted_by` AS `inserted_by`, `isn_permissions`.`inserted_at` AS `inserted_at`, `isn_permissions`.`updated_at` AS `updated_at`, `isn_permissions`.`updated_by` AS `updated_by`, `isn_permissions`.`deleted_at` AS `deleted_at`, `isn_permissions`.`deleted_by` AS `deleted_by`, `isn_permissions`.`restored_at` AS `restored_at`, `isn_permissions`.`restored_by` AS `restored_by`, `isn_permissions`.`is_deleted` AS `is_deleted`, `isn_permissions`.`notes` AS `notes` FROM ((`isn_permissions` join `isn_table`) join `isn_roles` on(`isn_permissions`.`table_id` = `isn_table`.`id` and `isn_permissions`.`role_id` = `isn_roles`.`id`))  ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `api_requests`
--
ALTER TABLE `api_requests`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ip_address` (`user_id`);

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

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

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

--
-- Indexes for table `isn_approvals`
--
ALTER TABLE `isn_approvals`
  ADD PRIMARY KEY (`ID`),
  ADD KEY `rtable` (`rtable`);

--
-- Indexes for table `isn_assessment_reading_type`
--
ALTER TABLE `isn_assessment_reading_type`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD KEY `asset_id` (`asset_id`),
  ADD KEY `unit_id` (`unit_id`);

--
-- Indexes for table `isn_assessment_reads`
--
ALTER TABLE `isn_assessment_reads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `type_id` (`type_id`);

--
-- Indexes for table `isn_assets`
--
ALTER TABLE `isn_assets`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `asset_status_id` (`asset_status_id`),
  ADD KEY `asset_type_id` (`asset_type_id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `location_id` (`location_id`),
  ADD KEY `manufacturer_id` (`manufacturer_id`),
  ADD KEY `Model_id` (`Model_id`);

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

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

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

--
-- Indexes for table `isn_attendance`
--
ALTER TABLE `isn_attendance`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `id` (`Id`),
  ADD KEY `Attendance_ibfk_1` (`emp_id`);

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

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

--
-- Indexes for table `isn_camps`
--
ALTER TABLE `isn_camps`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `camp_supervisor` (`camp_supervisor`);

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

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

--
-- Indexes for table `isn_clients`
--
ALTER TABLE `isn_clients`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `Client_Code` (`Client_Code`),
  ADD UNIQUE KEY `Email` (`Email`),
  ADD KEY `Client_Type_id` (`Client_Type_id`),
  ADD KEY `City_id` (`City_id`),
  ADD KEY `Client_Status_id` (`Client_Status_id`);

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

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

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

--
-- Indexes for table `isn_contracts`
--
ALTER TABLE `isn_contracts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `contract_type_id` (`contract_type_id`);

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

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

--
-- Indexes for table `isn_departments_codes`
--
ALTER TABLE `isn_departments_codes`
  ADD PRIMARY KEY (`Id`),
  ADD UNIQUE KEY `code_number` (`code_number`);

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

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

--
-- Indexes for table `isn_enquiry`
--
ALTER TABLE `isn_enquiry`
  ADD PRIMARY KEY (`id`),
  ADD KEY `priority_id` (`priority_id`),
  ADD KEY `status_id` (`status_id`),
  ADD KEY `reported_by` (`reported_by`),
  ADD KEY `isn_enquiry_ibfk_1` (`contract_id`),
  ADD KEY `client_id` (`client_id`);

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

--
-- Indexes for table `isn_estimation_details`
--
ALTER TABLE `isn_estimation_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `status` (`status`),
  ADD KEY `isn_estimation_details_ibfk_1` (`type_id`);

--
-- Indexes for table `isn_estimation_exclusions`
--
ALTER TABLE `isn_estimation_exclusions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `estimation_id` (`estimation_id`,`exclusions_id`),
  ADD KEY `exclusions_id` (`exclusions_id`);

--
-- Indexes for table `isn_estimation_lines`
--
ALTER TABLE `isn_estimation_lines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `isn_estimation_lines_ibfk_2` (`type_id`),
  ADD KEY `unit` (`unit`),
  ADD KEY `estimation_id` (`estimation_id`);

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

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

--
-- Indexes for table `isn_estimation_payment`
--
ALTER TABLE `isn_estimation_payment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `estimation_id` (`estimation_id`),
  ADD KEY `payment_id` (`payment_id`);

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

--
-- Indexes for table `isn_estimation_terms`
--
ALTER TABLE `isn_estimation_terms`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `estimation_id` (`estimation_id`,`term_id`),
  ADD KEY `isn_estimation_terms_ibfk_2` (`term_id`);

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

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

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

--
-- Indexes for table `isn_files`
--
ALTER TABLE `isn_files`
  ADD PRIMARY KEY (`id`),
  ADD KEY `table_id` (`table_id`),
  ADD KEY `doc_type_id` (`doc_type_id`);

--
-- Indexes for table `isn_locations`
--
ALTER TABLE `isn_locations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `city_id` (`city_id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `location_status_id` (`location_status_id`);

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

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

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

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

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

--
-- Indexes for table `isn_permissions`
--
ALTER TABLE `isn_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `table_id_2` (`table_id`,`role_id`),
  ADD KEY `table_id` (`table_id`);

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

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

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

--
-- Indexes for table `isn_promotion`
--
ALTER TABLE `isn_promotion`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `emp_id` (`emp_id`);

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

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

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

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

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

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

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

--
-- Indexes for table `isn_users`
--
ALTER TABLE `isn_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `city_id` (`city_id`),
  ADD KEY `dept_id` (`dept_id`),
  ADD KEY `role_id` (`role_id`),
  ADD KEY `department_code` (`department_code`),
  ADD KEY `Camp_id` (`Camp_id`);

--
-- Indexes for table `isn_vacations`
--
ALTER TABLE `isn_vacations`
  ADD PRIMARY KEY (`Id`),
  ADD KEY `id` (`Id`),
  ADD KEY `approved_by` (`approved_by`),
  ADD KEY `vacation_type_id` (`vacation_type_id`),
  ADD KEY `Vacations_ibfk_1` (`emp_id`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `isn_departments_codes`
--
ALTER TABLE `isn_departments_codes`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `isn_promotion`
--
ALTER TABLE `isn_promotion`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `isn_vacations`
--
ALTER TABLE `isn_vacations`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `isn_approvals`
--
ALTER TABLE `isn_approvals`
  ADD CONSTRAINT `isn_approvals_ibfk_1` FOREIGN KEY (`rtable`) REFERENCES `isn_table` (`id`);

--
-- Constraints for table `isn_assessment_reading_type`
--
ALTER TABLE `isn_assessment_reading_type`
  ADD CONSTRAINT `isn_assessment_reading_type_ibfk_1` FOREIGN KEY (`asset_id`) REFERENCES `isn_assets` (`Id`),
  ADD CONSTRAINT `isn_assessment_reading_type_ibfk_2` FOREIGN KEY (`unit_id`) REFERENCES `isn_rule_unit_id` (`id`);

--
-- Constraints for table `isn_assessment_reads`
--
ALTER TABLE `isn_assessment_reads`
  ADD CONSTRAINT `isn_assessment_reads_ibfk_1` FOREIGN KEY (`type_id`) REFERENCES `isn_assessment_reading_type` (`id`);

--
-- Constraints for table `isn_assets`
--
ALTER TABLE `isn_assets`
  ADD CONSTRAINT `isn_assets_ibfk_1` FOREIGN KEY (`asset_status_id`) REFERENCES `isn_assets_status` (`id`),
  ADD CONSTRAINT `isn_assets_ibfk_2` FOREIGN KEY (`asset_type_id`) REFERENCES `isn_assets_type` (`id`),
  ADD CONSTRAINT `isn_assets_ibfk_3` FOREIGN KEY (`client_id`) REFERENCES `isn_clients` (`id`),
  ADD CONSTRAINT `isn_assets_ibfk_4` FOREIGN KEY (`location_id`) REFERENCES `isn_locations` (`id`),
  ADD CONSTRAINT `isn_assets_ibfk_5` FOREIGN KEY (`manufacturer_id`) REFERENCES `isn_manufacturer` (`id`),
  ADD CONSTRAINT `isn_assets_ibfk_6` FOREIGN KEY (`Model_id`) REFERENCES `isn_assets_model` (`id`);

--
-- Constraints for table `isn_attendance`
--
ALTER TABLE `isn_attendance`
  ADD CONSTRAINT `Attendance_ibfk_1` FOREIGN KEY (`emp_id`) REFERENCES `isn_users` (`id`);

--
-- Constraints for table `isn_camps`
--
ALTER TABLE `isn_camps`
  ADD CONSTRAINT `isn_camps_ibfk_1` FOREIGN KEY (`camp_supervisor`) REFERENCES `isn_users` (`id`);

--
-- Constraints for table `isn_clients`
--
ALTER TABLE `isn_clients`
  ADD CONSTRAINT `isn_CLIENTS_ibfk_1` FOREIGN KEY (`Client_Type_id`) REFERENCES `isn_client_type` (`id`),
  ADD CONSTRAINT `isn_CLIENTS_ibfk_2` FOREIGN KEY (`City_id`) REFERENCES `isn_city` (`id`),
  ADD CONSTRAINT `isn_CLIENTS_ibfk_3` FOREIGN KEY (`Client_Status_id`) REFERENCES `isn_client_status` (`id`);

--
-- Constraints for table `isn_contracts`
--
ALTER TABLE `isn_contracts`
  ADD CONSTRAINT `isn_contracts_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `isn_clients` (`id`),
  ADD CONSTRAINT `isn_contracts_ibfk_2` FOREIGN KEY (`contract_type_id`) REFERENCES `isn_contract_types` (`id`);

--
-- Constraints for table `isn_enquiry`
--
ALTER TABLE `isn_enquiry`
  ADD CONSTRAINT `isn_enquiry_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `isn_contracts` (`id`),
  ADD CONSTRAINT `isn_enquiry_ibfk_2` FOREIGN KEY (`priority_id`) REFERENCES `isn_priority_list` (`id`),
  ADD CONSTRAINT `isn_enquiry_ibfk_3` FOREIGN KEY (`status_id`) REFERENCES `isn_enquiry_status` (`id`),
  ADD CONSTRAINT `isn_enquiry_ibfk_4` FOREIGN KEY (`reported_by`) REFERENCES `isn_users` (`id`),
  ADD CONSTRAINT `isn_enquiry_ibfk_5` FOREIGN KEY (`client_id`) REFERENCES `isn_clients` (`id`);

--
-- Constraints for table `isn_estimation_details`
--
ALTER TABLE `isn_estimation_details`
  ADD CONSTRAINT `isn_estimation_details_ibfk_1` FOREIGN KEY (`type_id`) REFERENCES `isn_estimation_type` (`id`),
  ADD CONSTRAINT `isn_estimation_details_ibfk_2` FOREIGN KEY (`status`) REFERENCES `isn_estimation_status` (`id`);

--
-- Constraints for table `isn_estimation_exclusions`
--
ALTER TABLE `isn_estimation_exclusions`
  ADD CONSTRAINT `isn_estimation_exclusions_ibfk_1` FOREIGN KEY (`estimation_id`) REFERENCES `isn_estimation_details` (`id`),
  ADD CONSTRAINT `isn_estimation_exclusions_ibfk_2` FOREIGN KEY (`exclusions_id`) REFERENCES `isn_exclusions_list` (`id`);

--
-- Constraints for table `isn_estimation_lines`
--
ALTER TABLE `isn_estimation_lines`
  ADD CONSTRAINT `isn_estimation_lines_ibfk_2` FOREIGN KEY (`type_id`) REFERENCES `isn_estimation_line_type` (`id`),
  ADD CONSTRAINT `isn_estimation_lines_ibfk_3` FOREIGN KEY (`unit`) REFERENCES `isn_estimation_line_unit` (`id`),
  ADD CONSTRAINT `isn_estimation_lines_ibfk_4` FOREIGN KEY (`estimation_id`) REFERENCES `isn_estimation_details` (`id`);

--
-- Constraints for table `isn_estimation_payment`
--
ALTER TABLE `isn_estimation_payment`
  ADD CONSTRAINT `isn_estimation_payment_ibfk_1` FOREIGN KEY (`estimation_id`) REFERENCES `isn_estimation_details` (`id`),
  ADD CONSTRAINT `isn_estimation_payment_ibfk_2` FOREIGN KEY (`payment_id`) REFERENCES `isn_payment_term_list` (`id`);

--
-- Constraints for table `isn_estimation_terms`
--
ALTER TABLE `isn_estimation_terms`
  ADD CONSTRAINT `isn_estimation_terms_ibfk_1` FOREIGN KEY (`estimation_id`) REFERENCES `isn_estimation_details` (`id`),
  ADD CONSTRAINT `isn_estimation_terms_ibfk_2` FOREIGN KEY (`term_id`) REFERENCES `isn_terms_list` (`id`);

--
-- Constraints for table `isn_files`
--
ALTER TABLE `isn_files`
  ADD CONSTRAINT `isn_files_ibfk_1` FOREIGN KEY (`doc_type_id`) REFERENCES `isn_doc_types` (`id`);

--
-- Constraints for table `isn_locations`
--
ALTER TABLE `isn_locations`
  ADD CONSTRAINT `isn_locations_ibfk_1` FOREIGN KEY (`city_id`) REFERENCES `isn_city` (`id`),
  ADD CONSTRAINT `isn_locations_ibfk_2` FOREIGN KEY (`client_id`) REFERENCES `isn_clients` (`id`),
  ADD CONSTRAINT `isn_locations_ibfk_3` FOREIGN KEY (`location_status_id`) REFERENCES `isn_location_status` (`id`);

--
-- Constraints for table `isn_permissions`
--
ALTER TABLE `isn_permissions`
  ADD CONSTRAINT `isn_permissions_ibfk_1` FOREIGN KEY (`table_id`) REFERENCES `isn_table` (`id`);

--
-- Constraints for table `isn_promotion`
--
ALTER TABLE `isn_promotion`
  ADD CONSTRAINT `isn_promotion_ibfk_1` FOREIGN KEY (`emp_id`) REFERENCES `isn_users` (`id`);

--
-- Constraints for table `isn_users`
--
ALTER TABLE `isn_users`
  ADD CONSTRAINT `isn_users_ibfk_1` FOREIGN KEY (`city_id`) REFERENCES `isn_city` (`id`),
  ADD CONSTRAINT `isn_users_ibfk_2` FOREIGN KEY (`dept_id`) REFERENCES `isn_department` (`id`),
  ADD CONSTRAINT `isn_users_ibfk_3` FOREIGN KEY (`role_id`) REFERENCES `isn_roles` (`id`),
  ADD CONSTRAINT `isn_users_ibfk_4` FOREIGN KEY (`department_code`) REFERENCES `isn_departments_codes` (`Id`);

--
-- Constraints for table `isn_vacations`
--
ALTER TABLE `isn_vacations`
  ADD CONSTRAINT `Vacations_ibfk_1` FOREIGN KEY (`emp_id`) REFERENCES `isn_users` (`id`),
  ADD CONSTRAINT `isn_vacations_ibfk_2` FOREIGN KEY (`vacation_type_id`) REFERENCES `isn_vacation_type` (`id`);
COMMIT;

