-- Table structure for table `sunbird_tblestimate_request_forms`
--

CREATE TABLE `sunbird_tblestimate_request_forms` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `form_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `form_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `recaptcha` int DEFAULT NULL,
  `status` int NOT NULL,
  `submit_btn_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `submit_btn_bg_color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#84c529',
  `submit_btn_text_color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#ffffff',
  `success_submit_msg` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `submit_action` int DEFAULT '0',
  `submit_redirect_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `language` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dateadded` datetime DEFAULT NULL,
  `notify_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notify_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `responsible` int DEFAULT NULL,
  `notify_request_submitted` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblestimate_request_forms`
--


--
-- Table structure for table `sunbird_tblestimate_request_status`
--

CREATE TABLE `sunbird_tblestimate_request_status` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusorder` int DEFAULT NULL,
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `flag` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblestimate_request_status`
--

INSERT INTO `sunbird_tblestimate_request_status` VALUES (1,'Cancelled',1,'#808080','cancelled'),(2,'Processing',2,'#007bff','processing'),(3,'Completed',3,'#28a745','completed');

--
-- Table structure for table `sunbird_tblestimate_requests`
--

CREATE TABLE `sunbird_tblestimate_requests` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `submission` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_status_change` datetime DEFAULT NULL,
  `date_estimated` datetime DEFAULT NULL,
  `from_form_id` int DEFAULT NULL,
  `assigned` int DEFAULT NULL,
  `status` int DEFAULT NULL,
  `default_language` int NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblestimate_requests`
--


--
-- Table structure for table `sunbird_tblestimates`
--

CREATE TABLE `sunbird_tblestimates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sent` tinyint(1) NOT NULL DEFAULT '0',
  `datesend` datetime DEFAULT NULL,
  `clientid` int NOT NULL,
  `deleted_customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` int NOT NULL DEFAULT '0',
  `number` int NOT NULL,
  `prefix` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number_format` int NOT NULL DEFAULT '0',
  `formatted_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hash` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `datecreated` datetime NOT NULL,
  `date` date NOT NULL,
  `expirydate` date DEFAULT NULL,
  `currency` int NOT NULL,
  `subtotal` decimal(15,2) NOT NULL,
  `total_tax` decimal(15,2) NOT NULL DEFAULT '0.00',
  `total` decimal(15,2) NOT NULL,
  `adjustment` decimal(15,2) DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `clientnote` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `adminnote` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `discount_percent` decimal(15,2) DEFAULT '0.00',
  `discount_total` decimal(15,2) DEFAULT '0.00',
  `discount_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoiceid` int DEFAULT NULL,
  `invoiced_date` datetime DEFAULT NULL,
  `terms` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `reference_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_agent` int NOT NULL DEFAULT '0',
  `billing_street` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_zip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_country` int DEFAULT NULL,
  `shipping_street` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_zip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_country` int DEFAULT NULL,
  `include_shipping` tinyint(1) NOT NULL,
  `show_shipping_on_estimate` tinyint(1) NOT NULL DEFAULT '1',
  `show_quantity_as` int NOT NULL DEFAULT '1',
  `pipeline_order` int DEFAULT '1',
  `is_expiry_notified` int NOT NULL DEFAULT '0',
  `acceptance_firstname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_lastname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_date` datetime DEFAULT NULL,
  `acceptance_ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `signature` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `short_link` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `clientid` (`clientid`),
  KEY `currency` (`currency`),
  KEY `project_id` (`project_id`),
  KEY `sale_agent` (`sale_agent`),
  KEY `status` (`status`),
  KEY `formatted_number` (`formatted_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblestimates`
--


--
-- Table structure for table `sunbird_tblevents`
--

CREATE TABLE `sunbird_tblevents` (
  `eventid` int NOT NULL AUTO_INCREMENT,
  `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `userid` int NOT NULL,
  `start` datetime NOT NULL,
  `end` datetime DEFAULT NULL,
  `public` int NOT NULL DEFAULT '0',
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `isstartnotified` tinyint(1) NOT NULL DEFAULT '0',
  `reminder_before` int NOT NULL DEFAULT '0',
  `reminder_before_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`eventid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblevents`
--


--
-- Table structure for table `sunbird_tblexpenses`
--

CREATE TABLE `sunbird_tblexpenses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category` int NOT NULL,
  `currency` int NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `tax` int DEFAULT NULL,
  `tax2` int NOT NULL DEFAULT '0',
  `reference_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `expense_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `clientid` int NOT NULL,
  `project_id` int NOT NULL DEFAULT '0',
  `billable` int DEFAULT '0',
  `invoiceid` int DEFAULT NULL,
  `paymentmode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` date NOT NULL,
  `recurring_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `repeat_every` int DEFAULT NULL,
  `recurring` int NOT NULL DEFAULT '0',
  `cycles` int NOT NULL DEFAULT '0',
  `total_cycles` int NOT NULL DEFAULT '0',
  `custom_recurring` int NOT NULL DEFAULT '0',
  `last_recurring_date` date DEFAULT NULL,
  `create_invoice_billable` tinyint(1) DEFAULT NULL,
  `send_invoice_to_customer` tinyint(1) NOT NULL,
  `recurring_from` int DEFAULT NULL,
  `dateadded` datetime NOT NULL,
  `addedfrom` int NOT NULL,
  `vendor` int DEFAULT NULL,
  `from_fleet` int NOT NULL DEFAULT '0',
  `due_date` date DEFAULT NULL,
  `date_paid` date DEFAULT NULL,
  `status` int DEFAULT NULL,
  `is_bill` int NOT NULL DEFAULT '0',
  `reason_for_void` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `voided` int NOT NULL DEFAULT '0',
  `approved` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `clientid` (`clientid`),
  KEY `project_id` (`project_id`),
  KEY `category` (`category`),
  KEY `currency` (`currency`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblexpenses`
--


--
-- Table structure for table `sunbird_tblexpenses_categories`
--

CREATE TABLE `sunbird_tblexpenses_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblexpenses_categories`
--

INSERT INTO `sunbird_tblexpenses_categories` VALUES (1,'Fleet: Work Order',NULL),(2,'Transport','Transport'),(3,'Printing','Printing'),(4,'Hotel Conferencing','Hotel Conferencing'),(5,'Hotel Accommodation','Hotel Accommodation'),(6,'Airtime Allowance','Airtime Allowance'),(7,'Client Gifts','Client Gifts'),(8,'Speaker Costs','Speaker Costs'),(9,'Miscellaneous','Miscellaneous'),(10,'CPD Allowance','CPD Allowance'),(11,'Additional Funds','Additional Funds');

--
-- Table structure for table `sunbird_tblfiles`
--

CREATE TABLE `sunbird_tblfiles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `filetype` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `visible_to_customer` int NOT NULL DEFAULT '0',
  `attachment_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `external` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `external_link` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `thumbnail_link` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'For external usage',
  `staffid` int NOT NULL,
  `contact_id` int DEFAULT '0',
  `task_comment_id` int NOT NULL DEFAULT '0',
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `rel_id` (`rel_id`),
  KEY `rel_type` (`rel_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblfiles`
--


--
-- Table structure for table `sunbird_tblfilter_defaults`
--

CREATE TABLE `sunbird_tblfilter_defaults` (
  `filter_id` int unsigned NOT NULL,
  `staff_id` int NOT NULL,
  `identifier` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `view` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  KEY `filter_id` (`filter_id`),
  KEY `sunbird_staff_id` (`staff_id`),
  CONSTRAINT `sunbird_tblfilter_defaults_ibfk_1` FOREIGN KEY (`filter_id`) REFERENCES `sunbird_tblfilters` (`id`) ON DELETE CASCADE,
  CONSTRAINT `sunbird_tblfilter_defaults_ibfk_2` FOREIGN KEY (`staff_id`) REFERENCES `sunbird_tblstaff` (`staffid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblfilter_defaults`
--


--
-- Table structure for table `sunbird_tblfilters`
--

CREATE TABLE `sunbird_tblfilters` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `builder` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `staff_id` int unsigned NOT NULL,
  `identifier` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_shared` tinyint unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblfilters`
--


--
-- Table structure for table `sunbird_tblfleet_benefit_and_penalty`
--

CREATE TABLE `sunbird_tblfleet_benefit_and_penalty` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` text,
  `criteria_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `type` text,
  `date` date DEFAULT NULL,
  `benefit_formality` text,
  `reward` decimal(15,2) DEFAULT NULL,
  `penalty_formality` text,
  `amount_of_damage` decimal(15,2) DEFAULT NULL,
  `amount_of_compensation` decimal(15,2) DEFAULT NULL,
  `notes` text,
  `addedfrom` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_benefit_and_penalty`
--


--
-- Table structure for table `sunbird_tblfleet_bookings`
--

CREATE TABLE `sunbird_tblfleet_bookings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` text NOT NULL,
  `contactid` int DEFAULT NULL,
  `userid` int DEFAULT NULL,
  `approved` int NOT NULL DEFAULT '0',
  `status` varchar(45) NOT NULL DEFAULT 'new',
  `delivery_date` date DEFAULT NULL,
  `phone` text NOT NULL,
  `receipt_address` text NOT NULL,
  `delivery_address` text NOT NULL,
  `note` text NOT NULL,
  `invoice_id` int NOT NULL DEFAULT '0',
  `admin_note` text,
  `number` text,
  `amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `invoice_hash` text,
  `rating` int NOT NULL DEFAULT '0',
  `comments` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_bookings`
--


--
-- Table structure for table `sunbird_tblfleet_criterias`
--

CREATE TABLE `sunbird_tblfleet_criterias` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_criterias`
--


--
-- Table structure for table `sunbird_tblfleet_driver_documents`
--

CREATE TABLE `sunbird_tblfleet_driver_documents` (
  `id` int NOT NULL AUTO_INCREMENT,
  `driver_id` int NOT NULL DEFAULT '0',
  `subject` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `type` varchar(45) NOT NULL DEFAULT 'driver',
  `vehicle_id` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_driver_documents`
--


--
-- Table structure for table `sunbird_tblfleet_events`
--

CREATE TABLE `sunbird_tblfleet_events` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` text NOT NULL,
  `vehicle_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `event_type` text NOT NULL,
  `event_time` datetime NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_events`
--


--
-- Table structure for table `sunbird_tblfleet_fuel_history`
--

CREATE TABLE `sunbird_tblfleet_fuel_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `fuel_time` datetime NOT NULL,
  `odometer` int DEFAULT NULL,
  `gallons` text,
  `price` decimal(15,2) DEFAULT NULL,
  `fuel_type` text,
  `reference` text,
  `notes` text,
  `addedfrom` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_fuel_history`
--


--
-- Table structure for table `sunbird_tblfleet_garages`
--

CREATE TABLE `sunbird_tblfleet_garages` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `country` int NOT NULL DEFAULT '0',
  `city` varchar(100) DEFAULT NULL,
  `zip` varchar(15) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `address` text,
  `notes` text,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_garages`
--


--
-- Table structure for table `sunbird_tblfleet_inspection_forms`
--

CREATE TABLE `sunbird_tblfleet_inspection_forms` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `color` text,
  `description` text,
  `addedfrom` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  `slug` text,
  `hash` text,
  `recurring` int NOT NULL DEFAULT '0',
  `recurring_type` varchar(10) DEFAULT NULL,
  `custom_recurring` tinyint(1) NOT NULL DEFAULT '0',
  `cycles` int NOT NULL DEFAULT '0',
  `total_cycles` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspection_forms`
--


--
-- Table structure for table `sunbird_tblfleet_inspection_question_box`
--

CREATE TABLE `sunbird_tblfleet_inspection_question_box` (
  `boxid` int NOT NULL AUTO_INCREMENT,
  `boxtype` varchar(10) NOT NULL,
  `questionid` int NOT NULL,
  PRIMARY KEY (`boxid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspection_question_box`
--


--
-- Table structure for table `sunbird_tblfleet_inspection_question_box_description`
--

CREATE TABLE `sunbird_tblfleet_inspection_question_box_description` (
  `questionboxdescriptionid` int NOT NULL AUTO_INCREMENT,
  `description` mediumtext NOT NULL,
  `boxid` mediumtext NOT NULL,
  `questionid` int NOT NULL,
  `is_fail` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`questionboxdescriptionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspection_question_box_description`
--


--
-- Table structure for table `sunbird_tblfleet_inspection_question_forms`
--

CREATE TABLE `sunbird_tblfleet_inspection_question_forms` (
  `questionid` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) DEFAULT NULL,
  `question` mediumtext NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `question_order` int NOT NULL,
  PRIMARY KEY (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspection_question_forms`
--


--
-- Table structure for table `sunbird_tblfleet_inspection_results`
--

CREATE TABLE `sunbird_tblfleet_inspection_results` (
  `id` int NOT NULL AUTO_INCREMENT,
  `inspection_id` int DEFAULT NULL,
  `boxid` int DEFAULT NULL,
  `boxdescriptionid` int DEFAULT NULL,
  `questionid` int DEFAULT NULL,
  `answer` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspection_results`
--


--
-- Table structure for table `sunbird_tblfleet_inspections`
--

CREATE TABLE `sunbird_tblfleet_inspections` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int DEFAULT NULL,
  `inspection_form_id` int DEFAULT NULL,
  `status` int DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  `recurring` int NOT NULL DEFAULT '0',
  `recurring_type` varchar(10) DEFAULT NULL,
  `custom_recurring` tinyint(1) NOT NULL DEFAULT '0',
  `cycles` int NOT NULL DEFAULT '0',
  `total_cycles` int NOT NULL DEFAULT '0',
  `is_recurring_from` int NOT NULL DEFAULT '0',
  `last_recurring_date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_inspections`
--


--
-- Table structure for table `sunbird_tblfleet_insurance_categories`
--

CREATE TABLE `sunbird_tblfleet_insurance_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_insurance_categories`
--


--
-- Table structure for table `sunbird_tblfleet_insurance_company`
--

CREATE TABLE `sunbird_tblfleet_insurance_company` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_insurance_company`
--


--
-- Table structure for table `sunbird_tblfleet_insurance_status`
--

CREATE TABLE `sunbird_tblfleet_insurance_status` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_insurance_status`
--


--
-- Table structure for table `sunbird_tblfleet_insurance_types`
--

CREATE TABLE `sunbird_tblfleet_insurance_types` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_insurance_types`
--


--
-- Table structure for table `sunbird_tblfleet_insurances`
--

CREATE TABLE `sunbird_tblfleet_insurances` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int DEFAULT NULL,
  `insurance_category_id` int DEFAULT NULL,
  `insurance_type_id` int DEFAULT NULL,
  `name` text,
  `status` text,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `description` text,
  `amount` decimal(15,2) NOT NULL,
  `insurance_company_id` int NOT NULL DEFAULT '0',
  `insurance_status_id` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_insurances`
--


--
-- Table structure for table `sunbird_tblfleet_logbooks`
--

CREATE TABLE `sunbird_tblfleet_logbooks` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `booking_id` int DEFAULT NULL,
  `odometer` int DEFAULT NULL,
  `status` varchar(45) NOT NULL DEFAULT 'new',
  `date` date DEFAULT NULL,
  `description` text,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_logbooks`
--


--
-- Table structure for table `sunbird_tblfleet_maintenance_teams`
--

CREATE TABLE `sunbird_tblfleet_maintenance_teams` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staffid` int DEFAULT NULL,
  `garage_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_maintenance_teams`
--


--
-- Table structure for table `sunbird_tblfleet_maintenances`
--

CREATE TABLE `sunbird_tblfleet_maintenances` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int DEFAULT NULL,
  `supplier_id` int DEFAULT NULL,
  `maintenance_type` varchar(30) DEFAULT NULL,
  `title` varchar(250) DEFAULT NULL,
  `warranty_improvement` int NOT NULL DEFAULT '0',
  `start_date` date DEFAULT NULL,
  `completion_date` date DEFAULT NULL,
  `cost` decimal(15,2) DEFAULT NULL,
  `notes` text,
  `date_creator` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `garage_id` int NOT NULL DEFAULT '0',
  `parts` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_maintenances`
--


--
-- Table structure for table `sunbird_tblfleet_part_groups`
--

CREATE TABLE `sunbird_tblfleet_part_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_part_groups`
--


--
-- Table structure for table `sunbird_tblfleet_part_histories`
--

CREATE TABLE `sunbird_tblfleet_part_histories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `part_id` int NOT NULL,
  `type` text NOT NULL,
  `vehicle_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `start_time` text,
  `end_time` text,
  `start_by` int DEFAULT NULL,
  `end_by` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_part_histories`
--


--
-- Table structure for table `sunbird_tblfleet_part_types`
--

CREATE TABLE `sunbird_tblfleet_part_types` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_part_types`
--


--
-- Table structure for table `sunbird_tblfleet_parts`
--

CREATE TABLE `sunbird_tblfleet_parts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `part_type_id` int DEFAULT NULL,
  `brand` text,
  `model` text,
  `serial_number` text,
  `vehicle_id` int NOT NULL DEFAULT '0',
  `driver_id` int NOT NULL DEFAULT '0',
  `part_group_id` int DEFAULT NULL,
  `status` text,
  `purchase_vendor` int DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `purchase_price` decimal(15,2) DEFAULT NULL,
  `warranty_expiration_date` date DEFAULT NULL,
  `purchase_comments` text,
  `in_service_date` date DEFAULT NULL,
  `estimated_service_life_in_months` int DEFAULT NULL,
  `estimated_resale_value` decimal(15,2) DEFAULT NULL,
  `out_of_service_date` date DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_parts`
--


--
-- Table structure for table `sunbird_tblfleet_time_cards`
--

CREATE TABLE `sunbird_tblfleet_time_cards` (
  `id` int NOT NULL AUTO_INCREMENT,
  `logbook_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `start_time` text NOT NULL,
  `end_time` text NOT NULL,
  `notes` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_time_cards`
--


--
-- Table structure for table `sunbird_tblfleet_vehicle_assignments`
--

CREATE TABLE `sunbird_tblfleet_vehicle_assignments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `driver_id` int NOT NULL,
  `vehicle_id` int NOT NULL,
  `start_time` datetime DEFAULT NULL,
  `starting_odometer` float DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `ending_odometer` float DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_vehicle_assignments`
--


--
-- Table structure for table `sunbird_tblfleet_vehicle_groups`
--

CREATE TABLE `sunbird_tblfleet_vehicle_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_vehicle_groups`
--


--
-- Table structure for table `sunbird_tblfleet_vehicle_histories`
--

CREATE TABLE `sunbird_tblfleet_vehicle_histories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_id` int NOT NULL,
  `type` text NOT NULL,
  `from_value` text,
  `to_value` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_vehicle_histories`
--


--
-- Table structure for table `sunbird_tblfleet_vehicle_types`
--

CREATE TABLE `sunbird_tblfleet_vehicle_types` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_vehicle_types`
--


--
-- Table structure for table `sunbird_tblfleet_vehicles`
--

CREATE TABLE `sunbird_tblfleet_vehicles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `vehicle_type_id` int DEFAULT NULL,
  `vehicle_group_id` int DEFAULT NULL,
  `status` text,
  `description` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `model` text,
  `year` text,
  `width` text,
  `height` text,
  `length` text,
  `interior_volume` text,
  `passenger_volume` text,
  `cargo_volume` text,
  `ground_clearance` text,
  `bed_length` text,
  `curb_weight` text,
  `gross_vehicle_weight_rating` text,
  `towing_capacity` text,
  `max_payload` text,
  `epa_city` text,
  `epa_highway` text,
  `epa_combined` text,
  `oil_capacity` text,
  `in_service_date` date DEFAULT NULL,
  `in_service_odometer` int DEFAULT NULL,
  `estimated_service_life_in_months` text,
  `estimated_service_life_in_meter` text,
  `estimated_resale_value` text,
  `out_of_service_date` date DEFAULT NULL,
  `out_of_service_odometer` int DEFAULT NULL,
  `vin` text,
  `license_plate` text,
  `make` text,
  `trim` text,
  `registration_state` text,
  `ownership` text,
  `color` text,
  `body_type` text,
  `body_subtype` text,
  `msrp` text,
  `purchase_vendor` int DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `purchase_price` decimal(15,2) DEFAULT NULL,
  `odometer` int DEFAULT NULL,
  `notes` text,
  `expiration_date` date DEFAULT NULL,
  `max_meter_value` text,
  `engine_summary` text,
  `engine_brand` text,
  `aspiration` text,
  `block_type` text,
  `bore` text,
  `cam_type` text,
  `compression` text,
  `cylinders` text,
  `displacement` text,
  `fuel_induction` text,
  `max_hp` text,
  `max_torque` text,
  `redline_rpm` text,
  `stroke` text,
  `valves` text,
  `transmission_summary` text,
  `transmission_brand` text,
  `transmission_type` text,
  `transmission_gears` text,
  `drive_type` text,
  `brake_system` text,
  `front_track_width` text,
  `rear_track_width` text,
  `wheelbase` text,
  `front_wheel_diameter` text,
  `rear_wheel_diameter` text,
  `rear_axle` text,
  `front_tire_type` text,
  `front_tire_psi` text,
  `rear_tire_type` text,
  `rear_tire_psi` text,
  `fuel_type` text,
  `fuel_quality` text,
  `fuel_tank_1_capacity` text,
  `fuel_tank_2_capacity` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_vehicles`
--


--
-- Table structure for table `sunbird_tblfleet_work_order_details`
--

CREATE TABLE `sunbird_tblfleet_work_order_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `work_order_id` int DEFAULT NULL,
  `part_id` int DEFAULT NULL,
  `item_name` text,
  `qty` int DEFAULT NULL,
  `price` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_work_order_details`
--


--
-- Table structure for table `sunbird_tblfleet_work_orders`
--

CREATE TABLE `sunbird_tblfleet_work_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` text NOT NULL,
  `number` text,
  `vehicle_id` int DEFAULT NULL,
  `driver_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `invoice_id` int DEFAULT NULL,
  `purchase_order_id` int DEFAULT NULL,
  `status` varchar(45) NOT NULL DEFAULT 'open',
  `issue_date` date DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `complete_date` date DEFAULT NULL,
  `odometer_in` int DEFAULT NULL,
  `odometer_out` int DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `work_requested` text,
  `notes` text,
  `datecreated` datetime DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `expense_id` int NOT NULL DEFAULT '0',
  `parts` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfleet_work_orders`
--


--
-- Table structure for table `sunbird_tblform_question_box`
--

CREATE TABLE `sunbird_tblform_question_box` (
  `boxid` int NOT NULL AUTO_INCREMENT,
  `boxtype` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `questionid` int NOT NULL,
  PRIMARY KEY (`boxid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblform_question_box`
--


--
-- Table structure for table `sunbird_tblform_question_box_description`
--

CREATE TABLE `sunbird_tblform_question_box_description` (
  `questionboxdescriptionid` int NOT NULL AUTO_INCREMENT,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `boxid` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `questionid` int NOT NULL,
  PRIMARY KEY (`questionboxdescriptionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblform_question_box_description`
--


--
-- Table structure for table `sunbird_tblform_questions`
--

CREATE TABLE `sunbird_tblform_questions` (
  `questionid` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `question` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `question_order` int NOT NULL,
  PRIMARY KEY (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblform_questions`
--


--
-- Table structure for table `sunbird_tblform_results`
--

CREATE TABLE `sunbird_tblform_results` (
  `resultid` int NOT NULL AUTO_INCREMENT,
  `boxid` int NOT NULL,
  `boxdescriptionid` int DEFAULT NULL,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `questionid` int NOT NULL,
  `answer` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `resultsetid` int NOT NULL,
  PRIMARY KEY (`resultid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblform_results`
--


--
-- Table structure for table `sunbird_tblfs_downloads`
--

CREATE TABLE `sunbird_tblfs_downloads` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hash_share` varchar(255) NOT NULL,
  `time` datetime NOT NULL,
  `ip` varchar(255) NOT NULL,
  `browser_name` varchar(45) DEFAULT NULL,
  `http_user_agent` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_downloads`
--


--
-- Table structure for table `sunbird_tblfs_file_overview`
--

CREATE TABLE `sunbird_tblfs_file_overview` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `fileid` varchar(255) NOT NULL,
  `type` varchar(20) DEFAULT NULL,
  `path` text,
  `number` int NOT NULL DEFAULT '0',
  `created_at` varchar(11) DEFAULT NULL,
  `inserted_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `hash` varchar(250) NOT NULL DEFAULT '',
  `dir` int NOT NULL DEFAULT '0',
  `hash_share` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_file_overview`
--


--
-- Table structure for table `sunbird_tblfs_genenal_ip_share`
--

CREATE TABLE `sunbird_tblfs_genenal_ip_share` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `parrent_id` varchar(11) NOT NULL,
  `ip_share` varchar(20) DEFAULT NULL,
  `inserted_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_genenal_ip_share`
--


--
-- Table structure for table `sunbird_tblfs_setting_configuration`
--

CREATE TABLE `sunbird_tblfs_setting_configuration` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(20) DEFAULT NULL,
  `is_read` int NOT NULL DEFAULT '0',
  `is_upload` int NOT NULL DEFAULT '0',
  `is_download` int NOT NULL DEFAULT '0',
  `is_delete` int NOT NULL DEFAULT '0',
  `is_write` int NOT NULL DEFAULT '0',
  `password` varchar(255) DEFAULT NULL,
  `max_size` int NOT NULL DEFAULT '2',
  `min_size` int NOT NULL DEFAULT '1',
  `created_at` varchar(11) DEFAULT NULL,
  `inserted_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `is_share` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_setting_configuration`
--


--
-- Table structure for table `sunbird_tblfs_setting_configuration_relationship`
--

CREATE TABLE `sunbird_tblfs_setting_configuration_relationship` (
  `id` int NOT NULL AUTO_INCREMENT,
  `configuration_id` int NOT NULL,
  `rel_type` varchar(45) NOT NULL,
  `rel_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_setting_configuration_relationship`
--


--
-- Table structure for table `sunbird_tblfs_sharing_relationship`
--

CREATE TABLE `sunbird_tblfs_sharing_relationship` (
  `id` int NOT NULL AUTO_INCREMENT,
  `share_id` int NOT NULL,
  `type` varchar(45) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_sharing_relationship`
--


--
-- Table structure for table `sunbird_tblfs_sharings`
--

CREATE TABLE `sunbird_tblfs_sharings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `is_read` int NOT NULL DEFAULT '0',
  `is_upload` int NOT NULL DEFAULT '0',
  `is_download` int NOT NULL DEFAULT '0',
  `is_delete` int NOT NULL DEFAULT '0',
  `is_write` int NOT NULL DEFAULT '0',
  `password` varchar(255) DEFAULT NULL,
  `expiration_date_apply` int DEFAULT NULL,
  `expiration_date` date DEFAULT NULL,
  `expiration_date_delete` int DEFAULT NULL,
  `download_limits_apply` int DEFAULT NULL,
  `download_limits` int DEFAULT NULL,
  `download_limits_delete` int DEFAULT NULL,
  `hash_share` varchar(255) DEFAULT NULL,
  `created_at` int NOT NULL,
  `type` varchar(45) NOT NULL,
  `inserted_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `isowner` tinyint DEFAULT NULL,
  `phash` text,
  `locked` tinyint DEFAULT NULL,
  `mime` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `read` tinyint DEFAULT NULL,
  `size` varchar(255) DEFAULT NULL,
  `ts` varchar(255) DEFAULT NULL,
  `write` tinyint DEFAULT NULL,
  `hash` text,
  `url` text,
  `has_been_deleted` int NOT NULL DEFAULT '0',
  `downloads` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblfs_sharings`
--


--
-- Table structure for table `sunbird_tblgdpr_requests`
--

CREATE TABLE `sunbird_tblgdpr_requests` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clientid` int NOT NULL DEFAULT '0',
  `contact_id` int NOT NULL DEFAULT '0',
  `lead_id` int NOT NULL DEFAULT '0',
  `request_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `request_date` datetime NOT NULL,
  `request_from` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblgdpr_requests`
--


--
-- Table structure for table `sunbird_tblgoals`
--

CREATE TABLE `sunbird_tblgoals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` varchar(191) NOT NULL,
  `description` text NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `goal_type` int NOT NULL,
  `contract_type` int NOT NULL DEFAULT '0',
  `achievement` int NOT NULL,
  `notify_when_fail` tinyint(1) NOT NULL DEFAULT '1',
  `notify_when_achieve` tinyint(1) NOT NULL DEFAULT '1',
  `notified` int NOT NULL DEFAULT '0',
  `staff_id` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoals`
--


--
-- Table structure for table `sunbird_tblgoods_delivery`
--

CREATE TABLE `sunbird_tblgoods_delivery` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `rel_type` int DEFAULT NULL COMMENT 'type goods delivery',
  `rel_document` int DEFAULT NULL COMMENT 'document id of goods delivery',
  `customer_code` text,
  `customer_name` varchar(100) DEFAULT NULL,
  `to_` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `description` text COMMENT 'the reason delivery',
  `staff_id` int DEFAULT NULL COMMENT 'salesman',
  `date_c` date DEFAULT NULL,
  `date_add` date DEFAULT NULL,
  `goods_delivery_code` varchar(100) DEFAULT NULL COMMENT 'số chứng từ xuất kho',
  `warehouse_id` int DEFAULT NULL,
  `total_money` varchar(200) DEFAULT NULL,
  `approval` int DEFAULT '0' COMMENT 'status approval ',
  `addedfrom` int DEFAULT NULL,
  `total_discount` varchar(100) DEFAULT NULL,
  `after_discount` varchar(100) DEFAULT NULL,
  `invoice_id` varchar(100) DEFAULT NULL,
  `project` text,
  `type` text,
  `department` int DEFAULT NULL,
  `requester` int DEFAULT NULL,
  `invoice_no` text,
  `pr_order_id` int DEFAULT NULL,
  `type_of_delivery` varchar(100) DEFAULT 'total',
  `additional_discount` decimal(15,2) DEFAULT '0.00',
  `sub_total` decimal(15,2) DEFAULT '0.00',
  `delivery_status` varchar(100) DEFAULT 'ready_for_packing',
  `shipping_fee` decimal(15,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_delivery`
--


--
-- Table structure for table `sunbird_tblgoods_delivery_detail`
--

CREATE TABLE `sunbird_tblgoods_delivery_detail` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `goods_delivery_id` int NOT NULL,
  `commodity_code` varchar(100) DEFAULT NULL,
  `commodity_name` text,
  `warehouse_id` text,
  `unit_id` text,
  `quantities` text,
  `unit_price` varchar(100) DEFAULT NULL,
  `total_money` varchar(200) DEFAULT NULL,
  `note` text,
  `discount` varchar(100) DEFAULT NULL,
  `discount_money` varchar(100) DEFAULT NULL,
  `available_quantity` varchar(100) DEFAULT NULL,
  `tax_id` varchar(100) DEFAULT NULL,
  `total_after_discount` varchar(100) DEFAULT NULL,
  `expiry_date` text,
  `lot_number` text,
  `guarantee_period` text,
  `tax_rate` text,
  `tax_name` text,
  `sub_total` decimal(15,2) DEFAULT '0.00',
  `packing_qty` decimal(15,2) DEFAULT '0.00',
  `serial_number` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_delivery_detail`
--


--
-- Table structure for table `sunbird_tblgoods_delivery_invoices_pr_orders`
--

CREATE TABLE `sunbird_tblgoods_delivery_invoices_pr_orders` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `rel_id` int DEFAULT NULL COMMENT 'goods_delivery_id',
  `rel_type` int DEFAULT NULL COMMENT 'invoice_id or purchase order id',
  `type` varchar(100) DEFAULT NULL COMMENT 'invoice,  purchase_orders',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_delivery_invoices_pr_orders`
--


--
-- Table structure for table `sunbird_tblgoods_receipt`
--

CREATE TABLE `sunbird_tblgoods_receipt` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `supplier_code` varchar(100) DEFAULT NULL,
  `supplier_name` text,
  `deliver_name` text,
  `buyer_id` int DEFAULT NULL,
  `description` text,
  `pr_order_id` int DEFAULT NULL COMMENT 'code puchase request agree',
  `date_c` date DEFAULT NULL,
  `date_add` date DEFAULT NULL,
  `goods_receipt_code` varchar(100) DEFAULT NULL,
  `warehouse_id` int DEFAULT NULL,
  `total_tax_money` varchar(100) DEFAULT NULL,
  `total_goods_money` varchar(100) DEFAULT NULL,
  `value_of_inventory` varchar(100) DEFAULT NULL,
  `total_money` varchar(100) DEFAULT NULL COMMENT 'total_money = total_tax_money +total_goods_money ',
  `addedfrom` int DEFAULT NULL,
  `approval` int DEFAULT '0',
  `project` text,
  `type` text,
  `department` int DEFAULT NULL,
  `requester` int DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `invoice_no` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_receipt`
--


--
-- Table structure for table `sunbird_tblgoods_receipt_detail`
--

CREATE TABLE `sunbird_tblgoods_receipt_detail` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `goods_receipt_id` int NOT NULL,
  `commodity_code` varchar(100) DEFAULT NULL,
  `commodity_name` text,
  `warehouse_id` text,
  `unit_id` text,
  `quantities` text,
  `unit_price` varchar(100) DEFAULT NULL,
  `tax` varchar(100) DEFAULT NULL,
  `tax_money` varchar(100) DEFAULT NULL,
  `goods_money` varchar(100) DEFAULT NULL,
  `date_manufacture` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `note` text,
  `discount` varchar(100) DEFAULT NULL,
  `discount_money` varchar(100) DEFAULT NULL,
  `lot_number` varchar(100) DEFAULT NULL,
  `tax_rate` text,
  `sub_total` decimal(15,2) DEFAULT '0.00',
  `tax_name` text,
  `serial_number` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_receipt_detail`
--


--
-- Table structure for table `sunbird_tblgoods_transaction_detail`
--

CREATE TABLE `sunbird_tblgoods_transaction_detail` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `goods_receipt_id` int DEFAULT NULL COMMENT 'id_goods_receipt_id or goods_delivery_id',
  `goods_id` int NOT NULL COMMENT ' is id commodity',
  `old_quantity` varchar(100) DEFAULT NULL,
  `quantity` varchar(100) DEFAULT NULL,
  `date_add` datetime DEFAULT NULL,
  `commodity_id` int NOT NULL,
  `warehouse_id` text NOT NULL,
  `note` text,
  `status` int DEFAULT NULL COMMENT '1:Goods receipt note 2:Goods delivery note',
  `purchase_price` varchar(100) DEFAULT NULL,
  `price` varchar(100) DEFAULT NULL,
  `expiry_date` text,
  `lot_number` text,
  `from_stock_name` int DEFAULT NULL,
  `to_stock_name` int DEFAULT NULL,
  `serial_number` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`,`commodity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgoods_transaction_detail`
--


--
-- Table structure for table `sunbird_tblgroup_checklist`
--

CREATE TABLE `sunbird_tblgroup_checklist` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_name` varchar(100) NOT NULL,
  `meta` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgroup_checklist`
--


--
-- Table structure for table `sunbird_tblgroup_checklist_allocation`
--

CREATE TABLE `sunbird_tblgroup_checklist_allocation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_name` varchar(100) NOT NULL,
  `meta` varchar(100) DEFAULT NULL,
  `staffid` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblgroup_checklist_allocation`
--


--
-- Table structure for table `sunbird_tblhr_allocation_asset`
--

CREATE TABLE `sunbird_tblhr_allocation_asset` (
  `allocation_id` int unsigned NOT NULL AUTO_INCREMENT,
  `staff_id` int unsigned NOT NULL,
  `asset_name` varchar(100) DEFAULT NULL,
  `assets_amount` int unsigned NOT NULL,
  `status_allocation` int unsigned DEFAULT '0' COMMENT '1: Allocated 0: Unallocated',
  PRIMARY KEY (`allocation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_allocation_asset`
--


--
-- Table structure for table `sunbird_tblhr_allowance_type`
--

CREATE TABLE `sunbird_tblhr_allowance_type` (
  `type_id` int unsigned NOT NULL AUTO_INCREMENT,
  `type_name` varchar(200) NOT NULL,
  `allowance_val` decimal(15,2) NOT NULL,
  `taxable` tinyint(1) NOT NULL,
  PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_allowance_type`
--


--
-- Table structure for table `sunbird_tblhr_checklist_allocation`
--

CREATE TABLE `sunbird_tblhr_checklist_allocation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `group_id` int DEFAULT NULL,
  `status` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_checklist_allocation`
--


--
-- Table structure for table `sunbird_tblhr_contract_template`
--

CREATE TABLE `sunbird_tblhr_contract_template` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text,
  `job_position` longtext,
  `content` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_contract_template`
--


--
-- Table structure for table `sunbird_tblhr_dependent_person`
--

CREATE TABLE `sunbird_tblhr_dependent_person` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `staffid` int unsigned DEFAULT NULL,
  `dependent_name` varchar(100) DEFAULT NULL,
  `relationship` varchar(100) DEFAULT NULL,
  `dependent_bir` date DEFAULT NULL,
  `start_month` date DEFAULT NULL,
  `end_month` date DEFAULT NULL,
  `dependent_iden` varchar(20) NOT NULL,
  `reason` longtext,
  `status` int unsigned DEFAULT '0',
  `status_comment` longtext,
  PRIMARY KEY (`id`,`dependent_iden`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_dependent_person`
--


--
-- Table structure for table `sunbird_tblhr_education`
--

CREATE TABLE `sunbird_tblhr_education` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int NOT NULL,
  `admin_id` int NOT NULL,
  `programe_id` int DEFAULT NULL,
  `training_programs_name` text NOT NULL,
  `training_places` text,
  `training_time_from` datetime DEFAULT NULL,
  `training_time_to` datetime DEFAULT NULL,
  `date_create` datetime DEFAULT NULL,
  `training_result` varchar(150) DEFAULT NULL,
  `degree` varchar(150) DEFAULT NULL,
  `notes` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_education`
--


--
-- Table structure for table `sunbird_tblhr_group_checklist_allocation`
--

CREATE TABLE `sunbird_tblhr_group_checklist_allocation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_name` varchar(100) NOT NULL,
  `meta` varchar(100) DEFAULT NULL,
  `staffid` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_group_checklist_allocation`
--


--
-- Table structure for table `sunbird_tblhr_job_p`
--

CREATE TABLE `sunbird_tblhr_job_p` (
  `job_id` int unsigned NOT NULL AUTO_INCREMENT,
  `job_name` varchar(100) DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_job_p`
--


--
-- Table structure for table `sunbird_tblhr_job_position`
--

CREATE TABLE `sunbird_tblhr_job_position` (
  `position_id` int unsigned NOT NULL AUTO_INCREMENT,
  `position_name` varchar(200) NOT NULL,
  `job_position_description` text,
  `job_p_id` int unsigned NOT NULL,
  `position_code` varchar(50) DEFAULT NULL,
  `department_id` text,
  PRIMARY KEY (`position_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_job_position`
--


--
-- Table structure for table `sunbird_tblhr_jp_interview_training`
--

CREATE TABLE `sunbird_tblhr_jp_interview_training` (
  `training_process_id` int unsigned NOT NULL AUTO_INCREMENT,
  `job_position_id` longtext,
  `training_name` varchar(100) DEFAULT NULL,
  `training_type` int DEFAULT NULL,
  `description` text,
  `date_add` datetime DEFAULT NULL,
  `position_training_id` text,
  `mint_point` int DEFAULT NULL,
  `additional_training` varchar(100) DEFAULT '',
  `staff_id` text,
  `time_to_start` date DEFAULT NULL,
  `time_to_end` date DEFAULT NULL,
  PRIMARY KEY (`training_process_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_jp_interview_training`
--


--
-- Table structure for table `sunbird_tblhr_jp_salary_scale`
--

CREATE TABLE `sunbird_tblhr_jp_salary_scale` (
  `salary_scale_id` int unsigned NOT NULL AUTO_INCREMENT,
  `job_position_id` int unsigned NOT NULL,
  `rel_type` varchar(100) DEFAULT NULL COMMENT 'salary:allowance:insurance',
  `rel_id` int DEFAULT NULL,
  `value` text,
  PRIMARY KEY (`salary_scale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_jp_salary_scale`
--


--
-- Table structure for table `sunbird_tblhr_knowedge_base_article_feedback`
--

CREATE TABLE `sunbird_tblhr_knowedge_base_article_feedback` (
  `articleanswerid` int NOT NULL AUTO_INCREMENT,
  `articleid` int NOT NULL,
  `answer` int NOT NULL,
  `ip` varchar(40) NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`articleanswerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_knowedge_base_article_feedback`
--


--
-- Table structure for table `sunbird_tblhr_knowledge_base`
--

CREATE TABLE `sunbird_tblhr_knowledge_base` (
  `articleid` int NOT NULL AUTO_INCREMENT,
  `articlegroup` int NOT NULL,
  `subject` mediumtext NOT NULL,
  `description` text NOT NULL,
  `slug` mediumtext NOT NULL,
  `active` tinyint NOT NULL,
  `datecreated` datetime NOT NULL,
  `article_order` int NOT NULL DEFAULT '0',
  `staff_article` int NOT NULL DEFAULT '0',
  `question_answers` int DEFAULT '0',
  `file_name` varchar(255) DEFAULT '',
  `curator` varchar(11) DEFAULT '',
  `benchmark` int DEFAULT '0',
  `score` int DEFAULT '0',
  PRIMARY KEY (`articleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_knowledge_base`
--


--
-- Table structure for table `sunbird_tblhr_knowledge_base_groups`
--

CREATE TABLE `sunbird_tblhr_knowledge_base_groups` (
  `groupid` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `group_slug` text,
  `description` mediumtext,
  `active` tinyint NOT NULL,
  `color` varchar(10) DEFAULT '#28B8DA',
  `group_order` int DEFAULT '0',
  PRIMARY KEY (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_knowledge_base_groups`
--


--
-- Table structure for table `sunbird_tblhr_list_staff_quitting_work`
--

CREATE TABLE `sunbird_tblhr_list_staff_quitting_work` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staffid` int DEFAULT NULL,
  `staff_name` text,
  `department_name` text,
  `role_name` text,
  `email` text,
  `dateoff` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `approval` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_list_staff_quitting_work`
--


--
-- Table structure for table `sunbird_tblhr_p_t_form_question_box`
--

CREATE TABLE `sunbird_tblhr_p_t_form_question_box` (
  `boxid` int NOT NULL AUTO_INCREMENT,
  `boxtype` varchar(10) NOT NULL,
  `questionid` int NOT NULL,
  PRIMARY KEY (`boxid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_p_t_form_question_box`
--


--
-- Table structure for table `sunbird_tblhr_p_t_form_question_box_description`
--

CREATE TABLE `sunbird_tblhr_p_t_form_question_box_description` (
  `questionboxdescriptionid` int NOT NULL AUTO_INCREMENT,
  `description` mediumtext NOT NULL,
  `boxid` mediumtext NOT NULL,
  `questionid` int NOT NULL,
  `correct` int DEFAULT '1' COMMENT '0: correct 1: incorrect',
  PRIMARY KEY (`questionboxdescriptionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_p_t_form_question_box_description`
--


--
-- Table structure for table `sunbird_tblhr_p_t_form_results`
--

CREATE TABLE `sunbird_tblhr_p_t_form_results` (
  `resultid` int NOT NULL AUTO_INCREMENT,
  `boxid` int NOT NULL,
  `boxdescriptionid` int DEFAULT NULL,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) DEFAULT NULL,
  `questionid` int NOT NULL,
  `answer` text,
  `resultsetid` int NOT NULL,
  PRIMARY KEY (`resultid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_p_t_form_results`
--


--
-- Table structure for table `sunbird_tblhr_p_t_surveyresultsets`
--

CREATE TABLE `sunbird_tblhr_p_t_surveyresultsets` (
  `resultsetid` int NOT NULL AUTO_INCREMENT,
  `trainingid` int NOT NULL,
  `ip` varchar(40) NOT NULL,
  `useragent` varchar(150) NOT NULL,
  `date` datetime NOT NULL,
  `staff_id` int unsigned NOT NULL,
  PRIMARY KEY (`resultsetid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_p_t_surveyresultsets`
--


--
-- Table structure for table `sunbird_tblhr_position_training`
--

CREATE TABLE `sunbird_tblhr_position_training` (
  `training_id` int NOT NULL AUTO_INCREMENT,
  `subject` mediumtext NOT NULL,
  `training_type` int unsigned NOT NULL,
  `slug` mediumtext NOT NULL,
  `description` text,
  `viewdescription` text,
  `datecreated` datetime NOT NULL,
  `redirect_url` varchar(100) DEFAULT NULL,
  `send` tinyint(1) NOT NULL DEFAULT '0',
  `onlyforloggedin` int DEFAULT '0',
  `fromname` varchar(100) DEFAULT NULL,
  `iprestrict` tinyint(1) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `hash` varchar(32) NOT NULL,
  `mint_point` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`training_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_position_training`
--


--
-- Table structure for table `sunbird_tblhr_position_training_question_form`
--

CREATE TABLE `sunbird_tblhr_position_training_question_form` (
  `questionid` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) DEFAULT NULL,
  `question` mediumtext NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `question_order` int NOT NULL,
  `point` int NOT NULL,
  PRIMARY KEY (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_position_training_question_form`
--


--
-- Table structure for table `sunbird_tblhr_procedure_retire`
--

CREATE TABLE `sunbird_tblhr_procedure_retire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_name` text,
  `option_name` text,
  `status` int DEFAULT '1',
  `people_handle_id` int NOT NULL,
  `procedure_retire_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_procedure_retire`
--


--
-- Table structure for table `sunbird_tblhr_procedure_retire_manage`
--

CREATE TABLE `sunbird_tblhr_procedure_retire_manage` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name_procedure_retire` text NOT NULL,
  `department` varchar(250) NOT NULL,
  `datecreator` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_procedure_retire_manage`
--


--
-- Table structure for table `sunbird_tblhr_procedure_retire_of_staff`
--

CREATE TABLE `sunbird_tblhr_procedure_retire_of_staff` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int DEFAULT NULL,
  `option_name` text,
  `status` int DEFAULT '0',
  `staffid` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_procedure_retire_of_staff`
--


--
-- Table structure for table `sunbird_tblhr_procedure_retire_of_staff_by_id`
--

CREATE TABLE `sunbird_tblhr_procedure_retire_of_staff_by_id` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_name` text,
  `people_handle_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_procedure_retire_of_staff_by_id`
--


--
-- Table structure for table `sunbird_tblhr_profile_option`
--

CREATE TABLE `sunbird_tblhr_profile_option` (
  `option_id` int unsigned NOT NULL AUTO_INCREMENT,
  `option_name` varchar(200) NOT NULL,
  `option_val` longtext,
  `auto` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`option_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_profile_option`
--

INSERT INTO `sunbird_tblhr_profile_option` VALUES (1,'job_position_prefix','#JOB',1),(2,'job_position_number','1',1),(3,'contract_code_prefix','#CONTRACT',1),(4,'contract_code_number','1',1),(5,'staff_code_prefix','EC',1),(6,'staff_code_number','1',1);

--
-- Table structure for table `sunbird_tblhr_rec_transfer_records`
--

CREATE TABLE `sunbird_tblhr_rec_transfer_records` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `staffid` int NOT NULL,
  `firstname` varchar(100) DEFAULT NULL,
  `lastname` varchar(100) DEFAULT NULL,
  `birthday` date DEFAULT NULL,
  `gender` varchar(11) DEFAULT NULL,
  `staff_identifi` varchar(20) DEFAULT NULL,
  `creator` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_rec_transfer_records`
--


--
-- Table structure for table `sunbird_tblhr_salary_form`
--

CREATE TABLE `sunbird_tblhr_salary_form` (
  `form_id` int unsigned NOT NULL AUTO_INCREMENT,
  `form_name` varchar(200) NOT NULL,
  `salary_val` decimal(15,2) NOT NULL,
  `tax` tinyint(1) NOT NULL,
  PRIMARY KEY (`form_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_salary_form`
--


--
-- Table structure for table `sunbird_tblhr_staff_contract`
--

CREATE TABLE `sunbird_tblhr_staff_contract` (
  `id_contract` int unsigned NOT NULL AUTO_INCREMENT,
  `contract_code` varchar(200) NOT NULL,
  `name_contract` int NOT NULL,
  `staff` int NOT NULL,
  `start_valid` date DEFAULT NULL,
  `end_valid` date DEFAULT NULL,
  `contract_status` varchar(100) DEFAULT NULL,
  `sign_day` date DEFAULT NULL,
  `staff_delegate` int DEFAULT NULL,
  `hourly_or_month` longtext,
  `content` longtext,
  `hash` varchar(32) DEFAULT NULL,
  `signature` varchar(40) DEFAULT NULL,
  `signer` int DEFAULT NULL,
  `staff_signature` varchar(40) DEFAULT NULL,
  `staff_sign_day` date DEFAULT NULL,
  PRIMARY KEY (`id_contract`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_staff_contract`
--


--
-- Table structure for table `sunbird_tblhr_staff_contract_detail`
--

CREATE TABLE `sunbird_tblhr_staff_contract_detail` (
  `contract_detail_id` int unsigned NOT NULL AUTO_INCREMENT,
  `staff_contract_id` int unsigned NOT NULL,
  `type` text,
  `rel_type` text,
  `rel_value` decimal(15,2) DEFAULT '0.00',
  `since_date` date DEFAULT NULL,
  `contract_note` text,
  PRIMARY KEY (`contract_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_staff_contract_detail`
--


--
-- Table structure for table `sunbird_tblhr_staff_contract_type`
--

CREATE TABLE `sunbird_tblhr_staff_contract_type` (
  `id_contracttype` int unsigned NOT NULL AUTO_INCREMENT,
  `name_contracttype` varchar(200) NOT NULL,
  `description` longtext,
  `duration` int DEFAULT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `insurance` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id_contracttype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_staff_contract_type`
--


--
-- Table structure for table `sunbird_tblhr_training_allocation`
--

CREATE TABLE `sunbird_tblhr_training_allocation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `training_process_id` varchar(100) NOT NULL,
  `staffid` int DEFAULT NULL,
  `training_type` int DEFAULT NULL,
  `date_add` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `training_name` varchar(150) DEFAULT NULL,
  `jp_interview_training_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_training_allocation`
--


--
-- Table structure for table `sunbird_tblhr_type_of_trainings`
--

CREATE TABLE `sunbird_tblhr_type_of_trainings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_type_of_trainings`
--

INSERT INTO `sunbird_tblhr_type_of_trainings` VALUES (1,'Basic training');

--
-- Table structure for table `sunbird_tblhr_views_tracking`
--

CREATE TABLE `sunbird_tblhr_views_tracking` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(40) NOT NULL,
  `date` datetime NOT NULL,
  `view_ip` varchar(40) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_views_tracking`
--


--
-- Table structure for table `sunbird_tblhr_workplace`
--

CREATE TABLE `sunbird_tblhr_workplace` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `workplace_address` varchar(400) DEFAULT NULL,
  `latitude` double DEFAULT NULL,
  `longitude` double DEFAULT NULL,
  `default` bit(1) NOT NULL DEFAULT b'0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblhr_workplace`
--


--
-- Table structure for table `sunbird_tblinternal_delivery_note`
--

CREATE TABLE `sunbird_tblinternal_delivery_note` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `internal_delivery_name` text,
  `description` text,
  `staff_id` int DEFAULT NULL,
  `date_c` date DEFAULT NULL,
  `date_add` date DEFAULT NULL,
  `internal_delivery_code` varchar(100) DEFAULT NULL,
  `approval` int DEFAULT '0' COMMENT 'status approval ',
  `addedfrom` int DEFAULT NULL,
  `total_amount` decimal(15,2) DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblinternal_delivery_note`
--


--
-- Table structure for table `sunbird_tblinternal_delivery_note_detail`
--

CREATE TABLE `sunbird_tblinternal_delivery_note_detail` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `internal_delivery_id` int NOT NULL,
  `commodity_code` varchar(100) DEFAULT NULL,
  `from_stock_name` text,
  `to_stock_name` text,
  `unit_id` text,
  `available_quantity` text,
  `quantities` text,
  `unit_price` varchar(100) DEFAULT NULL,
  `into_money` varchar(100) DEFAULT NULL,
  `note` text,
  `commodity_name` text,
  `serial_number` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblinternal_delivery_note_detail`
--


--
-- Table structure for table `sunbird_tblinventory_commodity_min`
--

CREATE TABLE `sunbird_tblinventory_commodity_min` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `commodity_id` int NOT NULL,
  `commodity_code` varchar(100) DEFAULT NULL,
  `commodity_name` varchar(100) DEFAULT NULL,
  `inventory_number_min` varchar(100) DEFAULT NULL,
  `inventory_number_max` varchar(100) DEFAULT '0',
  PRIMARY KEY (`id`,`commodity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblinventory_commodity_min`
--


--
-- Table structure for table `sunbird_tblinventory_manage`
--

CREATE TABLE `sunbird_tblinventory_manage` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `warehouse_id` int NOT NULL,
  `commodity_id` int NOT NULL,
  `inventory_number` varchar(100) DEFAULT NULL,
  `date_manufacture` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `lot_number` varchar(100) DEFAULT NULL,
  `purchase_price` decimal(15,2) DEFAULT '0.00',
  PRIMARY KEY (`id`,`commodity_id`,`warehouse_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblinventory_manage`
--


--
-- Table structure for table `sunbird_tblinvoicepaymentrecords`
--

CREATE TABLE `sunbird_tblinvoicepaymentrecords` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoiceid` int NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `paymentmode` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paymentmethod` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` date NOT NULL,
  `daterecorded` datetime NOT NULL,
  `note` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `transactionid` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `invoiceid` (`invoiceid`),
  KEY `paymentmethod` (`paymentmethod`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblinvoicepaymentrecords`
--


--
-- Table structure for table `sunbird_tblinvoices`
--

CREATE TABLE `sunbird_tblinvoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sent` tinyint(1) NOT NULL DEFAULT '0',
  `datesend` datetime DEFAULT NULL,
  `clientid` int NOT NULL,
  `deleted_customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number` int NOT NULL,
  `prefix` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number_format` int NOT NULL DEFAULT '0',
  `formatted_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `datecreated` datetime NOT NULL,
  `date` date NOT NULL,
  `duedate` date DEFAULT NULL,
  `currency` int NOT NULL,
  `subtotal` decimal(15,2) NOT NULL,
  `total_tax` decimal(15,2) NOT NULL DEFAULT '0.00',
  `total` decimal(15,2) NOT NULL,
  `adjustment` decimal(15,2) DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `hash` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int DEFAULT '1',
  `clientnote` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `adminnote` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `last_overdue_reminder` date DEFAULT NULL,
  `last_due_reminder` date DEFAULT NULL,
  `cancel_overdue_reminders` int NOT NULL DEFAULT '0',
  `allowed_payment_modes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `token` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `discount_percent` decimal(15,2) DEFAULT '0.00',
  `discount_total` decimal(15,2) DEFAULT '0.00',
  `discount_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `recurring` int NOT NULL DEFAULT '0',
  `recurring_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_recurring` tinyint(1) NOT NULL DEFAULT '0',
  `cycles` int NOT NULL DEFAULT '0',
  `total_cycles` int NOT NULL DEFAULT '0',
  `is_recurring_from` int DEFAULT NULL,
  `last_recurring_date` date DEFAULT NULL,
  `terms` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `sale_agent` int NOT NULL DEFAULT '0',
  `billing_street` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_zip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_country` int DEFAULT NULL,
  `shipping_street` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_zip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_country` int DEFAULT NULL,
  `include_shipping` tinyint(1) NOT NULL,
  `show_shipping_on_invoice` tinyint(1) NOT NULL DEFAULT '1',
  `show_quantity_as` int NOT NULL DEFAULT '1',
  `project_id` int DEFAULT '0',
  `subscription_id` int NOT NULL DEFAULT '0',
  `perfex_saas_packageid` int DEFAULT NULL,
  `short_link` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `from_fleet` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `currency` (`currency`),
  KEY `clientid` (`clientid`),
  KEY `project_id` (`project_id`),
  KEY `sale_agent` (`sale_agent`),
  KEY `total` (`total`),
  KEY `status` (`status`),
  KEY `formatted_number` (`formatted_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblinvoices`
--


--
-- Table structure for table `sunbird_tblitem_tax`
--

CREATE TABLE `sunbird_tblitem_tax` (
  `id` int NOT NULL AUTO_INCREMENT,
  `itemid` int NOT NULL,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `taxrate` decimal(15,2) NOT NULL,
  `taxname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `itemid` (`itemid`),
  KEY `rel_id` (`rel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblitem_tax`
--


--
-- Table structure for table `sunbird_tblitemable`
--

CREATE TABLE `sunbird_tblitemable` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `long_description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `qty` decimal(15,2) NOT NULL,
  `rate` decimal(15,2) NOT NULL,
  `unit` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_order` int DEFAULT NULL,
  `wh_delivered_quantity` decimal(15,2) DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `rel_id` (`rel_id`),
  KEY `rel_type` (`rel_type`),
  KEY `qty` (`qty`),
  KEY `rate` (`rate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblitemable`
--


--
-- Table structure for table `sunbird_tblitems`
--

CREATE TABLE `sunbird_tblitems` (
  `id` int NOT NULL AUTO_INCREMENT,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `long_description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `rate` decimal(15,2) NOT NULL,
  `tax` int DEFAULT NULL,
  `tax2` int DEFAULT NULL,
  `unit` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `group_id` int NOT NULL DEFAULT '0',
  `commodity_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `commodity_barcode` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `commodity_type` int DEFAULT NULL,
  `warehouse_id` int DEFAULT NULL,
  `origin` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `color_id` int DEFAULT NULL,
  `style_id` int DEFAULT NULL,
  `model_id` int DEFAULT NULL,
  `size_id` int DEFAULT NULL,
  `unit_id` int DEFAULT NULL,
  `sku_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sku_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` decimal(15,2) DEFAULT NULL,
  `sub_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `commodity_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `color` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `guarantee` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `profif_ratio` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `active` int DEFAULT '1',
  `long_descriptions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `without_checking_warehouse` int DEFAULT '0',
  `series_id` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `parent_id` int DEFAULT NULL,
  `attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `parent_attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `can_be_sold` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'can_be_sold',
  `can_be_purchased` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'can_be_purchased',
  `can_be_manufacturing` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'can_be_manufacturing',
  `can_be_inventory` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'can_be_inventory',
  `from_vendor_item` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tax` (`tax`),
  KEY `tax2` (`tax2`),
  KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblitems`
--


--
-- Table structure for table `sunbird_tblitems_groups`
--

CREATE TABLE `sunbird_tblitems_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `commodity_group_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int DEFAULT NULL,
  `display` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblitems_groups`
--

INSERT INTO `sunbird_tblitems_groups` VALUES (1,'Fleet: Parts','FLEET_PARTS',10,1,'');

--
-- Table structure for table `sunbird_tblitems_of_vendor`
--

CREATE TABLE `sunbird_tblitems_of_vendor` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `vendor_id` int NOT NULL,
  `description` text NOT NULL,
  `long_description` text,
  `rate` decimal(15,2) DEFAULT NULL,
  `tax` int DEFAULT NULL,
  `tax2` int DEFAULT NULL,
  `unit` varchar(40) DEFAULT NULL,
  `group_id` int NOT NULL,
  `commodity_code` varchar(100) NOT NULL,
  `commodity_barcode` text,
  `unit_id` int DEFAULT NULL,
  `sku_code` varchar(200) DEFAULT NULL,
  `sku_name` varchar(200) DEFAULT NULL,
  `sub_group` varchar(200) DEFAULT NULL,
  `active` int DEFAULT NULL,
  `parent` int DEFAULT NULL,
  `attributes` longtext,
  `parent_attributes` longtext,
  `commodity_type` int DEFAULT NULL,
  `origin` varchar(100) DEFAULT NULL,
  `commodity_name` varchar(200) NOT NULL,
  `series_id` text,
  `long_descriptions` longtext,
  `share_status` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblitems_of_vendor`
--


--
-- Table structure for table `sunbird_tblknowedge_base_article_feedback`
--

CREATE TABLE `sunbird_tblknowedge_base_article_feedback` (
  `articleanswerid` int NOT NULL AUTO_INCREMENT,
  `articleid` int NOT NULL,
  `answer` int NOT NULL,
  `ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`articleanswerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblknowedge_base_article_feedback`
--


--
-- Table structure for table `sunbird_tblknowledge_base`
--

CREATE TABLE `sunbird_tblknowledge_base` (
  `articleid` int NOT NULL AUTO_INCREMENT,
  `articlegroup` int NOT NULL,
  `subject` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint NOT NULL,
  `datecreated` datetime NOT NULL,
  `article_order` int NOT NULL DEFAULT '0',
  `staff_article` int NOT NULL DEFAULT '0',
  `question_answers` int DEFAULT '0',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `curator` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `benchmark` int DEFAULT '0',
  `score` int DEFAULT '0',
  PRIMARY KEY (`articleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblknowledge_base`
--


--
-- Table structure for table `sunbird_tblknowledge_base_groups`
--

CREATE TABLE `sunbird_tblknowledge_base_groups` (
  `groupid` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `group_slug` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `active` tinyint NOT NULL,
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#28B8DA',
  `group_order` int DEFAULT '0',
  PRIMARY KEY (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblknowledge_base_groups`
--


--
-- Table structure for table `sunbird_tbllead_activity_log`
--

CREATE TABLE `sunbird_tbllead_activity_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `leadid` int NOT NULL,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `additional_data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `date` datetime NOT NULL,
  `staffid` int NOT NULL,
  `full_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_activity` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tbllead_activity_log`
--


--
-- Table structure for table `sunbird_tbllead_integration_emails`
--

CREATE TABLE `sunbird_tbllead_integration_emails` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `body` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `dateadded` datetime NOT NULL,
  `leadid` int NOT NULL,
  `emailid` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tbllead_integration_emails`
--


--
-- Table structure for table `sunbird_tblleads`
--

CREATE TABLE `sunbird_tblleads` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hash` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `country` int NOT NULL DEFAULT '0',
  `zip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `assigned` int NOT NULL DEFAULT '0',
  `dateadded` datetime NOT NULL,
  `from_form_id` int NOT NULL DEFAULT '0',
  `status` int NOT NULL,
  `source` int NOT NULL,
  `lastcontact` datetime DEFAULT NULL,
  `dateassigned` date DEFAULT NULL,
  `last_status_change` datetime DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `leadorder` int DEFAULT '1',
  `phonenumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_converted` datetime DEFAULT NULL,
  `lost` tinyint(1) NOT NULL DEFAULT '0',
  `junk` int NOT NULL DEFAULT '0',
  `last_lead_status` int NOT NULL DEFAULT '0',
  `is_imported_from_email_integration` tinyint(1) NOT NULL DEFAULT '0',
  `email_integration_uid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `default_language` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `client_id` int NOT NULL DEFAULT '0',
  `lead_value` decimal(15,2) DEFAULT NULL,
  `vat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`),
  KEY `company` (`company`),
  KEY `email` (`email`),
  KEY `assigned` (`assigned`),
  KEY `status` (`status`),
  KEY `source` (`source`),
  KEY `lastcontact` (`lastcontact`),
  KEY `dateadded` (`dateadded`),
  KEY `leadorder` (`leadorder`),
  KEY `from_form_id` (`from_form_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblleads`
--


--
-- Table structure for table `sunbird_tblleads_email_integration`
--

CREATE TABLE `sunbird_tblleads_email_integration` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'the ID always must be 1',
  `active` int NOT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `imap_server` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `check_every` int NOT NULL DEFAULT '5',
  `responsible` int NOT NULL,
  `lead_source` int NOT NULL,
  `lead_status` int NOT NULL,
  `encryption` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `folder` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_run` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notify_lead_imported` tinyint(1) NOT NULL DEFAULT '1',
  `notify_lead_contact_more_times` tinyint(1) NOT NULL DEFAULT '1',
  `notify_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notify_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `mark_public` int NOT NULL DEFAULT '0',
  `only_loop_on_unseen_emails` tinyint(1) NOT NULL DEFAULT '1',
  `delete_after_import` int NOT NULL DEFAULT '0',
  `create_task_if_customer` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblleads_email_integration`
--

INSERT INTO `sunbird_tblleads_email_integration` VALUES (1,0,'','','',10,0,0,0,'tls','INBOX','',1,1,'assigned','',0,1,0,1);

--
-- Table structure for table `sunbird_tblleads_sources`
--

CREATE TABLE `sunbird_tblleads_sources` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblleads_sources`
--

INSERT INTO `sunbird_tblleads_sources` VALUES (2,'Facebook'),(1,'Google');

--
-- Table structure for table `sunbird_tblleads_status`
--

CREATE TABLE `sunbird_tblleads_status` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusorder` int DEFAULT NULL,
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#28B8DA',
  `isdefault` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblleads_status`
--

INSERT INTO `sunbird_tblleads_status` VALUES (1,'Customer',1000,'#7cb342',1);

--
-- Table structure for table `sunbird_tbllistemails`
--

CREATE TABLE `sunbird_tbllistemails` (
  `emailid` int NOT NULL AUTO_INCREMENT,
  `listid` int NOT NULL,
  `email` varchar(100) NOT NULL,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`emailid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tbllistemails`
--


--
-- Table structure for table `sunbird_tblmail_attachment`
--

CREATE TABLE `sunbird_tblmail_attachment` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `mail_id` int NOT NULL,
  `file_name` varchar(191) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `file_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `type` varchar(45) NOT NULL DEFAULT 'inbox',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmail_attachment`
--


--
-- Table structure for table `sunbird_tblmail_conversation`
--

CREATE TABLE `sunbird_tblmail_conversation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `outbox_id` int DEFAULT NULL,
  `lead_id` int DEFAULT NULL,
  `inbox_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmail_conversation`
--


--
-- Table structure for table `sunbird_tblmail_inbox`
--

CREATE TABLE `sunbird_tblmail_inbox` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `from_staff_id` int NOT NULL DEFAULT '0',
  `to_staff_id` int NOT NULL DEFAULT '0',
  `to` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cc` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `bcc` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `sender_name` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `subject` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `body` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `has_attachment` tinyint(1) NOT NULL DEFAULT '0',
  `date_received` datetime NOT NULL,
  `read` tinyint(1) NOT NULL DEFAULT '0',
  `folder` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'inbox',
  `stared` tinyint(1) NOT NULL DEFAULT '0',
  `important` tinyint(1) NOT NULL DEFAULT '0',
  `trash` tinyint(1) NOT NULL DEFAULT '0',
  `from_email` varchar(150) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmail_inbox`
--


--
-- Table structure for table `sunbird_tblmail_outbox`
--

CREATE TABLE `sunbird_tblmail_outbox` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `sender_staff_id` int NOT NULL DEFAULT '0',
  `to` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cc` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `bcc` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `sender_name` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `subject` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `body` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `has_attachment` tinyint(1) NOT NULL DEFAULT '0',
  `date_sent` datetime NOT NULL,
  `stared` tinyint(1) NOT NULL DEFAULT '0',
  `important` tinyint(1) NOT NULL DEFAULT '0',
  `trash` tinyint(1) NOT NULL DEFAULT '0',
  `reply_from_id` int DEFAULT NULL,
  `reply_type` varchar(45) NOT NULL DEFAULT 'inbox',
  `draft` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmail_outbox`
--


--
-- Table structure for table `sunbird_tblmail_queue`
--

CREATE TABLE `sunbird_tblmail_queue` (
  `id` int NOT NULL AUTO_INCREMENT,
  `engine` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cc` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `bcc` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `alt_message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('pending','sending','sent','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `headers` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `attachments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblmail_queue`
--


--
-- Table structure for table `sunbird_tblmaillistscustomfields`
--

CREATE TABLE `sunbird_tblmaillistscustomfields` (
  `customfieldid` int NOT NULL AUTO_INCREMENT,
  `listid` int NOT NULL,
  `fieldname` varchar(150) NOT NULL,
  `fieldslug` varchar(100) NOT NULL,
  PRIMARY KEY (`customfieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmaillistscustomfields`
--


--
-- Table structure for table `sunbird_tblmaillistscustomfieldvalues`
--

CREATE TABLE `sunbird_tblmaillistscustomfieldvalues` (
  `customfieldvalueid` int NOT NULL AUTO_INCREMENT,
  `listid` int NOT NULL,
  `customfieldid` int NOT NULL,
  `emailid` int NOT NULL,
  `value` varchar(100) NOT NULL,
  PRIMARY KEY (`customfieldvalueid`),
  KEY `listid` (`listid`),
  KEY `customfieldid` (`customfieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblmaillistscustomfieldvalues`
--


--
-- Table structure for table `sunbird_tblmigrations`
--

CREATE TABLE `sunbird_tblmigrations` (
  `version` bigint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblmigrations`
--

INSERT INTO `sunbird_tblmigrations` VALUES (320);

--
-- Table structure for table `sunbird_tblmilestones`
--

CREATE TABLE `sunbird_tblmilestones` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description_visible_to_customer` tinyint(1) DEFAULT '0',
  `start_date` date DEFAULT NULL,
  `due_date` date NOT NULL,
  `project_id` int NOT NULL,
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `milestone_order` int NOT NULL DEFAULT '0',
  `datecreated` date NOT NULL,
  `hide_from_customer` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblmilestones`
--


--
-- Table structure for table `sunbird_tblmodules`
--

CREATE TABLE `sunbird_tblmodules` (
  `id` int NOT NULL AUTO_INCREMENT,
  `module_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `installed_version` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblmodules`
--

INSERT INTO `sunbird_tblmodules` VALUES (1,'accounting','1.3.0',1),(2,'affiliate_management','1.0.7',1),(3,'menu_setup_client','1.0.1',1),(4,'contact_role','1.0.0',1),(5,'courier','1.0',1),(6,'exports','1.0.0',1),(7,'backup','2.3.0',1),(8,'disable_customer_panel','1.0.1',1),(9,'file_sharing','1.1.0',1),(10,'fleet','1.0.0',1),(11,'goals','2.3.0',1),(12,'hr_profile','1.0.7',1),(13,'imprest','1.0',1),(14,'mailbox','2.0.3',1),(15,'menu_setup','2.3.0',1),(16,'purchase','1.5.0',1),(17,'report_builder','1.0.0',1),(18,'ideal','1.0.0',0),(19,'surveys','2.3.0',1),(20,'theme_style','2.3.0',1),(21,'warehouse','1.3.9',1);

--
-- Table structure for table `sunbird_tblnewsfeed_comment_likes`
--

CREATE TABLE `sunbird_tblnewsfeed_comment_likes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `postid` int NOT NULL,
  `commentid` int NOT NULL,
  `userid` int NOT NULL,
  `dateliked` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnewsfeed_comment_likes`
--


--
-- Table structure for table `sunbird_tblnewsfeed_post_comments`
--

CREATE TABLE `sunbird_tblnewsfeed_post_comments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `userid` int NOT NULL,
  `postid` int NOT NULL,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnewsfeed_post_comments`
--


--
-- Table structure for table `sunbird_tblnewsfeed_post_likes`
--

CREATE TABLE `sunbird_tblnewsfeed_post_likes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `postid` int NOT NULL,
  `userid` int NOT NULL,
  `dateliked` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnewsfeed_post_likes`
--


--
-- Table structure for table `sunbird_tblnewsfeed_posts`
--

CREATE TABLE `sunbird_tblnewsfeed_posts` (
  `postid` int NOT NULL AUTO_INCREMENT,
  `creator` int NOT NULL,
  `datecreated` datetime NOT NULL,
  `visibility` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pinned` int NOT NULL,
  `datepinned` datetime DEFAULT NULL,
  PRIMARY KEY (`postid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnewsfeed_posts`
--


--
-- Table structure for table `sunbird_tblnotes`
--

CREATE TABLE `sunbird_tblnotes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `date_contacted` datetime DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `rel_id` (`rel_id`),
  KEY `rel_type` (`rel_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnotes`
--


--
-- Table structure for table `sunbird_tblnotifications`
--

CREATE TABLE `sunbird_tblnotifications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `isread` int NOT NULL DEFAULT '0',
  `isread_inline` tinyint(1) NOT NULL DEFAULT '0',
  `date` datetime NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fromuserid` int NOT NULL,
  `fromclientid` int NOT NULL DEFAULT '0',
  `from_fullname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `touserid` int NOT NULL,
  `fromcompany` int DEFAULT NULL,
  `link` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `additional_data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblnotifications`
--


--
-- Table structure for table `sunbird_tbloptions`
--

CREATE TABLE `sunbird_tbloptions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `autoload` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=613 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tbloptions`
--

INSERT INTO `sunbird_tbloptions` VALUES (1,'dateformat','Y-m-d|%Y-%m-%d',1),(2,'companyname','SUNBIRD ONTERNATIONAL LIMITED',1),(3,'services','1',1),(4,'maximum_allowed_ticket_attachments','4',1),(5,'ticket_attachments_file_extensions','.jpg,.png,.pdf,.doc,.zip,.rar',1),(6,'staff_access_only_assigned_departments','1',1),(7,'use_knowledge_base','1',1),(8,'smtp_email','',1),(9,'smtp_password','',1),(10,'company_info_format','{company_name}<br />\r\n      {address}<br />\r\n      {city} {state}<br />\r\n      {country_code} {zip_code}<br />\r\n      {vat_number_with_label}',0),(11,'smtp_port','',1),(12,'smtp_host','',1),(13,'smtp_email_charset','utf-8',1),(14,'default_timezone','Europe/Berlin',1),(15,'clients_default_theme','perfex',1),(16,'company_logo','',1),(17,'tables_pagination_limit','25',1),(18,'main_domain','',1),(19,'allow_registration','0',1),(20,'knowledge_base_without_registration','1',1),(21,'email_signature','',1),(22,'default_staff_role','1',1),(23,'newsfeed_maximum_files_upload','10',1),(24,'contract_expiration_before','4',1),(25,'invoice_prefix','INV-',1),(26,'decimal_separator','.',1),(27,'thousand_separator',',',1),(28,'invoice_company_name','',1),(29,'invoice_company_address','',1),(30,'invoice_company_city','',1),(31,'invoice_company_country_code','',1),(32,'invoice_company_postal_code','',1),(33,'invoice_company_phonenumber','',1),(34,'view_invoice_only_logged_in','0',1),(35,'invoice_number_format','1',1),(36,'next_invoice_number','1',0),(37,'active_language','english',1),(38,'invoice_number_decrement_on_delete','1',1),(39,'automatically_send_invoice_overdue_reminder_after','1',1),(40,'automatically_resend_invoice_overdue_reminder_after','3',1),(41,'expenses_auto_operations_hour','21',1),(42,'delete_only_on_last_invoice','1',1),(43,'delete_only_on_last_estimate','1',1),(44,'create_invoice_from_recurring_only_on_paid_invoices','0',1),(45,'allow_payment_amount_to_be_modified','1',1),(46,'rtl_support_client','0',1),(47,'limit_top_search_bar_results_to','10',1),(48,'estimate_prefix','EST-',1),(49,'next_estimate_number','1',0),(50,'estimate_number_decrement_on_delete','1',1),(51,'estimate_number_format','1',1),(52,'estimate_auto_convert_to_invoice_on_client_accept','1',1),(53,'exclude_estimate_from_client_area_with_draft_status','1',1),(54,'rtl_support_admin','0',1),(55,'last_cron_run','1738432571',1),(56,'show_sale_agent_on_estimates','1',1),(57,'show_sale_agent_on_invoices','1',1),(58,'predefined_terms_invoice','',1),(59,'predefined_terms_estimate','',1),(60,'default_task_priority','2',1),(61,'dropbox_app_key','',1),(62,'show_expense_reminders_on_calendar','1',1),(63,'only_show_contact_tickets','1',1),(64,'predefined_clientnote_invoice','',1),(65,'predefined_clientnote_estimate','',1),(66,'custom_pdf_logo_image_url','',1),(67,'favicon','',1),(68,'invoice_due_after','30',1),(69,'google_api_key','',1),(70,'google_calendar_main_calendar','',1),(71,'default_tax','a:0:{}',1),(72,'show_invoices_on_calendar','1',1),(73,'show_estimates_on_calendar','1',1),(74,'show_contracts_on_calendar','1',1),(75,'show_tasks_on_calendar','1',1),(76,'show_customer_reminders_on_calendar','1',1),(77,'output_client_pdfs_from_admin_area_in_client_language','0',1),(78,'show_lead_reminders_on_calendar','1',1),(79,'send_estimate_expiry_reminder_before','4',1),(80,'leads_default_source','',1),(81,'leads_default_status','',1),(82,'proposal_expiry_reminder_enabled','1',1),(83,'send_proposal_expiry_reminder_before','4',1),(84,'default_contact_permissions','a:6:{i:0;s:1:\"1\";i:1;s:1:\"2\";i:2;s:1:\"3\";i:3;s:1:\"4\";i:4;s:1:\"5\";i:5;s:1:\"6\";}',1),(85,'pdf_logo_width','150',1),(86,'access_tickets_to_none_staff_members','0',1),(87,'customer_default_country','',1),(88,'view_estimate_only_logged_in','0',1),(89,'show_status_on_pdf_ei','1',1),(90,'email_piping_only_replies','0',1),(91,'email_piping_only_registered','0',1),(92,'default_view_calendar','dayGridMonth',1),(93,'email_piping_default_priority','2',1),(94,'total_to_words_lowercase','0',1),(95,'show_tax_per_item','1',1),(96,'total_to_words_enabled','0',1),(97,'receive_notification_on_new_ticket','1',0),(98,'autoclose_tickets_after','0',1),(99,'media_max_file_size_upload','10',1),(100,'client_staff_add_edit_delete_task_comments_first_hour','0',1),(101,'show_projects_on_calendar','1',1),(102,'leads_kanban_limit','50',1),(103,'tasks_reminder_notification_before','2',1),(104,'pdf_font','freesans',1),(105,'pdf_table_heading_color','#323a45',1),(106,'pdf_table_heading_text_color','#ffffff',1),(107,'pdf_font_size','10',1),(108,'default_leads_kanban_sort','leadorder',1),(109,'default_leads_kanban_sort_type','asc',1),(110,'allowed_files','.png,.jpg,.pdf,.doc,.docx,.xls,.xlsx,.zip,.rar,.txt',1),(111,'show_all_tasks_for_project_member','1',1),(112,'email_protocol','smtp',1),(113,'calendar_first_day','0',1),(114,'recaptcha_secret_key','',1),(115,'show_help_on_setup_menu','1',1),(116,'show_proposals_on_calendar','1',1),(117,'smtp_encryption','',1),(118,'recaptcha_site_key','',1),(119,'smtp_username','',1),(120,'auto_stop_tasks_timers_on_new_timer','1',1),(121,'notification_when_customer_pay_invoice','1',1),(122,'calendar_invoice_color','#FF6F00',1),(123,'calendar_estimate_color','#FF6F00',1),(124,'calendar_proposal_color','#84c529',1),(125,'new_task_auto_assign_current_member','1',1),(126,'calendar_reminder_color','#03A9F4',1),(127,'calendar_contract_color','#B72974',1),(128,'calendar_project_color','#B72974',1),(129,'update_info_message','',1),(130,'show_estimate_reminders_on_calendar','1',1),(131,'show_invoice_reminders_on_calendar','1',1),(132,'show_proposal_reminders_on_calendar','1',1),(133,'proposal_due_after','7',1),(134,'allow_customer_to_change_ticket_status','0',1),(135,'lead_lock_after_convert_to_customer','0',1),(136,'default_proposals_pipeline_sort','pipeline_order',1),(137,'default_proposals_pipeline_sort_type','asc',1),(138,'default_estimates_pipeline_sort','pipeline_order',1),(139,'default_estimates_pipeline_sort_type','asc',1),(140,'use_recaptcha_customers_area','0',1),(141,'remove_decimals_on_zero','0',1),(142,'remove_tax_name_from_item_table','0',1),(143,'pdf_format_invoice','A4-PORTRAIT',1),(144,'pdf_format_estimate','A4-PORTRAIT',1),(145,'pdf_format_proposal','A4-PORTRAIT',1),(146,'pdf_format_payment','A4-PORTRAIT',1),(147,'pdf_format_contract','A4-PORTRAIT',1),(148,'swap_pdf_info','0',1),(149,'exclude_invoice_from_client_area_with_draft_status','1',1),(150,'cron_has_run_from_cli','1',1),(151,'hide_cron_is_required_message','0',0),(152,'auto_assign_customer_admin_after_lead_convert','1',1),(153,'show_transactions_on_invoice_pdf','1',1),(154,'show_pay_link_to_invoice_pdf','1',1),(155,'tasks_kanban_limit','50',1),(156,'purchase_key','',1),(157,'estimates_pipeline_limit','50',1),(158,'proposals_pipeline_limit','50',1),(159,'proposal_number_prefix','PRO-',1),(160,'number_padding_prefixes','6',1),(161,'show_page_number_on_pdf','0',1),(162,'calendar_events_limit','4',1),(163,'show_setup_menu_item_only_on_hover','0',1),(164,'company_requires_vat_number_field','1',1),(165,'company_is_required','1',1),(166,'allow_contact_to_delete_files','0',1),(167,'company_vat','',1),(168,'di','',1),(169,'invoice_auto_operations_hour','21',1),(170,'use_minified_files','1',1),(171,'only_own_files_contacts','0',1),(172,'allow_primary_contact_to_view_edit_billing_and_shipping','0',1),(173,'estimate_due_after','7',1),(174,'staff_members_open_tickets_to_all_contacts','1',1),(175,'time_format','24',1),(176,'delete_activity_log_older_then','1',1),(177,'disable_language','0',1),(178,'company_state','',1),(179,'email_header','<!doctype html>\r\n      <html>\r\n      <head>\r\n      <meta name=\"viewport\" content=\"width=device-width\" />\r\n      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\r\n      <style>\r\n      body {\r\n        background-color: #f6f6f6;\r\n        font-family: sans-serif;\r\n        -webkit-font-smoothing: antialiased;\r\n        font-size: 14px;\r\n        line-height: 1.4;\r\n        margin: 0;\r\n        padding: 0;\r\n        -ms-text-size-adjust: 100%;\r\n        -webkit-text-size-adjust: 100%;\r\n      }\r\n      table {\r\n        border-collapse: separate;\r\n        mso-table-lspace: 0pt;\r\n        mso-table-rspace: 0pt;\r\n        width: 100%;\r\n      }\r\n      table td {\r\n        font-family: sans-serif;\r\n        font-size: 14px;\r\n        vertical-align: top;\r\n      }\r\n      /* -------------------------------------\r\n      BODY & CONTAINER\r\n      ------------------------------------- */\r\n      .body {\r\n        background-color: #f6f6f6;\r\n        width: 100%;\r\n      }\r\n      /* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */\r\n      \r\n      .container {\r\n        display: block;\r\n        margin: 0 auto !important;\r\n        /* makes it centered */\r\n        max-width: 680px;\r\n        padding: 10px;\r\n        width: 680px;\r\n      }\r\n      /* This should also be a block element, so that it will fill 100% of the .container */\r\n      \r\n      .content {\r\n        box-sizing: border-box;\r\n        display: block;\r\n        margin: 0 auto;\r\n        max-width: 680px;\r\n        padding: 10px;\r\n      }\r\n      /* -------------------------------------\r\n      HEADER, FOOTER, MAIN\r\n      ------------------------------------- */\r\n      \r\n      .main {\r\n        background: #fff;\r\n        border-radius: 3px;\r\n        width: 100%;\r\n      }\r\n      .wrapper {\r\n        box-sizing: border-box;\r\n        padding: 20px;\r\n      }\r\n      .footer {\r\n        clear: both;\r\n        padding-top: 10px;\r\n        text-align: center;\r\n        width: 100%;\r\n      }\r\n      .footer td,\r\n      .footer p,\r\n      .footer span,\r\n      .footer a {\r\n        color: #999999;\r\n        font-size: 12px;\r\n        text-align: center;\r\n      }\r\n      hr {\r\n        border: 0;\r\n        border-bottom: 1px solid #f6f6f6;\r\n        margin: 20px 0;\r\n      }\r\n      /* -------------------------------------\r\n      RESPONSIVE AND MOBILE FRIENDLY STYLES\r\n      ------------------------------------- */\r\n      \r\n      @media only screen and (max-width: 620px) {\r\n        table[class=body] .content {\r\n          padding: 0 !important;\r\n        }\r\n        table[class=body] .container {\r\n          padding: 0 !important;\r\n          width: 100% !important;\r\n        }\r\n        table[class=body] .main {\r\n          border-left-width: 0 !important;\r\n          border-radius: 0 !important;\r\n          border-right-width: 0 !important;\r\n        }\r\n      }\r\n      </style>\r\n      </head>\r\n      <body class=\"\">\r\n      <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"body\">\r\n      <tr>\r\n      <td>&nbsp;</td>\r\n      <td class=\"container\">\r\n      <div class=\"content\">\r\n      <!-- START CENTERED WHITE CONTAINER -->\r\n      <table class=\"main\">\r\n      <!-- START MAIN CONTENT AREA -->\r\n      <tr>\r\n      <td class=\"wrapper\">\r\n      <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n      <tr>\r\n      <td>',1),(180,'show_pdf_signature_invoice','1',0),(181,'show_pdf_signature_estimate','1',0),(182,'signature_image','',0),(183,'email_footer','</td>\r\n      </tr>\r\n      </table>\r\n      </td>\r\n      </tr>\r\n      <!-- END MAIN CONTENT AREA -->\r\n      </table>\r\n      <!-- START FOOTER -->\r\n      <div class=\"footer\">\r\n      <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n      <tr>\r\n      <td class=\"content-block\">\r\n      <span>{companyname}</span>\r\n      </td>\r\n      </tr>\r\n      </table>\r\n      </div>\r\n      <!-- END FOOTER -->\r\n      <!-- END CENTERED WHITE CONTAINER -->\r\n      </div>\r\n      </td>\r\n      <td>&nbsp;</td>\r\n      </tr>\r\n      </table>\r\n      </body>\r\n      </html>',1),(184,'exclude_proposal_from_client_area_with_draft_status','1',1),(185,'pusher_app_key','',1),(186,'pusher_app_secret','',1),(187,'pusher_app_id','',1),(188,'pusher_realtime_notifications','0',1),(189,'pdf_format_statement','A4-PORTRAIT',1),(190,'pusher_cluster','',1),(191,'show_table_export_button','to_all',1),(192,'allow_staff_view_proposals_assigned','1',1),(193,'show_cloudflare_notice','1',0),(194,'task_modal_class','modal-lg',1),(195,'lead_modal_class','modal-lg',1),(196,'show_timesheets_overview_all_members_notice_admins','0',1),(197,'desktop_notifications','0',1),(198,'hide_notified_reminders_from_calendar','1',0),(199,'customer_info_format','{company_name}<br />\r\n      {street}<br />\r\n      {city} {state}<br />\r\n      {country_code} {zip_code}<br />\r\n      {vat_number_with_label}',0),(200,'timer_started_change_status_in_progress','1',0),(201,'default_ticket_reply_status','3',1),(202,'default_task_status','auto',1),(203,'email_queue_skip_with_attachments','1',1),(204,'email_queue_enabled','0',1),(205,'last_email_queue_retry','1738432571',1),(206,'auto_dismiss_desktop_notifications_after','0',1),(207,'proposal_info_format','{proposal_to}<br />\r\n      {address}<br />\r\n      {city} {state}<br />\r\n      {country_code} {zip_code}<br />\r\n      {phone}<br />\r\n      {email}',0),(208,'ticket_replies_order','asc',1),(209,'new_recurring_invoice_action','generate_and_send',0),(210,'bcc_emails','',0),(211,'email_templates_language_checks','',0),(212,'proposal_accept_identity_confirmation','1',0),(213,'estimate_accept_identity_confirmation','1',0),(214,'new_task_auto_follower_current_member','0',1),(215,'task_biillable_checked_on_creation','1',1),(216,'predefined_clientnote_credit_note','',1),(217,'predefined_terms_credit_note','',1),(218,'next_credit_note_number','1',1),(219,'credit_note_prefix','CN-',1),(220,'credit_note_number_decrement_on_delete','1',1),(221,'pdf_format_credit_note','A4-PORTRAIT',1),(222,'show_pdf_signature_credit_note','1',0),(223,'show_credit_note_reminders_on_calendar','1',1),(224,'show_amount_due_on_invoice','1',1),(225,'show_total_paid_on_invoice','1',1),(226,'show_credits_applied_on_invoice','1',1),(227,'staff_members_create_inline_lead_status','1',1),(228,'staff_members_create_inline_customer_groups','1',1),(229,'staff_members_create_inline_ticket_services','1',1),(230,'staff_members_save_tickets_predefined_replies','1',1),(231,'staff_members_create_inline_contract_types','1',1),(232,'staff_members_create_inline_expense_categories','1',1),(233,'show_project_on_credit_note','1',1),(234,'proposals_auto_operations_hour','21',1),(235,'estimates_auto_operations_hour','21',1),(236,'contracts_auto_operations_hour','21',1),(237,'credit_note_number_format','1',1),(238,'allow_non_admin_members_to_import_leads','0',1),(239,'e_sign_legal_text','By clicking on \"Sign\", I consent to be legally bound by this electronic representation of my signature.',1),(240,'show_pdf_signature_contract','1',1),(241,'view_contract_only_logged_in','0',1),(242,'show_subscriptions_in_customers_area','1',1),(243,'calendar_only_assigned_tasks','0',1),(244,'after_subscription_payment_captured','send_invoice_and_receipt',1),(245,'mail_engine','phpmailer',1),(246,'gdpr_enable_terms_and_conditions','0',1),(247,'privacy_policy','',1),(248,'terms_and_conditions','',1),(249,'gdpr_enable_terms_and_conditions_lead_form','0',1),(250,'gdpr_enable_terms_and_conditions_ticket_form','0',1),(251,'gdpr_contact_enable_right_to_be_forgotten','0',1),(252,'show_gdpr_in_customers_menu','1',1),(253,'show_gdpr_link_in_footer','1',1),(254,'enable_gdpr','0',1),(255,'gdpr_on_forgotten_remove_invoices_credit_notes','0',1),(256,'gdpr_on_forgotten_remove_estimates','0',1),(257,'gdpr_enable_consent_for_contacts','0',1),(258,'gdpr_consent_public_page_top_block','',1),(259,'gdpr_page_top_information_block','',1),(260,'gdpr_enable_lead_public_form','0',1),(261,'gdpr_show_lead_custom_fields_on_public_form','0',1),(262,'gdpr_lead_attachments_on_public_form','0',1),(263,'gdpr_enable_consent_for_leads','0',1),(264,'gdpr_lead_enable_right_to_be_forgotten','0',1),(265,'allow_staff_view_invoices_assigned','1',1),(266,'gdpr_data_portability_leads','0',1),(267,'gdpr_lead_data_portability_allowed','',1),(268,'gdpr_contact_data_portability_allowed','',1),(269,'gdpr_data_portability_contacts','0',1),(270,'allow_staff_view_estimates_assigned','1',1),(271,'gdpr_after_lead_converted_delete','0',1),(272,'gdpr_show_terms_and_conditions_in_footer','0',1),(273,'save_last_order_for_tables','0',1),(274,'company_logo_dark','',1),(275,'customers_register_require_confirmation','0',1),(276,'allow_non_admin_staff_to_delete_ticket_attachments','0',1),(277,'receive_notification_on_new_ticket_replies','1',0),(278,'google_client_id','',1),(279,'enable_google_picker','1',1),(280,'show_ticket_reminders_on_calendar','1',1),(281,'ticket_import_reply_only','0',1),(282,'visible_customer_profile_tabs','all',0),(283,'show_project_on_invoice','1',1),(284,'show_project_on_estimate','1',1),(285,'staff_members_create_inline_lead_source','1',1),(286,'lead_unique_validation','[\"email\"]',1),(287,'last_upgrade_copy_data','',1),(288,'custom_js_admin_scripts','',1),(289,'custom_js_customer_scripts','0',1),(290,'stripe_webhook_id','',1),(291,'stripe_webhook_signing_secret','',1),(292,'stripe_ideal_webhook_id','',1),(293,'stripe_ideal_webhook_signing_secret','',1),(294,'show_php_version_notice','0',0),(295,'recaptcha_ignore_ips','',1),(296,'show_task_reminders_on_calendar','1',1),(297,'customer_settings','true',1),(298,'tasks_reminder_notification_hour','21',1),(299,'allow_primary_contact_to_manage_other_contacts','0',1),(300,'items_table_amounts_exclude_currency_symbol','1',1),(301,'round_off_task_timer_option','0',1),(302,'round_off_task_timer_time','5',1),(303,'bitly_access_token','',1),(304,'enable_support_menu_badges','0',1),(305,'attach_invoice_to_payment_receipt_email','0',1),(306,'invoice_due_notice_before','2',1),(307,'invoice_due_notice_resend_after','0',1),(308,'_leads_settings','true',1),(309,'show_estimate_request_in_customers_area','0',1),(310,'gdpr_enable_terms_and_conditions_estimate_request_form','0',1),(311,'identification_key','20361855311738299250679c577239664',1),(312,'automatically_stop_task_timer_after_hours','8',1),(313,'automatically_assign_ticket_to_first_staff_responding','0',1),(314,'reminder_for_completed_but_not_billed_tasks','0',1),(315,'staff_notify_completed_but_not_billed_tasks','',1),(316,'reminder_for_completed_but_not_billed_tasks_days','',1),(317,'tasks_reminder_notification_last_notified_day','',1),(318,'staff_related_ticket_notification_to_assignee_only','0',1),(319,'show_pdf_signature_proposal','1',1),(320,'enable_honeypot_spam_validation','0',1),(321,'microsoft_mail_client_id','',1),(322,'microsoft_mail_client_secret','',1),(323,'microsoft_mail_azure_tenant_id','',1),(324,'google_mail_client_id','',1),(325,'google_mail_client_secret','',1),(326,'google_mail_refresh_token','',1),(327,'microsoft_mail_refresh_token','',1),(328,'automatically_set_logged_in_staff_sales_agent','1',1),(329,'contract_sign_reminder_every_days','0',1),(330,'last_updated_date','1738299107',1),(331,'v310_incompatible_tables','[]',1),(332,'required_register_fields','[]',0),(333,'allow_non_admin_members_to_delete_tickets_and_replies','0',1),(334,'allow_non_admin_members_to_edit_ticket_messages','0',1),(335,'proposal_auto_convert_to_invoice_on_client_accept','0',1),(336,'show_project_on_proposal','1',1),(338,'perfex_saas_installation_secured','true',0),(339,'sms_clickatell_api_key','',1),(340,'sms_clickatell_active','0',1),(341,'sms_clickatell_initialized','1',1),(342,'sms_msg91_sender_id','',1),(343,'sms_msg91_api_type','api',1),(344,'sms_msg91_auth_key','',1),(345,'sms_msg91_active','0',1),(346,'sms_msg91_initialized','1',1),(347,'sms_twilio_account_sid','',1),(348,'sms_twilio_auth_token','',1),(349,'sms_twilio_phone_number','',1),(350,'sms_twilio_sender_id','',1),(351,'sms_twilio_active','0',1),(352,'sms_twilio_initialized','1',1),(353,'disable_ticket_public_url','0',1),(354,'upgraded_from_version','316',1),(355,'acc_first_month_of_financial_year','January',1),(356,'acc_first_month_of_tax_year','same_as_financial_year',1),(357,'acc_accounting_method','accrual',1),(358,'acc_close_the_books','0',1),(359,'acc_allow_changes_after_viewing','allow_changes_after_viewing_a_warning',1),(360,'acc_close_book_password','',1),(361,'acc_close_book_passwordr','',1),(362,'acc_enable_account_numbers','0',1),(363,'acc_show_account_numbers','0',1),(364,'acc_closing_date','',1),(365,'acc_add_default_account','1',1),(366,'acc_add_default_account_new','0',1),(367,'acc_invoice_automatic_conversion','1',1),(368,'acc_payment_automatic_conversion','1',1),(369,'acc_credit_note_automatic_conversion','1',1),(370,'acc_credit_note_refund_automatic_conversion','1',1),(371,'acc_expense_automatic_conversion','1',1),(372,'acc_tax_automatic_conversion','1',1),(373,'acc_invoice_payment_account','66',1),(374,'acc_invoice_deposit_to','1',1),(375,'acc_payment_payment_account','1',1),(376,'acc_payment_deposit_to','13',1),(377,'acc_credit_note_payment_account','1',1),(378,'acc_credit_note_deposit_to','13',1),(379,'acc_credit_note_refund_payment_account','1',1),(380,'acc_credit_note_refund_deposit_to','13',1),(381,'acc_expense_payment_account','13',1),(382,'acc_expense_deposit_to','80',1),(383,'acc_tax_payment_account','29',1),(384,'acc_tax_deposit_to','1',1),(385,'acc_expense_tax_payment_account','13',1),(386,'acc_expense_tax_deposit_to','29',1),(387,'acc_active_payment_mode_mapping','1',1),(388,'acc_active_expense_category_mapping','1',1),(389,'acc_payment_expense_automatic_conversion','1',1),(390,'acc_payment_sale_automatic_conversion','1',1),(391,'acc_expense_payment_payment_account','1',1),(392,'acc_expense_payment_deposit_to','1',1),(393,'acc_pl_total_insurance_automatic_conversion','1',1),(394,'acc_pl_total_insurance_payment_account','13',1),(395,'acc_pl_total_insurance_deposit_to','32',1),(396,'acc_pl_tax_paye_automatic_conversion','1',1),(397,'acc_pl_tax_paye_payment_account','13',1),(398,'acc_pl_tax_paye_deposit_to','28',1),(399,'acc_pl_net_pay_automatic_conversion','1',1),(400,'acc_pl_net_pay_payment_account','13',1),(401,'acc_pl_net_pay_deposit_to','56',1),(402,'acc_wh_stock_import_automatic_conversion','1',1),(403,'acc_wh_stock_import_payment_account','87',1),(404,'acc_wh_stock_import_deposit_to','37',1),(405,'acc_wh_stock_export_automatic_conversion','1',1),(406,'acc_wh_stock_export_payment_account','37',1),(407,'acc_wh_stock_export_deposit_to','1',1),(408,'acc_wh_loss_adjustment_automatic_conversion','1',1),(409,'acc_wh_decrease_payment_account','37',1),(410,'acc_wh_decrease_deposit_to','1',1),(411,'acc_wh_increase_payment_account','87',1),(412,'acc_wh_increase_deposit_to','37',1),(413,'acc_wh_opening_stock_automatic_conversion','1',1),(414,'acc_wh_opening_stock_payment_account','88',1),(415,'acc_wh_opening_stock_deposit_to','37',1),(416,'acc_pur_order_automatic_conversion','1',1),(417,'acc_pur_order_payment_account','13',1),(418,'acc_pur_order_deposit_to','80',1),(419,'acc_pur_payment_automatic_conversion','1',1),(420,'acc_pur_payment_payment_account','16',1),(421,'acc_pur_payment_deposit_to','37',1),(422,'acc_mrp_manufacturing_order_automatic_conversion','1',1),(423,'acc_mrp_material_cost_payment_account','13',1),(424,'acc_mrp_material_cost_deposit_to','45',1),(425,'acc_mrp_labour_cost_payment_account','13',1),(426,'acc_mrp_labour_cost_deposit_to','18',1),(427,'acc_pur_order_return_automatic_conversion','1',1),(428,'acc_pur_order_return_payment_account','80',1),(429,'acc_pur_order_return_deposit_to','13',1),(430,'acc_pur_refund_automatic_conversion','1',1),(431,'acc_pur_refund_payment_account','37',1),(432,'acc_pur_refund_deposit_to','16',1),(433,'acc_pur_invoice_automatic_conversion','1',1),(434,'acc_pur_invoice_payment_account','13',1),(435,'acc_pur_invoice_deposit_to','80',1),(436,'acc_omni_sales_order_return_automatic_conversion','1',1),(437,'acc_omni_sales_order_return_payment_account','1',1),(438,'acc_omni_sales_order_return_deposit_to','66',1),(439,'acc_omni_sales_refund_automatic_conversion','1',1),(440,'acc_omni_sales_refund_payment_account','13',1),(441,'acc_omni_sales_refund_deposit_to','1',1),(442,'acc_routing_number_icon_a','a',1),(443,'acc_routing_number_icon_b','a',1),(444,'acc_bank_account_icon_a','a',1),(445,'acc_bank_account_icon_b','a',1),(446,'acc_current_check_no_icon_a','a',1),(447,'acc_current_check_no_icon_b','a',1),(448,'acc_check_type','type_1',1),(449,'acc_fe_asset_automatic_conversion','1',1),(450,'acc_fe_asset_payment_account','13',1),(451,'acc_fe_asset_deposit_to','1',1),(452,'acc_fe_license_automatic_conversion','1',1),(453,'acc_fe_license_payment_account','13',1),(454,'acc_fe_license_deposit_to','1',1),(455,'acc_fe_consumable_automatic_conversion','1',1),(456,'acc_fe_consumable_payment_account','13',1),(457,'acc_fe_consumable_deposit_to','1',1),(458,'acc_fe_component_automatic_conversion','1',1),(459,'acc_fe_component_payment_account','13',1),(460,'acc_fe_component_deposit_to','1',1),(461,'acc_fe_maintenance_automatic_conversion','1',1),(462,'acc_fe_maintenance_payment_account','13',1),(463,'acc_fe_maintenance_deposit_to','1',1),(464,'acc_fe_depreciation_automatic_conversion','1',1),(465,'acc_fe_depreciation_payment_account','13',1),(466,'acc_fe_depreciation_deposit_to','1',1),(467,'acc_wh_stock_export_profit_payment_account','66',1),(468,'acc_wh_stock_export_profit_deposit_to','1',1),(469,'update_bank_account_v124','1',1),(470,'update_income_statement_modifications_v125','1',1),(471,'acc_enable_income_statement_modifications','0',1),(472,'acc_invoice_discount_payment_account','1',1),(473,'acc_invoice_discount_deposit_to','19',1),(474,'acc_pur_tax_automatic_conversion','1',1),(475,'acc_pur_tax_payment_account','13',1),(476,'acc_pur_tax_deposit_to','29',1),(477,'acc_wh_stock_import_return_automatic_conversion','0',1),(478,'acc_wh_stock_import_return_payment_account','1',1),(479,'acc_wh_stock_import_return_deposit_to','37',1),(480,'acc_wh_stock_export_profit_automatic_conversion','1',1),(481,'affiliate_management_auto_approve_signup','1',1),(482,'affiliate_management_save_referral_client_info','1',1),(483,'affiliate_management_groups','{\"general\":{\"name\":\"General\",\"settings\":{\"affiliate_management_commission_enabled\":\"1\",\"affiliate_management_commission_rule\":\"first-invoice-payment\",\"affiliate_management_commission_type\":\"percent\",\"affiliate_management_commission_amount\":\"15\",\"affiliate_management_commission_cap\":\"-1\",\"affiliate_management_payout_min\":\"50\",\"affiliate_management_payout_methods\":\"bank, paypal\"}}}',1),(484,'affiliate_management_join_page_content','\n                    <div class=\"jumbotron text-center\">\n                        <h1>Welcome to Our Affiliate Program!</h1>\n                        <p>Join us and start earning today.</p>\n                        <a href=\"{SIGNUP_LINK}\" class=\"btn btn-primary btn-lg\">Join Now</a>\n                    </div>\n                    <div id=\"referral\" class=\"row\">\n                        <div class=\"col-md-6\">\n                            <h2>Referral Program</h2>\n                            <p>Join our referral program and start earning rewards!</p>\n                            <p>Earn {COMMISSION_AMOUNT} on every referral\'s first payment.</p>\n                            <p>Minimum payout is {MIN_PAYOUT}.</p>\n                        </div>\n                        <div class=\"col-md-6\">\n                            <h2>How It Works</h2>\n                            <p>1. Register for the affiliate program.</p>\n                            <p>2. Share your referral link with friends and colleagues.</p>\n                            <p>3. When someone signs up using your link and makes their first payment, you earn {COMMISSION_AMOUNT}.</p>\n                            <p>4. Once your earnings reach {MIN_PAYOUT}, you can request a payout.</p>\n                        </div>\n                    </div>\n                ',1),(485,'affiliate_management_affiliate_model','first-click',1),(486,'affiliate_management_enable_referral_removal','0',1),(487,'menu_setup_client_client_menu_active','[]',1),(488,'auto_backup_enabled','0',1),(489,'auto_backup_every','7',1),(490,'last_auto_backup','',1),(491,'delete_backups_older_then','0',1),(492,'auto_backup_hour','6',1),(493,'fs_global_max_size','2',1),(494,'fs_global_extension','.jpg,.png,.pdf,.doc,.zip,.rar',1),(495,'fs_global_amount_expiration','3',1),(496,'fs_global_notification','1',1),(497,'fs_global_email','0',1),(498,'fs_client_visible','0',1),(499,'fs_permisstion_staff_view','1',1),(500,'fs_permisstion_staff_upload_and_override','1',1),(501,'fs_permisstion_staff_delete','1',1),(502,'fs_permisstion_staff_upload','1',1),(503,'fs_permisstion_staff_download','1',1),(504,'fs_permisstion_staff_share','1',1),(505,'fs_permisstion_client_view','1',1),(506,'fs_permisstion_client_upload_and_override','1',1),(507,'fs_permisstion_client_delete','1',1),(508,'fs_permisstion_client_upload','1',1),(509,'fs_permisstion_client_download','1',1),(510,'file_sharing_security','?3HTtb?HgTA@%7zm',1),(511,'fs_the_administrator_of_the_public_folder','',1),(512,'fs_allow_file_editing','1',1),(513,'fs_hidden_files','.tmb,index.html',1),(514,'fs_permisstion_staff_share_to_client','1',1),(515,'hr_profile_hide_menu','1',1),(516,'mailbox_enabled','1',1),(517,'mailbox_imap_server','',1),(518,'mailbox_encryption','',1),(519,'mailbox_folder_scan','Inbox',1),(520,'mailbox_check_every','3',1),(521,'mailbox_only_loop_on_unseen_emails','1',1),(522,'aside_menu_active','[]',1),(523,'setup_menu_active','[]',1),(524,'survey_send_emails_per_cron_run','100',1),(525,'last_survey_send_cron','',1),(526,'theme_style','[]',1),(527,'theme_style_custom_admin_area','',1),(528,'theme_style_custom_clients_area','',1),(529,'theme_style_custom_clients_and_admin_area','',1),(530,'warehouse_selling_price_rule_profif_ratio','0',1),(531,'profit_rate_by_purchase_price_sale','0',1),(532,'warehouse_the_fractional_part','0',1),(533,'warehouse_integer_part','0',1),(534,'auto_create_goods_received','0',1),(535,'auto_create_goods_delivery','0',1),(536,'goods_receipt_warehouse','0',1),(537,'barcode_with_sku_code','0',1),(538,'revert_goods_receipt_goods_delivery','0',1),(539,'cancelled_invoice_reverse_inventory_delivery_voucher','0',1),(540,'uncancelled_invoice_create_inventory_delivery_voucher','0',1),(541,'inventory_auto_operations_hour','0',1),(542,'automatically_send_items_expired_before','0',1),(543,'inventorys_cronjob_active','0',1),(544,'inventory_cronjob_notification_recipients','',1),(545,'inventory_received_number_prefix','NK',1),(546,'next_inventory_received_mumber','1',1),(547,'inventory_delivery_number_prefix','XK',1),(548,'next_inventory_delivery_mumber','1',1),(549,'internal_delivery_number_prefix','ID',1),(550,'next_internal_delivery_mumber','1',1),(551,'item_sku_prefix','',1),(552,'goods_receipt_required_po','0',1),(553,'goods_delivery_required_po','0',1),(554,'goods_delivery_pdf_display','0',1),(555,'display_product_name_when_print_barcode','0',1),(556,'show_item_cf_on_pdf','0',1),(557,'goods_delivery_pdf_display_outstanding','0',1),(558,'goods_delivery_pdf_display_warehouse_lotnumber_bottom_infor','0',1),(559,'packing_list_number_prefix','PL',1),(560,'next_packing_list_number','1',1),(561,'wh_return_request_within_x_day','30',1),(562,'wh_fee_for_return_order','0',1),(563,'wh_return_policies_information','',1),(564,'wh_refund_loyaty_point','1',1),(565,'order_return_number_prefix','ReReturn',1),(566,'next_order_return_number','1',1),(567,'e_order_return_number_prefix','DEReturn',1),(568,'e_next_order_return_number','1',1),(569,'warehouse_receive_return_order ','0',1),(570,'wh_display_shipment_on_client_portal','1',1),(571,'wh_on_total_items','200',1),(572,'wh_products_by_serial','1',1),(573,'wh_shortened_form_pdf','0',1),(574,'wh_show_price_when_print_barcode','1',1),(575,'notify_customer_when_change_delivery_status','1',1),(576,'wh_hide_shipping_fee','0',1),(577,'lot_number_prefix','LOT',1),(578,'next_lot_number','1',1),(579,'auto_generate_lotnumber','0',1),(580,'custom_name_for_meter','m',1),(581,'custom_name_for_kg','kg',1),(582,'custom_name_for_m3','m3',1),(583,'packing_list_pdf_display_rate','1',1),(584,'packing_list_pdf_display_tax','1',1),(585,'packing_list_pdf_display_subtotal','1',1),(586,'packing_list_pdf_display_discount_percent','1',1),(587,'packing_list_pdf_display_discount_amount','1',1),(588,'packing_list_pdf_display_totalpayment','1',1),(589,'packing_list_pdf_display_summary','1',1),(590,'pur_invoice_auto_operations_hour','21',1),(591,'next_debit_note_number','1',1),(592,'debit_note_number_format','1',1),(593,'debit_note_prefix','DN-',1),(594,'show_purchase_tax_column','1',1),(595,'po_only_prefix_and_number','0',1),(596,'cr_date_cronjob_currency_rates','2025-02-01',1),(597,'cr_automatically_get_currency_rate','1',1),(598,'cr_global_amount_expiration','0',1),(599,'pur_return_request_within_x_day','30',1),(600,'pur_fee_for_return_order','0',1),(601,'pur_return_policies_information','',1),(602,'pur_order_return_number_prefix','OReturn',1),(603,'next_pur_order_return_number','1',1),(604,'send_email_welcome_for_new_contact','1',1),(605,'reset_purchase_order_number_every_month','1',1),(606,'pur_company_address','',1),(607,'pur_company_city','',1),(608,'pur_company_state','',1),(609,'pur_company_zipcode','',1),(610,'pur_company_country_code','',1),(611,'allow_vendors_to_register','1',1),(612,'pur_company_country_text','',1);

--
-- Table structure for table `sunbird_tblp_t_form_question_box_description`
--

CREATE TABLE `sunbird_tblp_t_form_question_box_description` (
  `questionboxdescriptionid` int NOT NULL AUTO_INCREMENT,
  `description` mediumtext NOT NULL,
  `boxid` mediumtext NOT NULL,
  `questionid` int NOT NULL,
  `correct` int DEFAULT '1' COMMENT '0: correct 1: incorrect',
  PRIMARY KEY (`questionboxdescriptionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblp_t_form_question_box_description`
--


--
-- Table structure for table `sunbird_tblpayment_attempts`
--

CREATE TABLE `sunbird_tblpayment_attempts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_id` int NOT NULL,
  `amount` double NOT NULL,
  `fee` double NOT NULL,
  `payment_gateway` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblpayment_attempts`
--


--
-- Table structure for table `sunbird_tblpayment_modes`
--

CREATE TABLE `sunbird_tblpayment_modes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `show_on_pdf` int NOT NULL DEFAULT '0',
  `invoices_only` int NOT NULL DEFAULT '0',
  `expenses_only` int NOT NULL DEFAULT '0',
  `selected_by_default` int NOT NULL DEFAULT '1',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblpayment_modes`
--

INSERT INTO `sunbird_tblpayment_modes` VALUES (1,'Bank',NULL,0,0,0,1,1);

--
-- Table structure for table `sunbird_tblpinned_projects`
--

CREATE TABLE `sunbird_tblpinned_projects` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `staff_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `project_id` (`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblpinned_projects`
--


--
-- Table structure for table `sunbird_tblposition_training_question_form`
--

CREATE TABLE `sunbird_tblposition_training_question_form` (
  `questionid` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(20) DEFAULT NULL,
  `question` mediumtext NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `question_order` int NOT NULL,
  `point` int NOT NULL,
  PRIMARY KEY (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblposition_training_question_form`
--


--
-- Table structure for table `sunbird_tblproject_activity`
--

CREATE TABLE `sunbird_tblproject_activity` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `staff_id` int NOT NULL DEFAULT '0',
  `contact_id` int NOT NULL DEFAULT '0',
  `fullname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `visible_to_customer` int NOT NULL DEFAULT '0',
  `description_key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Language file key',
  `additional_data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproject_activity`
--


--
-- Table structure for table `sunbird_tblproject_files`
--

CREATE TABLE `sunbird_tblproject_files` (
  `id` int NOT NULL AUTO_INCREMENT,
  `file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_file_name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `filetype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dateadded` datetime NOT NULL,
  `last_activity` datetime DEFAULT NULL,
  `project_id` int NOT NULL,
  `visible_to_customer` tinyint(1) DEFAULT '0',
  `staffid` int NOT NULL,
  `contact_id` int NOT NULL DEFAULT '0',
  `external` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `external_link` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `thumbnail_link` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproject_files`
--


--
-- Table structure for table `sunbird_tblproject_members`
--

CREATE TABLE `sunbird_tblproject_members` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `staff_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `project_id` (`project_id`),
  KEY `sunbird_staff_id` (`staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproject_members`
--


--
-- Table structure for table `sunbird_tblproject_notes`
--

CREATE TABLE `sunbird_tblproject_notes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `staff_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproject_notes`
--


--
-- Table structure for table `sunbird_tblproject_settings`
--

CREATE TABLE `sunbird_tblproject_settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `project_id` (`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproject_settings`
--


--
-- Table structure for table `sunbird_tblprojectdiscussioncomments`
--

CREATE TABLE `sunbird_tblprojectdiscussioncomments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `discussion_id` int NOT NULL,
  `discussion_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent` int DEFAULT NULL,
  `created` datetime NOT NULL,
  `modified` datetime DEFAULT NULL,
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `staff_id` int NOT NULL,
  `contact_id` int DEFAULT '0',
  `fullname` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `file_mime_type` varchar(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblprojectdiscussioncomments`
--


--
-- Table structure for table `sunbird_tblprojectdiscussions`
--

CREATE TABLE `sunbird_tblprojectdiscussions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_id` int NOT NULL,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `show_to_customer` tinyint(1) NOT NULL DEFAULT '0',
  `datecreated` datetime NOT NULL,
  `last_activity` datetime DEFAULT NULL,
  `staff_id` int NOT NULL DEFAULT '0',
  `contact_id` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblprojectdiscussions`
--


--
-- Table structure for table `sunbird_tblprojects`
--

CREATE TABLE `sunbird_tblprojects` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` int NOT NULL DEFAULT '0',
  `clientid` int NOT NULL,
  `billing_type` int NOT NULL,
  `start_date` date NOT NULL,
  `deadline` date DEFAULT NULL,
  `project_created` date NOT NULL,
  `date_finished` datetime DEFAULT NULL,
  `progress` int DEFAULT '0',
  `progress_from_tasks` int NOT NULL DEFAULT '1',
  `project_cost` decimal(15,2) DEFAULT NULL,
  `project_rate_per_hour` decimal(15,2) DEFAULT NULL,
  `estimated_hours` decimal(15,2) DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `contact_notification` int DEFAULT '1',
  `notify_contacts` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `clientid` (`clientid`),
  KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblprojects`
--


--
-- Table structure for table `sunbird_tblproposal_comments`
--

CREATE TABLE `sunbird_tblproposal_comments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `proposalid` int NOT NULL,
  `staffid` int NOT NULL,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproposal_comments`
--


--
-- Table structure for table `sunbird_tblproposals`
--

CREATE TABLE `sunbird_tblproposals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `addedfrom` int NOT NULL,
  `datecreated` datetime NOT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `subtotal` decimal(15,2) NOT NULL,
  `total_tax` decimal(15,2) NOT NULL DEFAULT '0.00',
  `adjustment` decimal(15,2) DEFAULT NULL,
  `discount_percent` decimal(15,2) NOT NULL,
  `discount_total` decimal(15,2) NOT NULL,
  `discount_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_quantity_as` int NOT NULL DEFAULT '1',
  `currency` int NOT NULL,
  `open_till` date DEFAULT NULL,
  `date` date NOT NULL,
  `rel_id` int DEFAULT NULL,
  `rel_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `assigned` int DEFAULT NULL,
  `hash` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `proposal_to` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` int DEFAULT NULL,
  `country` int NOT NULL DEFAULT '0',
  `zip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `allow_comments` tinyint(1) NOT NULL DEFAULT '1',
  `status` int NOT NULL,
  `estimate_id` int DEFAULT NULL,
  `invoice_id` int DEFAULT NULL,
  `date_converted` datetime DEFAULT NULL,
  `pipeline_order` int DEFAULT '1',
  `is_expiry_notified` int NOT NULL DEFAULT '0',
  `acceptance_firstname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_lastname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acceptance_date` datetime DEFAULT NULL,
  `acceptance_ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `signature` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `short_link` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `processing` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblproposals`
--


--
-- Table structure for table `sunbird_tblpur_activity_log`
--

CREATE TABLE `sunbird_tblpur_activity_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(45) NOT NULL,
  `staffid` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `note` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_activity_log`
--


--
-- Table structure for table `sunbird_tblpur_approval_details`
--

CREATE TABLE `sunbird_tblpur_approval_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(45) NOT NULL,
  `staffid` varchar(45) DEFAULT NULL,
  `approve` varchar(45) DEFAULT NULL,
  `note` text,
  `date` datetime DEFAULT NULL,
  `approve_action` varchar(255) DEFAULT NULL,
  `reject_action` varchar(255) DEFAULT NULL,
  `approve_value` varchar(255) DEFAULT NULL,
  `reject_value` varchar(255) DEFAULT NULL,
  `staff_approve` int DEFAULT NULL,
  `action` varchar(45) DEFAULT NULL,
  `sender` int DEFAULT NULL,
  `date_send` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_approval_details`
--


--
-- Table structure for table `sunbird_tblpur_approval_setting`
--

CREATE TABLE `sunbird_tblpur_approval_setting` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `related` varchar(255) NOT NULL,
  `setting` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_approval_setting`
--


--
-- Table structure for table `sunbird_tblpur_comments`
--

CREATE TABLE `sunbird_tblpur_comments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `content` mediumtext,
  `rel_type` varchar(50) NOT NULL,
  `rel_id` int DEFAULT NULL,
  `staffid` int NOT NULL,
  `dateadded` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_comments`
--


--
-- Table structure for table `sunbird_tblpur_contacts`
--

CREATE TABLE `sunbird_tblpur_contacts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `userid` int NOT NULL,
  `is_primary` int NOT NULL DEFAULT '1',
  `firstname` varchar(191) NOT NULL,
  `lastname` varchar(191) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phonenumber` varchar(100) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `datecreated` datetime NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `new_pass_key` varchar(32) DEFAULT NULL,
  `new_pass_key_requested` datetime DEFAULT NULL,
  `email_verified_at` datetime DEFAULT NULL,
  `email_verification_key` varchar(32) DEFAULT NULL,
  `email_verification_sent_at` datetime DEFAULT NULL,
  `last_ip` varchar(40) DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `last_password_change` datetime DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `profile_image` varchar(191) DEFAULT NULL,
  `direction` varchar(3) DEFAULT NULL,
  `invoice_emails` tinyint(1) NOT NULL DEFAULT '1',
  `estimate_emails` tinyint(1) NOT NULL DEFAULT '1',
  `credit_note_emails` tinyint(1) NOT NULL DEFAULT '1',
  `contract_emails` tinyint(1) NOT NULL DEFAULT '1',
  `task_emails` tinyint(1) NOT NULL DEFAULT '1',
  `project_emails` tinyint(1) NOT NULL DEFAULT '1',
  `ticket_emails` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_contacts`
--


--
-- Table structure for table `sunbird_tblpur_contracts`
--

CREATE TABLE `sunbird_tblpur_contracts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `contract_number` varchar(200) NOT NULL,
  `contract_name` varchar(200) NOT NULL,
  `content` longtext,
  `vendor` int NOT NULL,
  `pur_order` int NOT NULL,
  `contract_value` decimal(15,2) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `buyer` int DEFAULT NULL,
  `time_payment` date DEFAULT NULL,
  `add_from` int NOT NULL,
  `signed` int NOT NULL DEFAULT '0',
  `note` longtext,
  `signer` int DEFAULT NULL,
  `signed_date` date DEFAULT NULL,
  `signed_status` varchar(50) DEFAULT NULL,
  `service_category` text,
  `project` int DEFAULT NULL,
  `payment_terms` text,
  `payment_amount` decimal(15,2) DEFAULT NULL,
  `payment_cycle` varchar(50) DEFAULT NULL,
  `department` int DEFAULT NULL,
  `signature` text,
  `marked_as_signed` tinyint(1) DEFAULT '0',
  `acceptance_firstname` text,
  `acceptance_lastname` text,
  `acceptance_email` text,
  `acceptance_date` datetime DEFAULT NULL,
  `acceptance_ip` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_contracts`
--


--
-- Table structure for table `sunbird_tblpur_debit_notes`
--

CREATE TABLE `sunbird_tblpur_debit_notes` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `vendorid` int DEFAULT NULL,
  `deleted_vendor_name` varchar(100) DEFAULT NULL,
  `number` int DEFAULT NULL,
  `prefix` varchar(50) DEFAULT NULL,
  `number_format` int DEFAULT NULL,
  `datecreated` datetime DEFAULT NULL,
  `date` date DEFAULT NULL,
  `adminnote` text,
  `terms` text,
  `vendornote` text,
  `currency` int DEFAULT NULL,
  `subtotal` decimal(15,2) DEFAULT NULL,
  `total_tax` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `adjustment` decimal(15,2) DEFAULT NULL,
  `addedfrom` int DEFAULT NULL,
  `status` int DEFAULT NULL,
  `discount_percent` decimal(15,2) DEFAULT NULL,
  `discount_total` decimal(15,2) DEFAULT NULL,
  `discount_type` varchar(30) DEFAULT NULL,
  `billing_street` varchar(200) DEFAULT NULL,
  `billing_city` varchar(100) DEFAULT NULL,
  `billing_state` varchar(100) DEFAULT NULL,
  `billing_zip` varchar(100) DEFAULT NULL,
  `billing_country` int DEFAULT NULL,
  `shipping_street` varchar(200) DEFAULT NULL,
  `shipping_city` varchar(100) DEFAULT NULL,
  `shipping_state` varchar(100) DEFAULT NULL,
  `shipping_zip` varchar(100) DEFAULT NULL,
  `shipping_country` int DEFAULT NULL,
  `include_shipping` tinyint(1) DEFAULT NULL,
  `show_shipping_on_debit_note` tinyint(1) DEFAULT NULL,
  `show_quantity_as` int DEFAULT NULL,
  `reference_no` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_debit_notes`
--


--
-- Table structure for table `sunbird_tblpur_debits`
--

CREATE TABLE `sunbird_tblpur_debits` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` int DEFAULT NULL,
  `debit_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `date_applied` datetime DEFAULT NULL,
  `date` date DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_debits`
--


--
-- Table structure for table `sunbird_tblpur_debits_refunds`
--

CREATE TABLE `sunbird_tblpur_debits_refunds` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `debit_note_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `refunded_on` date DEFAULT NULL,
  `payment_mode` varchar(40) DEFAULT NULL,
  `note` text,
  `amount` decimal(15,2) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_debits_refunds`
--


--
-- Table structure for table `sunbird_tblpur_estimate_detail`
--

CREATE TABLE `sunbird_tblpur_estimate_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pur_estimate` int NOT NULL,
  `item_code` varchar(100) NOT NULL,
  `unit_id` int DEFAULT NULL,
  `unit_price` decimal(15,2) DEFAULT NULL,
  `quantity` decimal(15,2) NOT NULL,
  `into_money` decimal(15,2) DEFAULT NULL,
  `tax` text,
  `total` decimal(15,2) DEFAULT NULL,
  `total_money` decimal(15,2) DEFAULT NULL,
  `discount_money` decimal(15,2) DEFAULT NULL,
  `discount_%` decimal(15,2) DEFAULT NULL,
  `tax_value` decimal(15,2) DEFAULT NULL,
  `tax_rate` text,
  `tax_name` text,
  `item_name` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_estimate_detail`
--


--
-- Table structure for table `sunbird_tblpur_estimates`
--

CREATE TABLE `sunbird_tblpur_estimates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `sent` tinyint(1) NOT NULL DEFAULT '0',
  `datesend` datetime DEFAULT NULL,
  `vendor` int NOT NULL,
  `deleted_vendor_name` varchar(100) DEFAULT NULL,
  `pur_request` int DEFAULT NULL,
  `number` int NOT NULL,
  `prefix` varchar(50) DEFAULT NULL,
  `number_format` int NOT NULL DEFAULT '0',
  `hash` varchar(32) DEFAULT NULL,
  `datecreated` datetime NOT NULL,
  `date` date NOT NULL,
  `expirydate` date DEFAULT NULL,
  `currency` int NOT NULL,
  `subtotal` decimal(15,2) NOT NULL,
  `total_tax` decimal(15,2) NOT NULL,
  `total` decimal(15,2) NOT NULL,
  `adjustment` decimal(15,2) DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `vendornote` text,
  `adminnote` text,
  `discount_percent` decimal(15,2) DEFAULT '0.00',
  `discount_total` decimal(15,2) DEFAULT '0.00',
  `discount_type` varchar(30) DEFAULT NULL,
  `invoiceid` int DEFAULT NULL,
  `invoiced_date` datetime DEFAULT NULL,
  `terms` text,
  `reference_no` varchar(100) DEFAULT NULL,
  `buyer` int NOT NULL DEFAULT '0',
  `billing_street` varchar(200) DEFAULT NULL,
  `billing_city` varchar(100) DEFAULT NULL,
  `billing_state` varchar(100) DEFAULT NULL,
  `billing_zip` varchar(100) DEFAULT NULL,
  `billing_country` int DEFAULT NULL,
  `shipping_street` varchar(200) DEFAULT NULL,
  `shipping_city` varchar(100) DEFAULT NULL,
  `shipping_state` varchar(100) DEFAULT NULL,
  `shipping_zip` varchar(100) DEFAULT NULL,
  `shipping_country` int DEFAULT NULL,
  `include_shipping` tinyint(1) NOT NULL,
  `show_shipping_on_estimate` tinyint(1) NOT NULL DEFAULT '1',
  `show_quantity_as` int NOT NULL DEFAULT '1',
  `pipeline_order` int NOT NULL DEFAULT '0',
  `is_expiry_notified` int NOT NULL DEFAULT '0',
  `acceptance_firstname` varchar(50) DEFAULT NULL,
  `acceptance_lastname` varchar(50) DEFAULT NULL,
  `acceptance_email` varchar(100) DEFAULT NULL,
  `acceptance_date` datetime DEFAULT NULL,
  `acceptance_ip` varchar(40) DEFAULT NULL,
  `signature` varchar(40) DEFAULT NULL,
  `make_a_contract` text,
  `currency_rate` decimal(15,6) DEFAULT NULL,
  `from_currency` varchar(20) DEFAULT NULL,
  `to_currency` varchar(20) DEFAULT NULL,
  `shipping_fee` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_estimates`
--


--
-- Table structure for table `sunbird_tblpur_invoice_details`
--

CREATE TABLE `sunbird_tblpur_invoice_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pur_invoice` int NOT NULL,
  `item_code` varchar(100) DEFAULT NULL,
  `description` text,
  `unit_id` int DEFAULT NULL,
  `unit_price` decimal(15,2) DEFAULT NULL,
  `quantity` decimal(15,2) DEFAULT NULL,
  `into_money` decimal(15,2) DEFAULT NULL,
  `tax` text,
  `total` decimal(15,2) DEFAULT NULL,
  `discount_percent` decimal(15,2) DEFAULT NULL,
  `discount_money` decimal(15,2) DEFAULT NULL,
  `total_money` decimal(15,2) DEFAULT NULL,
  `tax_value` decimal(15,2) DEFAULT NULL,
  `tax_rate` text,
  `tax_name` text,
  `item_name` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_invoice_details`
--


--
-- Table structure for table `sunbird_tblpur_invoice_payment`
--

CREATE TABLE `sunbird_tblpur_invoice_payment` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `pur_invoice` int NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `paymentmode` longtext,
  `date` date NOT NULL,
  `daterecorded` datetime NOT NULL,
  `note` text NOT NULL,
  `transactionid` mediumtext,
  `approval_status` int DEFAULT NULL,
  `requester` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_invoice_payment`
--


--
-- Table structure for table `sunbird_tblpur_invoices`
--

CREATE TABLE `sunbird_tblpur_invoices` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `number` int NOT NULL,
  `invoice_number` text,
  `invoice_date` date DEFAULT NULL,
  `subtotal` decimal(15,2) DEFAULT NULL,
  `tax_rate` int DEFAULT NULL,
  `tax` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `contract` int DEFAULT NULL,
  `vendor` int DEFAULT NULL,
  `transactionid` mediumtext,
  `transaction_date` date DEFAULT NULL,
  `payment_request_status` varchar(30) DEFAULT NULL,
  `payment_status` varchar(30) DEFAULT NULL,
  `vendor_note` text,
  `adminnote` text,
  `terms` text,
  `add_from` int DEFAULT NULL,
  `date_add` date DEFAULT NULL,
  `pur_order` int DEFAULT NULL,
  `recurring` int DEFAULT NULL,
  `recurring_type` varchar(10) DEFAULT NULL,
  `cycles` int DEFAULT '0',
  `total_cycles` int DEFAULT '0',
  `last_recurring_date` date DEFAULT NULL,
  `is_recurring_from` int DEFAULT NULL,
  `duedate` date DEFAULT NULL,
  `add_from_type` varchar(20) DEFAULT NULL,
  `currency` int DEFAULT '0',
  `discount_total` decimal(15,2) DEFAULT NULL,
  `discount_percent` decimal(15,2) DEFAULT NULL,
  `currency_rate` decimal(15,6) DEFAULT NULL,
  `from_currency` varchar(20) DEFAULT NULL,
  `to_currency` varchar(20) DEFAULT NULL,
  `shipping_fee` decimal(15,2) DEFAULT NULL,
  `vendor_invoice_number` text,
  `discount_type` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_invoices`
--


--
-- Table structure for table `sunbird_tblpur_order_detail`
--

CREATE TABLE `sunbird_tblpur_order_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pur_order` int NOT NULL,
  `item_code` varchar(100) NOT NULL,
  `description` text,
  `unit_id` int DEFAULT NULL,
  `unit_price` decimal(15,2) DEFAULT NULL,
  `quantity` decimal(15,2) NOT NULL,
  `into_money` decimal(15,2) DEFAULT NULL,
  `tax` text,
  `total` decimal(15,2) DEFAULT NULL,
  `discount_%` decimal(15,2) DEFAULT NULL,
  `discount_money` decimal(15,2) DEFAULT NULL,
  `total_money` decimal(15,2) DEFAULT NULL,
  `tax_value` decimal(15,2) DEFAULT NULL,
  `tax_rate` text,
  `tax_name` text,
  `item_name` text,
  `wh_quantity_received` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_order_detail`
--


--
-- Table structure for table `sunbird_tblpur_order_payment`
--

CREATE TABLE `sunbird_tblpur_order_payment` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `pur_order` int NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `paymentmode` longtext,
  `date` date NOT NULL,
  `daterecorded` datetime NOT NULL,
  `note` text NOT NULL,
  `transactionid` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_order_payment`
--


--
-- Table structure for table `sunbird_tblpur_orders`
--

CREATE TABLE `sunbird_tblpur_orders` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `pur_order_name` varchar(100) NOT NULL,
  `vendor` int NOT NULL,
  `estimate` int NOT NULL,
  `pur_order_number` varchar(30) NOT NULL,
  `order_date` date NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `approve_status` int NOT NULL DEFAULT '1',
  `datecreated` datetime NOT NULL,
  `days_owed` int NOT NULL,
  `delivery_date` date DEFAULT NULL,
  `subtotal` decimal(15,2) NOT NULL,
  `total_tax` decimal(15,2) NOT NULL,
  `total` decimal(15,2) NOT NULL,
  `addedfrom` int NOT NULL,
  `vendornote` text,
  `terms` text,
  `discount_percent` decimal(15,2) DEFAULT '0.00',
  `discount_total` decimal(15,2) DEFAULT '0.00',
  `discount_type` varchar(30) DEFAULT NULL,
  `buyer` int NOT NULL DEFAULT '0',
  `status_goods` int NOT NULL DEFAULT '0',
  `number` int DEFAULT NULL,
  `expense_convert` int DEFAULT '0',
  `hash` varchar(32) DEFAULT NULL,
  `clients` text,
  `delivery_status` int DEFAULT '0',
  `type` text,
  `project` int DEFAULT NULL,
  `pur_request` int DEFAULT NULL,
  `department` int DEFAULT NULL,
  `tax_order_rate` decimal(15,2) DEFAULT NULL,
  `tax_order_amount` decimal(15,2) DEFAULT NULL,
  `sale_invoice` int DEFAULT NULL,
  `currency` int DEFAULT '0',
  `order_status` varchar(30) DEFAULT NULL,
  `shipping_note` text,
  `currency_rate` decimal(15,6) DEFAULT NULL,
  `from_currency` varchar(20) DEFAULT NULL,
  `to_currency` varchar(20) DEFAULT NULL,
  `shipping_fee` decimal(15,2) DEFAULT NULL,
  `shipping_address` text,
  `shipping_city` text,
  `shipping_state` text,
  `shipping_zip` text,
  `shipping_country` int DEFAULT NULL,
  `shipping_country_text` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_orders`
--


--
-- Table structure for table `sunbird_tblpur_request`
--

CREATE TABLE `sunbird_tblpur_request` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pur_rq_code` varchar(45) NOT NULL,
  `pur_rq_name` varchar(100) NOT NULL,
  `rq_description` text,
  `requester` int NOT NULL,
  `department` int DEFAULT NULL,
  `request_date` datetime NOT NULL,
  `status` int DEFAULT NULL,
  `status_goods` int NOT NULL DEFAULT '0',
  `hash` varchar(32) DEFAULT NULL,
  `type` text,
  `project` int DEFAULT NULL,
  `number` int DEFAULT NULL,
  `from_items` int DEFAULT '1',
  `subtotal` decimal(15,2) DEFAULT NULL,
  `total_tax` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `sale_invoice` int DEFAULT NULL,
  `compare_note` text,
  `send_to_vendors` text,
  `currency` int DEFAULT '0',
  `currency_rate` decimal(15,6) DEFAULT NULL,
  `from_currency` varchar(20) DEFAULT NULL,
  `to_currency` varchar(20) DEFAULT NULL,
  `sale_estimate` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_request`
--


--
-- Table structure for table `sunbird_tblpur_request_detail`
--

CREATE TABLE `sunbird_tblpur_request_detail` (
  `prd_id` int NOT NULL AUTO_INCREMENT,
  `pur_request` int NOT NULL,
  `item_code` varchar(100) NOT NULL,
  `unit_id` int DEFAULT NULL,
  `unit_price` decimal(15,2) DEFAULT NULL,
  `quantity` decimal(15,2) NOT NULL,
  `into_money` decimal(15,2) DEFAULT NULL,
  `inventory_quantity` int DEFAULT '0',
  `item_text` text,
  `tax` text,
  `tax_rate` text,
  `tax_value` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `tax_name` text,
  PRIMARY KEY (`prd_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_request_detail`
--


--
-- Table structure for table `sunbird_tblpur_unit`
--

CREATE TABLE `sunbird_tblpur_unit` (
  `unit_id` int NOT NULL AUTO_INCREMENT,
  `unit_name` varchar(100) NOT NULL,
  PRIMARY KEY (`unit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_unit`
--


--
-- Table structure for table `sunbird_tblpur_vendor`
--

CREATE TABLE `sunbird_tblpur_vendor` (
  `userid` int unsigned NOT NULL AUTO_INCREMENT,
  `company` varchar(200) DEFAULT NULL,
  `vat` varchar(200) DEFAULT NULL,
  `phonenumber` varchar(30) DEFAULT NULL,
  `country` int NOT NULL DEFAULT '0',
  `city` varchar(100) DEFAULT NULL,
  `zip` varchar(15) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `address` text,
  `website` varchar(150) DEFAULT NULL,
  `datecreated` datetime NOT NULL,
  `active` int NOT NULL DEFAULT '1',
  `leadid` int DEFAULT NULL,
  `billing_street` varchar(200) DEFAULT NULL,
  `billing_city` varchar(100) DEFAULT NULL,
  `billing_state` varchar(100) DEFAULT NULL,
  `billing_zip` varchar(100) DEFAULT NULL,
  `billing_country` int DEFAULT '0',
  `shipping_street` varchar(200) DEFAULT NULL,
  `shipping_city` varchar(100) DEFAULT NULL,
  `shipping_state` varchar(100) DEFAULT NULL,
  `shipping_zip` varchar(100) DEFAULT NULL,
  `shipping_country` int DEFAULT '0',
  `longitude` varchar(191) DEFAULT NULL,
  `latitude` varchar(191) DEFAULT NULL,
  `default_language` varchar(40) DEFAULT NULL,
  `default_currency` int NOT NULL DEFAULT '0',
  `show_primary_contact` int NOT NULL DEFAULT '0',
  `stripe_id` varchar(40) DEFAULT NULL,
  `registration_confirmed` int NOT NULL DEFAULT '1',
  `addedfrom` int NOT NULL DEFAULT '0',
  `category` text,
  `bank_detail` text,
  `payment_terms` text,
  `vendor_code` varchar(100) DEFAULT NULL,
  `return_within_day` int DEFAULT NULL,
  `return_order_fee` decimal(15,2) DEFAULT NULL,
  `return_policies` text,
  `balance` decimal(15,2) DEFAULT NULL,
  `balance_as_of` date DEFAULT NULL,
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_vendor`
--


--
-- Table structure for table `sunbird_tblpur_vendor_admin`
--

CREATE TABLE `sunbird_tblpur_vendor_admin` (
  `staff_id` int NOT NULL,
  `vendor_id` int NOT NULL,
  `date_assigned` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_vendor_admin`
--


--
-- Table structure for table `sunbird_tblpur_vendor_cate`
--

CREATE TABLE `sunbird_tblpur_vendor_cate` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_vendor_cate`
--


--
-- Table structure for table `sunbird_tblpur_vendor_items`
--

CREATE TABLE `sunbird_tblpur_vendor_items` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `vendor` int NOT NULL,
  `group_items` int DEFAULT NULL,
  `items` int NOT NULL,
  `add_from` int DEFAULT NULL,
  `datecreate` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpur_vendor_items`
--


--
-- Table structure for table `sunbird_tblpurchase_option`
--

CREATE TABLE `sunbird_tblpurchase_option` (
  `option_id` int unsigned NOT NULL AUTO_INCREMENT,
  `option_name` varchar(200) NOT NULL,
  `option_val` longtext,
  `auto` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`option_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblpurchase_option`
--

INSERT INTO `sunbird_tblpurchase_option` VALUES (1,'purchase_order_setting','1',1),(2,'pur_order_prefix','#PO',1),(3,'next_po_number','1',1),(4,'date_reset_number','',1),(5,'pur_request_prefix','#PR',1),(6,'next_pr_number','1',1),(7,'date_reset_pr_number','',1),(8,'pur_inv_prefix','#INV',1),(9,'next_inv_number','1',1),(10,'create_invoice_by','contract',1),(11,'item_by_vendor','0',1),(12,'terms_and_conditions','',1),(13,'vendor_note','',1);

--
-- Table structure for table `sunbird_tblrb_aggregation_functions`
--

CREATE TABLE `sunbird_tblrb_aggregation_functions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `statistical_function` varchar(200) DEFAULT NULL,
  `affected_column` varchar(200) DEFAULT NULL,
  `group_by` varchar(200) DEFAULT NULL,
  `allow_aggregation_function` varchar(200) DEFAULT 'no',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_aggregation_functions`
--


--
-- Table structure for table `sunbird_tblrb_categories`
--

CREATE TABLE `sunbird_tblrb_categories` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_categories`
--


--
-- Table structure for table `sunbird_tblrb_columns`
--

CREATE TABLE `sunbird_tblrb_columns` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `table_name` varchar(200) DEFAULT NULL,
  `field_name` varchar(200) DEFAULT NULL,
  `label_name` varchar(200) DEFAULT NULL,
  `field_type` varchar(200) DEFAULT NULL,
  `group_by` varchar(200) DEFAULT 'no',
  `function_name` varchar(200) DEFAULT NULL,
  `allow_subtotal` varchar(200) DEFAULT 'no',
  `affected_column` varchar(200) DEFAULT 'no',
  `order_display` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_columns`
--


--
-- Table structure for table `sunbird_tblrb_data_source_filters`
--

CREATE TABLE `sunbird_tblrb_data_source_filters` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `table_name` varchar(200) DEFAULT NULL,
  `field_name` varchar(200) DEFAULT NULL,
  `filter_type` varchar(200) DEFAULT NULL,
  `filter_value_1` text,
  `filter_value_2` text,
  `query_filter` text,
  `ask_user` varchar(200) DEFAULT NULL,
  `group_condition` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_data_source_filters`
--


--
-- Table structure for table `sunbird_tblrb_data_source_relationships`
--

CREATE TABLE `sunbird_tblrb_data_source_relationships` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `left_table` varchar(200) DEFAULT NULL,
  `left_field_1` varchar(200) DEFAULT NULL,
  `left_field_2` varchar(200) DEFAULT NULL,
  `right_table` varchar(200) DEFAULT NULL,
  `right_field_1` varchar(200) DEFAULT NULL,
  `right_field_2` varchar(200) DEFAULT NULL,
  `query_string` text,
  `join_column` varchar(200) DEFAULT NULL,
  `join_type` varchar(100) DEFAULT NULL,
  `rel_type_condition` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_data_source_relationships`
--


--
-- Table structure for table `sunbird_tblrb_field_conditional_formattings`
--

CREATE TABLE `sunbird_tblrb_field_conditional_formattings` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `table_name` varchar(200) DEFAULT NULL,
  `field_name` varchar(200) DEFAULT NULL,
  `filter_type` varchar(200) DEFAULT NULL,
  `filter_value_1` text,
  `filter_value_2` text,
  `color_hex` varchar(100) DEFAULT NULL,
  `query_filter` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_field_conditional_formattings`
--


--
-- Table structure for table `sunbird_tblrb_settings`
--

CREATE TABLE `sunbird_tblrb_settings` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `report_title` text,
  `category_id` int DEFAULT NULL,
  `report_footer` text,
  `report_header` text,
  `report_name` varchar(200) DEFAULT NULL,
  `records_per_page` int DEFAULT NULL,
  `layout_name` varchar(100) DEFAULT NULL,
  `style_name` varchar(100) DEFAULT NULL,
  `is_public` varchar(100) DEFAULT 'no',
  `role_id` text,
  `department_id` text,
  `staff_id` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_settings`
--


--
-- Table structure for table `sunbird_tblrb_sort_bys`
--

CREATE TABLE `sunbird_tblrb_sort_bys` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `templates_id` int DEFAULT NULL,
  `table_name` varchar(200) DEFAULT NULL,
  `field_name` varchar(200) DEFAULT NULL,
  `order_by` varchar(200) DEFAULT 'ASC',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_sort_bys`
--


--
-- Table structure for table `sunbird_tblrb_templates`
--

CREATE TABLE `sunbird_tblrb_templates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `report_title` text,
  `category_id` int DEFAULT NULL,
  `report_footer` text,
  `report_header` text,
  `report_name` varchar(200) DEFAULT NULL,
  `records_per_page` int DEFAULT NULL,
  `layout_name` varchar(100) DEFAULT NULL,
  `style_name` varchar(100) DEFAULT NULL,
  `is_public` varchar(100) DEFAULT 'no',
  `role_id` text,
  `department_id` text,
  `staff_id` text,
  `staff_create` int DEFAULT NULL,
  `date_create` datetime DEFAULT NULL,
  `group_by_field` text,
  `except_staff` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrb_templates`
--


--
-- Table structure for table `sunbird_tblrec_criteria`
--

CREATE TABLE `sunbird_tblrec_criteria` (
  `criteria_id` int unsigned NOT NULL AUTO_INCREMENT,
  `criteria_type` varchar(45) NOT NULL,
  `criteria_title` varchar(200) NOT NULL,
  `group_criteria` int DEFAULT NULL,
  `description` text,
  `add_from` int NOT NULL,
  `add_date` date DEFAULT NULL,
  `score_des1` text,
  `score_des2` text,
  `score_des3` text,
  `score_des4` text,
  `score_des5` text,
  PRIMARY KEY (`criteria_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrec_criteria`
--


--
-- Table structure for table `sunbird_tblrec_job_position`
--

CREATE TABLE `sunbird_tblrec_job_position` (
  `position_id` int unsigned NOT NULL AUTO_INCREMENT,
  `position_name` varchar(200) NOT NULL,
  `position_description` text,
  PRIMARY KEY (`position_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrec_job_position`
--


--
-- Table structure for table `sunbird_tblrec_set_transfer_record`
--

CREATE TABLE `sunbird_tblrec_set_transfer_record` (
  `set_id` int unsigned NOT NULL AUTO_INCREMENT,
  `send_to` varchar(45) NOT NULL,
  `email_to` text,
  `add_from` int NOT NULL,
  `add_date` date NOT NULL,
  `subject` text NOT NULL,
  `content` text,
  `order` int NOT NULL,
  PRIMARY KEY (`set_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrec_set_transfer_record`
--


--
-- Table structure for table `sunbird_tblrec_transfer_records`
--

CREATE TABLE `sunbird_tblrec_transfer_records` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `staffid` int NOT NULL,
  `firstname` varchar(100) DEFAULT NULL,
  `lastname` varchar(100) DEFAULT NULL,
  `birthday` date DEFAULT NULL,
  `gender` varchar(11) DEFAULT NULL,
  `staff_identifi` varchar(20) DEFAULT NULL,
  `creator` int DEFAULT NULL,
  `datecreator` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrec_transfer_records`
--


--
-- Table structure for table `sunbird_tblrecords_meta`
--

CREATE TABLE `sunbird_tblrecords_meta` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `meta` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sunbird_tblrecords_meta`
--

INSERT INTO `sunbird_tblrecords_meta` VALUES (1,'staff_identifi','staff_identifi'),(2,'firstname','firstname'),(3,'email','email'),(4,'phonenumber','phonenumber'),(5,'facebook','facebook'),(6,'skype','skype'),(7,'birthday','birthday'),(8,'birthplace','birthplace'),(9,'home_town','home_town'),(10,'marital_status','marital_status'),(11,'nation','nation'),(12,'religion','religion'),(13,'identification','identification'),(14,'days_for_identity','days_for_identity'),(15,'place_of_issue','place_of_issue'),(16,'resident','resident'),(17,'current_address','current_address'),(18,'literacy','literacy');

--
-- Table structure for table `sunbird_tblrelated_items`
--

CREATE TABLE `sunbird_tblrelated_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rel_id` int NOT NULL,
  `rel_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `item_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sunbird_tblrelated_items`
--


--
-- Table structure for table `sunbird_tblreminders`
--

