-- Dumping data for table `garage2estimate_items`
--


--
-- Table structure for table `garage2estimate_requests`
--

CREATE TABLE `garage2estimate_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimate_form_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `status` enum('new','processing','hold','canceled','estimated') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2estimate_requests`
--


--
-- Table structure for table `garage2estimates`
--

CREATE TABLE `garage2estimates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL DEFAULT '0',
  `estimate_date` date NOT NULL,
  `valid_until` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','sent','accepted','declined','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2estimates`
--


--
-- Table structure for table `garage2events`
--

CREATE TABLE `garage2events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `location` mediumtext COLLATE utf8_unicode_ci,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `editable_google_event` tinyint(1) NOT NULL DEFAULT '0',
  `google_event_id` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` int(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `last_start_date` date DEFAULT NULL,
  `recurring_dates` longtext COLLATE utf8_unicode_ci NOT NULL,
  `confirmed_by` text COLLATE utf8_unicode_ci NOT NULL,
  `rejected_by` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2events`
--


--
-- Table structure for table `garage2expense_categories`
--

CREATE TABLE `garage2expense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2expense_categories`
--

INSERT INTO `garage2expense_categories` VALUES (1,'Rent',92,0);

--
-- Table structure for table `garage2expenses`
--

CREATE TABLE `garage2expenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_date` date NOT NULL,
  `category_id` int(11) NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `amount` double NOT NULL,
  `payment_mode` enum('bank','cash_on_hand','cheque','reimbursement','pt_cash') COLLATE utf8_unicode_ci NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` int(11) DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `status` enum('draft','request_approval','approved','rejected') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2expenses`
--


--
-- Table structure for table `garage2general_files`
--

CREATE TABLE `garage2general_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `eroom_id` int(11) NOT NULL DEFAULT '0',
  `vehicle_id` int(11) NOT NULL DEFAULT '0',
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2general_files`
--


--
-- Table structure for table `garage2help_articles`
--

CREATE TABLE `garage2help_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `total_views` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2help_articles`
--


--
-- Table structure for table `garage2help_categories`
--

CREATE TABLE `garage2help_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('help','knowledge_base') COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2help_categories`
--


--
-- Table structure for table `garage2internal_transactions`
--

CREATE TABLE `garage2internal_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `from_employee` int(11) NOT NULL,
  `to_employee` int(11) NOT NULL,
  `amount` float(10,3) NOT NULL,
  `note` text COLLATE utf8_bin NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_bin NOT NULL DEFAULT 'draft',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `garage2internal_transactions`
--


--
-- Table structure for table `garage2inventory`
--

CREATE TABLE `garage2inventory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `module` enum('purchase_orders','stock_issues','stock_returns','invoices','inventory_adjustment','invoice_returns') COLLATE utf8_unicode_ci NOT NULL,
  `module_id` int(11) DEFAULT NULL,
  `module_item_id` int(11) DEFAULT NULL,
  `quantity` float DEFAULT '0',
  `datetime` datetime DEFAULT NULL,
  `from_id` int(11) NOT NULL COMMENT '100 from supplier, 101 from client, else branch id. ',
  `to_id` int(11) NOT NULL COMMENT '100 to supplier, 101 to client, else branch id. ',
  `reserved` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2inventory`
--


--
-- Table structure for table `garage2invoice_items`
--

CREATE TABLE `garage2invoice_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `invoice_id` int(11) NOT NULL,
  `non_stock` int(11) DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2invoice_items`
--


--
-- Table structure for table `garage2invoice_payments`
--

CREATE TABLE `garage2invoice_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `invoice_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `account_transaction_id` int(11) NOT NULL DEFAULT '0',
  `advance_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2invoice_payments`
--


--
-- Table structure for table `garage2invoices`
--

CREATE TABLE `garage2invoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `bill_date` date NOT NULL,
  `due_date` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','not_paid','cancelled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `delivery_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `approval_status` enum('not_approved','request_approval','approved','reserved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(4) NOT NULL DEFAULT '0',
  `recurring_invoice_id` int(11) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `next_recurring_date` date DEFAULT NULL,
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `due_reminder_date` date DEFAULT NULL,
  `recurring_reminder_date` date DEFAULT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` int(11) NOT NULL,
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2invoices`
--


--
-- Table structure for table `garage2ip_sin`
--

CREATE TABLE `garage2ip_sin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `sqn_id` int(11) DEFAULT '0',
  `delivery_user_id` int(11) DEFAULT NULL,
  `status` enum('draft','approved','rejected','assigned','received','returned','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `receiver_user_id` int(11) DEFAULT NULL,
  `delivery_comments` text COLLATE utf8_unicode_ci,
  `receiver_comments` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_sin`
--


--
-- Table structure for table `garage2ip_sin_items`
--

CREATE TABLE `garage2ip_sin_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sin_id` int(11) NOT NULL,
  `sqn_item_id` int(11) DEFAULT '0',
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_sin_items`
--


--
-- Table structure for table `garage2ip_sqn`
--

CREATE TABLE `garage2ip_sqn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_sqn`
--


--
-- Table structure for table `garage2ip_sqn_items`
--

CREATE TABLE `garage2ip_sqn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sqn_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_sqn_items`
--


--
-- Table structure for table `garage2ip_srn`
--

CREATE TABLE `garage2ip_srn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `branch_id` int(11) NOT NULL,
  `to_branch_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT '0',
  `client_id` int(11) DEFAULT '0',
  `invoice_id` int(11) DEFAULT '0',
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','rejected','completed','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_srn`
--


--
-- Table structure for table `garage2ip_srn_items`
--

CREATE TABLE `garage2ip_srn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `srn_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ip_srn_items`
--


--
-- Table structure for table `garage2item_brands`
--

CREATE TABLE `garage2item_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2item_brands`
--


--
-- Table structure for table `garage2item_categories`
--

CREATE TABLE `garage2item_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2item_categories`
--


--
-- Table structure for table `garage2items`
--

CREATE TABLE `garage2items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `part_no` text COLLATE utf8_unicode_ci,
  `part_no_2` text COLLATE utf8_unicode_ci,
  `serial_no` text COLLATE utf8_unicode_ci,
  `description` text COLLATE utf8_unicode_ci,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cost` double NOT NULL,
  `rate` double NOT NULL,
  `retail_rate` double NOT NULL,
  `category_id` int(11) NOT NULL,
  `item_type` enum('product','service') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'product',
  `item_level` int(11) DEFAULT '0',
  `item_brand` int(11) NOT NULL DEFAULT '0',
  `bar_code` text COLLATE utf8_unicode_ci,
  `blocked_sale` int(11) DEFAULT '0',
  `blocked_purchase` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2items`
--


--
-- Table structure for table `garage2items_levels`
--

CREATE TABLE `garage2items_levels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2items_levels`
--


--
-- Table structure for table `garage2items_transfer_request`
--

CREATE TABLE `garage2items_transfer_request` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `from_workplace_id` int(11) DEFAULT NULL,
  `to_workplace_id` int(11) DEFAULT NULL,
  `requested_by` int(11) DEFAULT NULL,
  `request_date` date DEFAULT NULL,
  `processed_by` int(11) DEFAULT NULL,
  `process_date` date DEFAULT NULL,
  `status` enum('transferred','rejected','pending','returned') COLLATE utf8_unicode_ci DEFAULT 'pending',
  `invoice_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2items_transfer_request`
--


--
-- Table structure for table `garage2lead_source`
--

CREATE TABLE `garage2lead_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2lead_source`
--

INSERT INTO `garage2lead_source` VALUES (1,'Google',1,0),(2,'Facebook',2,0),(3,'Twitter',3,0),(4,'Youtube',4,0),(5,'Elsewhere',5,0);

--
-- Table structure for table `garage2lead_status`
--

CREATE TABLE `garage2lead_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2lead_status`
--

INSERT INTO `garage2lead_status` VALUES (1,'New','#f1c40f',0,0),(2,'Qualified','#2d9cdb',1,0),(3,'Discussion','#29c2c2',2,0),(4,'Negotiation','#2d9cdb',3,0),(5,'Won','#83c340',4,0),(6,'Lost','#e74c3c',5,0);

--
-- Table structure for table `garage2leads`
--

CREATE TABLE `garage2leads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2leads`
--


--
-- Table structure for table `garage2leave_applications`
--

CREATE TABLE `garage2leave_applications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_hours` decimal(7,2) NOT NULL,
  `total_days` decimal(5,2) NOT NULL,
  `applicant_id` int(11) NOT NULL,
  `reason` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `checked_at` datetime DEFAULT NULL,
  `checked_by` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `user_id` (`applicant_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2leave_applications`
--


--
-- Table structure for table `garage2leave_types`
--

CREATE TABLE `garage2leave_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2leave_types`
--

INSERT INTO `garage2leave_types` VALUES (1,'Casual Leave','active','#83c340','',0),(2,'Annual Leave','active','#83c340','',0),(3,'Emergency leave','active','#29c2c2','',0),(4,'Eid Vacation','active','#83c340','',0);

--
-- Table structure for table `garage2messages`
--

CREATE TABLE `garage2messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `status` enum('unread','read') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unread',
  `message_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_by_users` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `message_from` (`from_user_id`),
  KEY `message_to` (`to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2messages`
--


--
-- Table structure for table `garage2milestones`
--

CREATE TABLE `garage2milestones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `due_date` date NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2milestones`
--


--
-- Table structure for table `garage2notes`
--

CREATE TABLE `garage2notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2notes`
--


--
-- Table structure for table `garage2notification_settings`
--

CREATE TABLE `garage2notification_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(250) NOT NULL,
  `category` varchar(50) NOT NULL,
  `enable_email` int(1) NOT NULL DEFAULT '0',
  `enable_web` int(1) NOT NULL DEFAULT '0',
  `notify_to_team` text NOT NULL,
  `notify_to_team_members` text NOT NULL,
  `notify_to_terms` text NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `event` (`event`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garage2notification_settings`
--

INSERT INTO `garage2notification_settings` VALUES (1,'project_created','project',1,1,'1','5','client_primary_contact,client_all_contacts',1,0),(2,'project_deleted','project',0,1,'1','5','project_members,client_primary_contact,client_all_contacts',2,0),(3,'project_task_created','project',0,1,'','5','project_members,task_assignee',3,0),(4,'project_task_updated','project',0,1,'','','task_assignee',4,0),(5,'project_task_assigned','project',0,1,'','','task_assignee',5,0),(7,'project_task_started','project',0,1,'','5','project_members,client_primary_contact,client_all_contacts',7,0),(8,'project_task_finished','project',0,0,'','','',8,0),(9,'project_task_reopened','project',0,0,'','','',9,0),(10,'project_task_deleted','project',0,1,'','','task_assignee',10,0),(11,'project_task_commented','project',0,1,'','','task_assignee',11,0),(12,'project_member_added','project',0,1,'','','project_members',12,0),(13,'project_member_deleted','project',0,1,'','','project_members',13,0),(14,'project_file_added','project',0,1,'','','project_members',14,0),(15,'project_file_deleted','project',0,1,'','','project_members',15,0),(16,'project_file_commented','project',0,1,'','','project_members',16,0),(17,'project_comment_added','project',0,1,'','','project_members',17,0),(18,'project_comment_replied','project',0,1,'','','project_members,comment_creator',18,0),(19,'project_customer_feedback_added','project',0,1,'','','project_members',19,0),(20,'project_customer_feedback_replied','project',0,1,'','','project_members,comment_creator',20,0),(21,'client_signup','client',0,0,'','','',21,0),(22,'invoice_online_payment_received','invoice',0,0,'','','',22,0),(23,'leave_application_submitted','leave',0,0,'','','',23,0),(24,'leave_approved','leave',0,1,'','','leave_applicant',24,0),(25,'leave_assigned','leave',0,1,'','','leave_applicant',25,0),(26,'leave_rejected','leave',0,1,'','','leave_applicant',26,0),(27,'leave_canceled','leave',0,0,'','','',27,0),(28,'ticket_created','ticket',0,1,'','6,7,5,11,12,1','client_all_contacts',28,0),(29,'ticket_commented','ticket',0,1,'','','client_primary_contact,ticket_creator',29,0),(30,'ticket_closed','ticket',0,1,'','','client_primary_contact,ticket_creator',30,0),(31,'ticket_reopened','ticket',0,1,'','','client_primary_contact,ticket_creator',31,0),(32,'estimate_request_received','estimate',0,0,'','','',32,0),(33,'estimate_sent','estimate',0,0,'','','',33,0),(34,'estimate_accepted','estimate',0,0,'','','',34,0),(35,'estimate_rejected','estimate',0,0,'','','',35,0),(36,'new_message_sent','message',0,0,'','','',36,0),(37,'message_reply_sent','message',0,0,'','','',37,0),(38,'invoice_payment_confirmation','invoice',0,0,'','','',22,0),(39,'new_event_added_in_calendar','event',0,0,'','','',39,0),(40,'recurring_invoice_created_vai_cron_job','invoice',0,0,'','','',22,0),(41,'new_announcement_created','announcement',1,1,'','','recipient',41,0),(42,'invoice_due_reminder_before_due_date','invoice',0,0,'','','',22,0),(43,'invoice_overdue_reminder','invoice',0,0,'','','',22,0),(44,'recurring_invoice_creation_reminder','invoice',0,0,'','','',22,0),(45,'project_completed','project',0,0,'','','',2,0),(46,'lead_created','lead',0,0,'','','',21,0),(47,'client_created_from_lead','lead',0,0,'','','',21,0),(48,'project_task_deadline_pre_reminder','project',0,1,'','','task_assignee',20,0),(49,'project_task_reminder_on_the_day_of_deadline','project',0,1,'','','task_assignee',20,0),(50,'project_task_deadline_overdue_reminder','project',0,1,'','','task_assignee',20,0),(51,'recurring_task_created_via_cron_job','project',0,1,'','','project_members,task_assignee',20,0),(52,'calendar_event_modified','event',0,0,'','','',39,0);

--
-- Table structure for table `garage2notifications`
--

CREATE TABLE `garage2notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `notify_to` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `event` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `project_comment_id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `ticket_comment_id` int(11) NOT NULL,
  `project_file_id` int(11) NOT NULL,
  `leave_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `activity_log_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `invoice_payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL,
  `actual_message_id` int(11) NOT NULL,
  `parent_message_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `announcement_id` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2notifications`
--


--
-- Table structure for table `garage2payment_methods`
--

CREATE TABLE `garage2payment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `online_payable` tinyint(1) NOT NULL DEFAULT '0',
  `available_on_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `minimum_payment_amount` double NOT NULL DEFAULT '0',
  `settings` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2payment_methods`
--

INSERT INTO `garage2payment_methods` VALUES (1,'Cash','custom','',0,0,0,'a:0:{}',0),(4,'Bank transfer','custom','',0,0,0,'a:0:{}',0),(5,'Cheque','custom','',0,0,0,'a:0:{}',0),(6,'jk','custom','jh',0,0,0,'a:0:{}',1),(7,'Visa','custom','',0,0,0,'a:0:{}',0);

--
-- Table structure for table `garage2paypal_ipn`
--

CREATE TABLE `garage2paypal_ipn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `ipn_hash` longtext COLLATE utf8_unicode_ci NOT NULL,
  `ipn_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2paypal_ipn`
--


--
-- Table structure for table `garage2payroll`
--

CREATE TABLE `garage2payroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month` date NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2payroll`
--


--
-- Table structure for table `garage2payroll_detail`
--

CREATE TABLE `garage2payroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2payroll_detail`
--


--
-- Table structure for table `garage2posts`
--

CREATE TABLE `garage2posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2posts`
--


--
-- Table structure for table `garage2project_comments`
--

CREATE TABLE `garage2project_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2project_comments`
--


--
-- Table structure for table `garage2project_files`
--

CREATE TABLE `garage2project_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2project_files`
--


--
-- Table structure for table `garage2project_members`
--

CREATE TABLE `garage2project_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2project_members`
--


--
-- Table structure for table `garage2project_settings`
--

CREATE TABLE `garage2project_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2project_settings`
--


--
-- Table structure for table `garage2project_time`
--

CREATE TABLE `garage2project_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2project_time`
--


--
-- Table structure for table `garage2projects`
--

CREATE TABLE `garage2projects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vehicle` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2projects`
--


--
-- Table structure for table `garage2purchase_order_items`
--

CREATE TABLE `garage2purchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2purchase_order_items`
--


--
-- Table structure for table `garage2purchase_order_payments`
--

CREATE TABLE `garage2purchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2purchase_order_payments`
--


--
-- Table structure for table `garage2purchase_orders`
--

CREATE TABLE `garage2purchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `shipment_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `work_place` int(11) DEFAULT '0',
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `wip_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2purchase_orders`
--


--
-- Table structure for table `garage2roles`
--

CREATE TABLE `garage2roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2roles`
--


--
-- Table structure for table `garage2settings`
--

CREATE TABLE `garage2settings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2settings`
--

INSERT INTO `garage2settings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Oman Garage','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','','app',0),('client_can_comment_on_files','','app',0),('client_can_comment_on_tasks','','app',0),('client_can_create_projects','','app',0),('client_can_create_tasks','','app',0),('client_can_edit_tasks','','app',0),('client_can_view_activity','','app',0),('client_can_view_gantt','','app',0),('client_can_view_milestones','','app',0),('client_can_view_overview','','app',0),('client_can_view_project_files','','app',0),('client_can_view_tasks','','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','','app',0),('client_message_users','5','app',0),('company_address','Al-Ma\'bila 11th\nPost Box No: 673, Postal Code: 113','app',0),('company_email','info@teamway.om','app',0),('company_name','My 4x4 Oman','app',0),('company_phone','00968 - 95094494','app',0),('company_vat_number','','app',0),('company_website','www.my4x4oman.com','app',0),('currency_position','right','app',0),('currency_symbol','/ OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','1','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','0','app',0),('estimate_color','#808080','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','muhand@almutsahel.com','app',0),('imap_host','','app',0),('imap_password','Mcs@123456','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','10','app',0),('initial_number_of_the_invoice','8938','app',0),('invoice_color','#808080','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','arabic','app',0),('module_announcement','','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','','app',0),('module_lead','','app',0),('module_leave','','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','','app',0),('module_todo','','app',0),('no_of_decimals','2','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('rows_per_page','100','app',0),('scrollbar','native','app',0),('send_bcc_to','','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','sigin-background-image.jpg','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('weekend','5,6','app',0);

--
-- Table structure for table `garage2shipment_items`
--

CREATE TABLE `garage2shipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `purchase_order_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2shipment_items`
--


--
-- Table structure for table `garage2shipments`
--

CREATE TABLE `garage2shipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `shipment_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2shipments`
--


--
-- Table structure for table `garage2social_links`
--

CREATE TABLE `garage2social_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2social_links`
--


--
-- Table structure for table `garage2suppliers`
--

CREATE TABLE `garage2suppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `contact_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `note` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `currency_id` int(11) NOT NULL DEFAULT '0',
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2suppliers`
--


--
-- Table structure for table `garage2task_status`
--

CREATE TABLE `garage2task_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `key_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2task_status`
--

INSERT INTO `garage2task_status` VALUES (1,'To Do','to_do','#F9A52D',0,0),(2,'In progress','in_progress','#1672B9',1,0),(3,'Done','done','#00B393',2,0),(4,'holding','','#aab7b7',3,0);

--
-- Table structure for table `garage2tasks`
--

CREATE TABLE `garage2tasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `milestone_id` int(11) NOT NULL DEFAULT '0',
  `assigned_to` int(11) NOT NULL,
  `deadline` date DEFAULT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `points` tinyint(4) NOT NULL DEFAULT '1',
  `status` enum('to_do','in_progress','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `status_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `collaborators` text COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `recurring_task_id` int(11) NOT NULL DEFAULT '0',
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `created_date` date NOT NULL,
  `next_recurring_date` date DEFAULT NULL,
  `reminder_date` date NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2tasks`
--


--
-- Table structure for table `garage2taxes`
--

CREATE TABLE `garage2taxes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `percentage` double NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garage2taxes`
--

INSERT INTO `garage2taxes` VALUES (1,'Tax (10%)',10,0),(2,'VAT',5,0);

--
-- Table structure for table `garage2team`
--

CREATE TABLE `garage2team` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `members` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2team`
--


--
-- Table structure for table `garage2team_member_job_info`
--

CREATE TABLE `garage2team_member_job_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `date_of_hire` date DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `salary` double NOT NULL DEFAULT '0',
  `salary_term` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `working_hours` int(11) DEFAULT NULL,
  `yearly_leaves` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2team_member_job_info`
--


--
-- Table structure for table `garage2ticket_comments`
--

CREATE TABLE `garage2ticket_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ticket_comments`
--


--
-- Table structure for table `garage2ticket_types`
--

CREATE TABLE `garage2ticket_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2ticket_types`
--

INSERT INTO `garage2ticket_types` VALUES (1,'General Support',0),(2,'One way',0),(3,'Two way',0);

--
-- Table structure for table `garage2tickets`
--

CREATE TABLE `garage2tickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `ticket_type_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` enum('new','client_replied','open','closed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `last_activity_at` datetime DEFAULT NULL,
  `assigned_to` int(11) NOT NULL DEFAULT '0',
  `creator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `creator_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL,
  `closed_at` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2tickets`
--


--
-- Table structure for table `garage2to_do`
--

CREATE TABLE `garage2to_do` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `status` enum('to_do','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `start_date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2to_do`
--


--
-- Table structure for table `garage2transactions`
--

CREATE TABLE `garage2transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `type` text NOT NULL,
  `is_manual` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garage2transactions`
--


--
-- Table structure for table `garage2vehicles`
--

CREATE TABLE `garage2vehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `ac` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'no',
  `rego` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `make` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_series` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fleet_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `transmission` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `body_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `color` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `seating_cap` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `odometer` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hours` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `drive_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `chassis_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rego_due_date` date DEFAULT NULL,
  `build_date` year(4) DEFAULT NULL COMMENT 'year',
  `produce_date` date DEFAULT NULL,
  `last_in_date` date DEFAULT NULL,
  `last_service` date DEFAULT NULL,
  `next_service` date DEFAULT NULL,
  `next_service_km` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `service_intervals` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cylinders` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `liters` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_induction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tare_mass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `radio_pin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `key_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tyre_size` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `imported_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `blocked` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4057 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2vehicles`
--


--
-- Table structure for table `garage2work_places`
--

CREATE TABLE `garage2work_places` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage2work_places`
--


--
-- Table structure for table `garage3accounts`
--

CREATE TABLE `garage3accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acc_name` varchar(255) NOT NULL,
  `acc_code` varchar(255) DEFAULT NULL,
  `acc_parent` int(11) NOT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garage3accounts`
--

INSERT INTO `garage3accounts` VALUES (1,'Assets','1',0,1,0),(2,'Liabilities','2',0,1,0),(3,'Owner\'s Equity','3',0,1,0),(4,'Expenses','4',0,1,0),(5,'Revenue','5',0,1,0),(6,'Cost of Goods Sold','6',0,1,0),(7,'Current Assets','1-1',1,1,0),(8,'Fixed Assets','1-2',1,1,0),(9,'Current Liabilities','2-1',2,1,0),(10,'Long-term Liabilities','2-2',2,1,0),(11,'Capital','3-1',3,1,0),(12,'Retain Earnings','3-2',3,1,0),(13,'Partners\' Withdrawal','3-3',3,1,0),(14,'Products','5-1-1',47,1,0),(15,'Services','5-1-2',47,1,0),(17,'Discounts','5-1-3',47,1,0),(18,'Banks','1-1-1',7,1,0),(19,'Cash In Hand','1-1-2',7,1,0),(20,'Receivable Accounts','1-1-3',7,1,0),(21,'Receivable Notes','1-1-4',7,1,0),(22,'Other Receivable Accounts','1-1-5',7,1,0),(23,'Employee Petty Cash','1-1-6',7,1,0),(24,'Inventory','1-1-7',7,1,0),(25,'Suppliers','2-1-1',9,1,0),(26,'Salary Payable','2-1-2',9,1,0),(47,'Sales','5-1',5,1,0),(48,'Employee Reimbursement','2-1-3',9,1,0),(52,'Default Bank','123456789',18,1,0),(53,'cheques Payable','2-1-4',9,1,0),(59,'Prepayments','1-1-8',7,1,0),(60,'Advance Payments','2-1-5',9,1,0),(67,'Salaries','4-1',4,1,0);

--
-- Table structure for table `garage3activity_logs`
--

CREATE TABLE `garage3activity_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `action` enum('created','updated','deleted') COLLATE utf8_unicode_ci NOT NULL,
  `log_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `log_type_title` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `log_type_id` int(11) NOT NULL DEFAULT '0',
  `changes` mediumtext COLLATE utf8_unicode_ci,
  `log_for` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `log_for_id` int(11) NOT NULL DEFAULT '0',
  `log_for2` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `log_for_id2` int(11) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3activity_logs`
--


--
-- Table structure for table `garage3announcements`
--

CREATE TABLE `garage3announcements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `created_at` datetime NOT NULL,
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3announcements`
--


--
-- Table structure for table `garage3attendance`
--

CREATE TABLE `garage3attendance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` enum('incomplete','pending','approved','rejected','deleted') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'incomplete',
  `user_id` int(11) NOT NULL,
  `in_time` datetime NOT NULL,
  `out_time` datetime DEFAULT NULL,
  `checked_by` int(11) DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `checked_at` datetime DEFAULT NULL,
  `reject_reason` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3attendance`
--


--
-- Table structure for table `garage3brands`
--

CREATE TABLE `garage3brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `models` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3brands`
--

INSERT INTO `garage3brands` VALUES (1,'BMW','335I',0),(2,'CADILLAC','ESCALADE',0),(3,'CHEVORLET','SILVERADO 1500,TAHOE,SUBURBAN,AVALANCHE,TRAVERSE,TRAVERSE AWD',0),(4,'CHRYSLER','CHRYSLER 300LX,GRAND VOYAGER,200C',0),(5,'DODGE','DORANGO ,CHARGER ,CALIBER ,RAM ,CHALENGER ,NITRO',0),(6,'FIAT','500',0),(7,'FORD','PICK-UP,DS350 AMBULANCE,F150,EXPEDITION,EXPLORER,RAPTOR,F250 SUPER DUTY,MUSTANG,RANGER,FOCUS,EDGE',0),(8,'GMC','YUKON XL ,SIERRA ,BUS 4X4 ,FIRE ,SIERRA DENALI ,ENVOY ,ACADIA',0),(9,'HUMMER','H2',0),(10,'HYUNDAI','SANTAFE',0),(11,'INFINITY','QX56,QX80',0),(12,'JEEP','CHEROKEE,SAHARA,GRAND CHEROKEE,COMANDER,LIBERTY,PATRIOT,COMPASS,RENEGADE,GRAND CHEROKEE SRT8,WRANGLER YJ,WRANGLER TJ,WRANGLER JK,WRANGLER JL,GLADIATOR',0),(13,'KIA','SOUL ,CERATO ,CARNAVAL',0),(14,'LAND ROVER','110 ,LR3 ,S 2 ,90 ,LR4 ,DISCOVERY',0),(15,'LEXUS','400 ,LX470 ,RX350',0),(16,'MAN','RECOVERI 25T, RECOVERY 1002',0),(17,'MANTRA','MANTRA',0),(18,'MAZDA','PIK UP,BUS,CX5,CX9',0),(19,'MERCEDES','E200,G-CLASS 500',0),(20,'MITSUBISHI','PAJERO,PICK UP,BUS,OUTLANDER',0),(21,'NISSAN','PATROL Y61,SUNNY,INFINITI,XTERRA,BUS,PICK UP,PATROL Y62,ARMADA,SENTRA,PATHFINDER,ALTIMA',0),(22,'PORSCHE','CAYENNE',0),(23,'SUZUKI','JIMMY',0),(24,'TOYOTA','LANDCRUISER,HILUX,FJ CRUISER,BUS COASTER,PRADO,TACOMA PICKUP,DAYNA,COROLA,AVALON,YARIS,EMBULANCE,TUNDRA,FORTUNER,RAV4,LEXUS ES330,LEXUS,CAMRY,ECHO,DAYHASU,SEQUOIA',0),(25,'VOLKSWAGON','TOURAGE',0);

--
-- Table structure for table `garage3checklist_items`
--

CREATE TABLE `garage3checklist_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `is_checked` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3checklist_items`
--


--
-- Table structure for table `garage3ci_sessions`
--

CREATE TABLE `garage3ci_sessions` (
  `id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ci_sessions`
--

INSERT INTO `garage3ci_sessions` VALUES ('dcef2e12f326bdb1cfa936fd7320cee12c4afc4e','45.80.151.145',1686831172,_binary '__ci_last_regenerate|i:1686831172;user_id|s:1:\"2\";'),('b8cbc65e3b08b3471a82d24ca653743803af51a3','45.80.151.145',1686841752,_binary '__ci_last_regenerate|i:1686831172;user_id|s:1:\"2\";'),('0c910654b3344ec3b29df7c7f3385a8ad626a1e7','89.147.146.168',1686896909,''),('04eb040024217627e6cda4d5a6e5c8f118ef2bee','89.147.146.168',1686896909,''),('096abeb6b148f68b05c04f80463776aa341e7719','89.147.146.168',1686896910,'');

--
-- Table structure for table `garage3client_groups`
--

CREATE TABLE `garage3client_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3client_groups`
--

INSERT INTO `garage3client_groups` VALUES (1,'Regular',0),(2,'VIP',0);

--
-- Table structure for table `garage3clients`
--

CREATE TABLE `garage3clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `group_ids` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `is_lead` tinyint(1) NOT NULL DEFAULT '0',
  `lead_status_id` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `lead_source_id` int(11) NOT NULL,
  `last_lead_status` text COLLATE utf8_unicode_ci NOT NULL,
  `client_migration_date` date NOT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `disable_online_payment` tinyint(1) NOT NULL DEFAULT '0',
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `blocked_sale` tinyint(1) DEFAULT '0',
  `blocked_jobcard` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3clients`
--


--
-- Table structure for table `garage3contacts`
--

CREATE TABLE `garage3contacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `job_title` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `created_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3contacts`
--


--
-- Table structure for table `garage3currencies`
--

CREATE TABLE `garage3currencies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `symbol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL DEFAULT '1',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3currencies`
--

INSERT INTO `garage3currencies` VALUES (1,'USD','$',2.6,0),(2,'OMR','OMR',1,0);

--
-- Table structure for table `garage3custom_field_values`
--

CREATE TABLE `garage3custom_field_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `related_to_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to_id` int(11) NOT NULL,
  `custom_field_id` int(11) NOT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3custom_field_values`
--


--
-- Table structure for table `garage3custom_fields`
--

CREATE TABLE `garage3custom_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `placeholder` text COLLATE utf8_unicode_ci NOT NULL,
  `example_variable_name` text COLLATE utf8_unicode_ci,
  `options` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `field_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_table` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_estimate` tinyint(1) NOT NULL DEFAULT '0',
  `visible_to_admins_only` tinyint(1) NOT NULL DEFAULT '0',
  `hide_from_clients` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3custom_fields`
--

INSERT INTO `garage3custom_fields` VALUES (1,'phone number 2','phone number 2','','','number','clients',1,0,1,0,0,0,0,1),(2,'Primary Complaint','Primary Complaint','','','textarea','projects',1,0,1,0,0,0,1,0);

--
-- Table structure for table `garage3custom_widgets`
--

CREATE TABLE `garage3custom_widgets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `content` text COLLATE utf8_unicode_ci,
  `show_title` tinyint(1) NOT NULL DEFAULT '0',
  `show_border` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3custom_widgets`
--


--
-- Table structure for table `garage3dashboards`
--

CREATE TABLE `garage3dashboards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `data` text COLLATE utf8_unicode_ci,
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3dashboards`
--

INSERT INTO `garage3dashboards` VALUES (2,25,'un paid invoice','a:0:{}','#83c340',0,0),(3,25,'tree','a:0:{}','#2d9cdb',0,0);

--
-- Table structure for table `garage3delivery_note_items`
--

CREATE TABLE `garage3delivery_note_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `invoice_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `delivery_note_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3delivery_note_items`
--


--
-- Table structure for table `garage3delivery_notes`
--

CREATE TABLE `garage3delivery_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(11) NOT NULL DEFAULT '0',
  `delivery_note_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3delivery_notes`
--


--
-- Table structure for table `garage3email_templates`
--

CREATE TABLE `garage3email_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `email_subject` text COLLATE utf8_unicode_ci NOT NULL,
  `default_message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `custom_message` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3email_templates`
--


--
-- Table structure for table `garage3enteries`
--

CREATE TABLE `garage3enteries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trans_id` int(11) NOT NULL,
  `account` int(11) NOT NULL,
  `type` enum('dr','cr') NOT NULL,
  `amount` double NOT NULL,
  `narration` text NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garage3enteries`
--


--
-- Table structure for table `garage3estimate_forms`
--

CREATE TABLE `garage3estimate_forms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `enable_attachment` tinyint(4) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3estimate_forms`
--


--
-- Table structure for table `garage3estimate_items`
--

CREATE TABLE `garage3estimate_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3estimate_items`
--


--
-- Table structure for table `garage3estimate_requests`
--

CREATE TABLE `garage3estimate_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimate_form_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `status` enum('new','processing','hold','canceled','estimated') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3estimate_requests`
--


--
-- Table structure for table `garage3estimates`
--

CREATE TABLE `garage3estimates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL DEFAULT '0',
  `estimate_date` date NOT NULL,
  `valid_until` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','sent','accepted','declined','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3estimates`
--


--
-- Table structure for table `garage3events`
--

CREATE TABLE `garage3events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `location` mediumtext COLLATE utf8_unicode_ci,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `editable_google_event` tinyint(1) NOT NULL DEFAULT '0',
  `google_event_id` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` int(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `last_start_date` date DEFAULT NULL,
  `recurring_dates` longtext COLLATE utf8_unicode_ci NOT NULL,
  `confirmed_by` text COLLATE utf8_unicode_ci NOT NULL,
  `rejected_by` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3events`
--


--
-- Table structure for table `garage3expense_categories`
--

CREATE TABLE `garage3expense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3expense_categories`
--

INSERT INTO `garage3expense_categories` VALUES (1,'Rent',92,0);

--
-- Table structure for table `garage3expenses`
--

CREATE TABLE `garage3expenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_date` date NOT NULL,
  `category_id` int(11) NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `amount` double NOT NULL,
  `payment_mode` enum('bank','cash_on_hand','cheque','reimbursement','pt_cash') COLLATE utf8_unicode_ci NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` int(11) DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `status` enum('draft','request_approval','approved','rejected') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3expenses`
--


--
-- Table structure for table `garage3general_files`
--

CREATE TABLE `garage3general_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `eroom_id` int(11) NOT NULL DEFAULT '0',
  `vehicle_id` int(11) NOT NULL DEFAULT '0',
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3general_files`
--


--
-- Table structure for table `garage3help_articles`
--

CREATE TABLE `garage3help_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `total_views` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3help_articles`
--


--
-- Table structure for table `garage3help_categories`
--

CREATE TABLE `garage3help_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('help','knowledge_base') COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3help_categories`
--


--
-- Table structure for table `garage3internal_transactions`
--

CREATE TABLE `garage3internal_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `from_employee` int(11) NOT NULL,
  `to_employee` int(11) NOT NULL,
  `amount` float(10,3) NOT NULL,
  `note` text COLLATE utf8_bin NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_bin NOT NULL DEFAULT 'draft',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `garage3internal_transactions`
--


--
-- Table structure for table `garage3inventory`
--

CREATE TABLE `garage3inventory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `module` enum('purchase_orders','stock_issues','stock_returns','invoices','inventory_adjustment','invoice_returns') COLLATE utf8_unicode_ci NOT NULL,
  `module_id` int(11) DEFAULT NULL,
  `module_item_id` int(11) DEFAULT NULL,
  `quantity` float DEFAULT '0',
  `datetime` datetime DEFAULT NULL,
  `from_id` int(11) NOT NULL COMMENT '100 from supplier, 101 from client, else branch id. ',
  `to_id` int(11) NOT NULL COMMENT '100 to supplier, 101 to client, else branch id. ',
  `reserved` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3inventory`
--


--
-- Table structure for table `garage3invoice_items`
--

CREATE TABLE `garage3invoice_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `invoice_id` int(11) NOT NULL,
  `non_stock` int(11) DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3invoice_items`
--


--
-- Table structure for table `garage3invoice_payments`
--

CREATE TABLE `garage3invoice_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `invoice_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `account_transaction_id` int(11) NOT NULL DEFAULT '0',
  `advance_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3invoice_payments`
--


--
-- Table structure for table `garage3invoices`
--

CREATE TABLE `garage3invoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `bill_date` date NOT NULL,
  `due_date` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','not_paid','cancelled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `delivery_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `approval_status` enum('not_approved','request_approval','approved','reserved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(4) NOT NULL DEFAULT '0',
  `recurring_invoice_id` int(11) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `next_recurring_date` date DEFAULT NULL,
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `due_reminder_date` date DEFAULT NULL,
  `recurring_reminder_date` date DEFAULT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` int(11) NOT NULL,
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3invoices`
--


--
-- Table structure for table `garage3ip_sin`
--

CREATE TABLE `garage3ip_sin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `sqn_id` int(11) DEFAULT '0',
  `delivery_user_id` int(11) DEFAULT NULL,
  `status` enum('draft','approved','rejected','assigned','received','returned','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `receiver_user_id` int(11) DEFAULT NULL,
  `delivery_comments` text COLLATE utf8_unicode_ci,
  `receiver_comments` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_sin`
--


--
-- Table structure for table `garage3ip_sin_items`
--

CREATE TABLE `garage3ip_sin_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sin_id` int(11) NOT NULL,
  `sqn_item_id` int(11) DEFAULT '0',
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_sin_items`
--


--
-- Table structure for table `garage3ip_sqn`
--

CREATE TABLE `garage3ip_sqn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_sqn`
--


--
-- Table structure for table `garage3ip_sqn_items`
--

CREATE TABLE `garage3ip_sqn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sqn_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_sqn_items`
--


--
-- Table structure for table `garage3ip_srn`
--

CREATE TABLE `garage3ip_srn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `branch_id` int(11) NOT NULL,
  `to_branch_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT '0',
  `client_id` int(11) DEFAULT '0',
  `invoice_id` int(11) DEFAULT '0',
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','rejected','completed','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_srn`
--


--
-- Table structure for table `garage3ip_srn_items`
--

CREATE TABLE `garage3ip_srn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `srn_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ip_srn_items`
--


--
-- Table structure for table `garage3item_brands`
--

CREATE TABLE `garage3item_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3item_brands`
--


--
-- Table structure for table `garage3item_categories`
--

CREATE TABLE `garage3item_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3item_categories`
--


--
-- Table structure for table `garage3items`
--

CREATE TABLE `garage3items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `part_no` text COLLATE utf8_unicode_ci,
  `part_no_2` text COLLATE utf8_unicode_ci,
  `serial_no` text COLLATE utf8_unicode_ci,
  `description` text COLLATE utf8_unicode_ci,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cost` double NOT NULL,
  `rate` double NOT NULL,
  `retail_rate` double NOT NULL,
  `category_id` int(11) NOT NULL,
  `item_type` enum('product','service') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'product',
  `item_level` int(11) DEFAULT '0',
  `item_brand` int(11) NOT NULL DEFAULT '0',
  `bar_code` text COLLATE utf8_unicode_ci,
  `blocked_sale` int(11) DEFAULT '0',
  `blocked_purchase` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3items`
--


--
-- Table structure for table `garage3items_levels`
--

CREATE TABLE `garage3items_levels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3items_levels`
--


--
-- Table structure for table `garage3items_transfer_request`
--

CREATE TABLE `garage3items_transfer_request` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `from_workplace_id` int(11) DEFAULT NULL,
  `to_workplace_id` int(11) DEFAULT NULL,
  `requested_by` int(11) DEFAULT NULL,
  `request_date` date DEFAULT NULL,
  `processed_by` int(11) DEFAULT NULL,
  `process_date` date DEFAULT NULL,
  `status` enum('transferred','rejected','pending','returned') COLLATE utf8_unicode_ci DEFAULT 'pending',
  `invoice_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3items_transfer_request`
--


--
-- Table structure for table `garage3lead_source`
--

CREATE TABLE `garage3lead_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3lead_source`
--

INSERT INTO `garage3lead_source` VALUES (1,'Google',1,0),(2,'Facebook',2,0),(3,'Twitter',3,0),(4,'Youtube',4,0),(5,'Elsewhere',5,0);

--
-- Table structure for table `garage3lead_status`
--

CREATE TABLE `garage3lead_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3lead_status`
--

INSERT INTO `garage3lead_status` VALUES (1,'New','#f1c40f',0,0),(2,'Qualified','#2d9cdb',1,0),(3,'Discussion','#29c2c2',2,0),(4,'Negotiation','#2d9cdb',3,0),(5,'Won','#83c340',4,0),(6,'Lost','#e74c3c',5,0);

--
-- Table structure for table `garage3leads`
--

CREATE TABLE `garage3leads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3leads`
--


--
-- Table structure for table `garage3leave_applications`
--

CREATE TABLE `garage3leave_applications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_hours` decimal(7,2) NOT NULL,
  `total_days` decimal(5,2) NOT NULL,
  `applicant_id` int(11) NOT NULL,
  `reason` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `checked_at` datetime DEFAULT NULL,
  `checked_by` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `user_id` (`applicant_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3leave_applications`
--


--
-- Table structure for table `garage3leave_types`
--

CREATE TABLE `garage3leave_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3leave_types`
--

INSERT INTO `garage3leave_types` VALUES (1,'Casual Leave','active','#83c340','',0),(2,'Annual Leave','active','#83c340','',0),(3,'Emergency leave','active','#29c2c2','',0),(4,'Eid Vacation','active','#83c340','',0);

--
-- Table structure for table `garage3messages`
--

CREATE TABLE `garage3messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `status` enum('unread','read') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unread',
  `message_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_by_users` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `message_from` (`from_user_id`),
  KEY `message_to` (`to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3messages`
--


--
-- Table structure for table `garage3milestones`
--

CREATE TABLE `garage3milestones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `due_date` date NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3milestones`
--


--
-- Table structure for table `garage3notes`
--

CREATE TABLE `garage3notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3notes`
--


--
-- Table structure for table `garage3notification_settings`
--

CREATE TABLE `garage3notification_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(250) NOT NULL,
  `category` varchar(50) NOT NULL,
  `enable_email` int(1) NOT NULL DEFAULT '0',
  `enable_web` int(1) NOT NULL DEFAULT '0',
  `notify_to_team` text NOT NULL,
  `notify_to_team_members` text NOT NULL,
  `notify_to_terms` text NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `event` (`event`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garage3notification_settings`
--

INSERT INTO `garage3notification_settings` VALUES (1,'project_created','project',1,1,'1','5','client_primary_contact,client_all_contacts',1,0),(2,'project_deleted','project',0,1,'1','5','project_members,client_primary_contact,client_all_contacts',2,0),(3,'project_task_created','project',0,1,'','5','project_members,task_assignee',3,0),(4,'project_task_updated','project',0,1,'','','task_assignee',4,0),(5,'project_task_assigned','project',0,1,'','','task_assignee',5,0),(7,'project_task_started','project',0,1,'','5','project_members,client_primary_contact,client_all_contacts',7,0),(8,'project_task_finished','project',0,0,'','','',8,0),(9,'project_task_reopened','project',0,0,'','','',9,0),(10,'project_task_deleted','project',0,1,'','','task_assignee',10,0),(11,'project_task_commented','project',0,1,'','','task_assignee',11,0),(12,'project_member_added','project',0,1,'','','project_members',12,0),(13,'project_member_deleted','project',0,1,'','','project_members',13,0),(14,'project_file_added','project',0,1,'','','project_members',14,0),(15,'project_file_deleted','project',0,1,'','','project_members',15,0),(16,'project_file_commented','project',0,1,'','','project_members',16,0),(17,'project_comment_added','project',0,1,'','','project_members',17,0),(18,'project_comment_replied','project',0,1,'','','project_members,comment_creator',18,0),(19,'project_customer_feedback_added','project',0,1,'','','project_members',19,0),(20,'project_customer_feedback_replied','project',0,1,'','','project_members,comment_creator',20,0),(21,'client_signup','client',0,0,'','','',21,0),(22,'invoice_online_payment_received','invoice',0,0,'','','',22,0),(23,'leave_application_submitted','leave',0,0,'','','',23,0),(24,'leave_approved','leave',0,1,'','','leave_applicant',24,0),(25,'leave_assigned','leave',0,1,'','','leave_applicant',25,0),(26,'leave_rejected','leave',0,1,'','','leave_applicant',26,0),(27,'leave_canceled','leave',0,0,'','','',27,0),(28,'ticket_created','ticket',0,1,'','6,7,5,11,12,1','client_all_contacts',28,0),(29,'ticket_commented','ticket',0,1,'','','client_primary_contact,ticket_creator',29,0),(30,'ticket_closed','ticket',0,1,'','','client_primary_contact,ticket_creator',30,0),(31,'ticket_reopened','ticket',0,1,'','','client_primary_contact,ticket_creator',31,0),(32,'estimate_request_received','estimate',0,0,'','','',32,0),(33,'estimate_sent','estimate',0,0,'','','',33,0),(34,'estimate_accepted','estimate',0,0,'','','',34,0),(35,'estimate_rejected','estimate',0,0,'','','',35,0),(36,'new_message_sent','message',0,0,'','','',36,0),(37,'message_reply_sent','message',0,0,'','','',37,0),(38,'invoice_payment_confirmation','invoice',0,0,'','','',22,0),(39,'new_event_added_in_calendar','event',0,0,'','','',39,0),(40,'recurring_invoice_created_vai_cron_job','invoice',0,0,'','','',22,0),(41,'new_announcement_created','announcement',1,1,'','','recipient',41,0),(42,'invoice_due_reminder_before_due_date','invoice',0,0,'','','',22,0),(43,'invoice_overdue_reminder','invoice',0,0,'','','',22,0),(44,'recurring_invoice_creation_reminder','invoice',0,0,'','','',22,0),(45,'project_completed','project',0,0,'','','',2,0),(46,'lead_created','lead',0,0,'','','',21,0),(47,'client_created_from_lead','lead',0,0,'','','',21,0),(48,'project_task_deadline_pre_reminder','project',0,1,'','','task_assignee',20,0),(49,'project_task_reminder_on_the_day_of_deadline','project',0,1,'','','task_assignee',20,0),(50,'project_task_deadline_overdue_reminder','project',0,1,'','','task_assignee',20,0),(51,'recurring_task_created_via_cron_job','project',0,1,'','','project_members,task_assignee',20,0),(52,'calendar_event_modified','event',0,0,'','','',39,0);

--
-- Table structure for table `garage3notifications`
--

CREATE TABLE `garage3notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `notify_to` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `event` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `project_comment_id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `ticket_comment_id` int(11) NOT NULL,
  `project_file_id` int(11) NOT NULL,
  `leave_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `activity_log_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `invoice_payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL,
  `actual_message_id` int(11) NOT NULL,
  `parent_message_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `announcement_id` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3notifications`
--


--
-- Table structure for table `garage3payment_methods`
--

CREATE TABLE `garage3payment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `online_payable` tinyint(1) NOT NULL DEFAULT '0',
  `available_on_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `minimum_payment_amount` double NOT NULL DEFAULT '0',
  `settings` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3payment_methods`
--

INSERT INTO `garage3payment_methods` VALUES (1,'Cash','custom','',0,0,0,'a:0:{}',0),(4,'Bank transfer','custom','',0,0,0,'a:0:{}',0),(5,'Cheque','custom','',0,0,0,'a:0:{}',0),(6,'jk','custom','jh',0,0,0,'a:0:{}',1),(7,'Visa','custom','',0,0,0,'a:0:{}',0);

--
-- Table structure for table `garage3paypal_ipn`
--

CREATE TABLE `garage3paypal_ipn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `ipn_hash` longtext COLLATE utf8_unicode_ci NOT NULL,
  `ipn_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3paypal_ipn`
--


--
-- Table structure for table `garage3payroll`
--

CREATE TABLE `garage3payroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month` date NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3payroll`
--


--
-- Table structure for table `garage3payroll_detail`
--

CREATE TABLE `garage3payroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3payroll_detail`
--


--
-- Table structure for table `garage3posts`
--

CREATE TABLE `garage3posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3posts`
--


--
-- Table structure for table `garage3project_comments`
--

CREATE TABLE `garage3project_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3project_comments`
--


--
-- Table structure for table `garage3project_files`
--

CREATE TABLE `garage3project_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3project_files`
--


--
-- Table structure for table `garage3project_members`
--

CREATE TABLE `garage3project_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3project_members`
--


--
-- Table structure for table `garage3project_settings`
--

CREATE TABLE `garage3project_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3project_settings`
--


--
-- Table structure for table `garage3project_time`
--

CREATE TABLE `garage3project_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3project_time`
--


--
-- Table structure for table `garage3projects`
--

CREATE TABLE `garage3projects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vehicle` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3projects`
--


--
-- Table structure for table `garage3purchase_order_items`
--

CREATE TABLE `garage3purchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3purchase_order_items`
--


--
-- Table structure for table `garage3purchase_order_payments`
--

CREATE TABLE `garage3purchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3purchase_order_payments`
--


--
-- Table structure for table `garage3purchase_orders`
--

CREATE TABLE `garage3purchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `shipment_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `work_place` int(11) DEFAULT '0',
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `wip_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3purchase_orders`
--


--
-- Table structure for table `garage3roles`
--

CREATE TABLE `garage3roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3roles`
--


--
-- Table structure for table `garage3settings`
--

CREATE TABLE `garage3settings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3settings`
--

INSERT INTO `garage3settings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Oman Garage','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','','app',0),('client_can_comment_on_files','','app',0),('client_can_comment_on_tasks','','app',0),('client_can_create_projects','','app',0),('client_can_create_tasks','','app',0),('client_can_edit_tasks','','app',0),('client_can_view_activity','','app',0),('client_can_view_gantt','','app',0),('client_can_view_milestones','','app',0),('client_can_view_overview','','app',0),('client_can_view_project_files','','app',0),('client_can_view_tasks','','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','','app',0),('client_message_users','5','app',0),('company_address','Al-Ma\'bila 11th\nPost Box No: 673, Postal Code: 113','app',0),('company_email','info@teamway.om','app',0),('company_name','My 4x4 Oman','app',0),('company_phone','00968 - 95094494','app',0),('company_vat_number','','app',0),('company_website','www.my4x4oman.com','app',0),('currency_position','right','app',0),('currency_symbol','/ OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','1','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','0','app',0),('estimate_color','#808080','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','muhand@almutsahel.com','app',0),('imap_host','','app',0),('imap_password','Mcs@123456','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','10','app',0),('initial_number_of_the_invoice','8938','app',0),('invoice_color','#808080','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','arabic','app',0),('module_announcement','','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','','app',0),('module_lead','','app',0),('module_leave','','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','','app',0),('module_todo','','app',0),('no_of_decimals','2','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('rows_per_page','100','app',0),('scrollbar','native','app',0),('send_bcc_to','','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','sigin-background-image.jpg','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('user_2_dashboard','','user',0),('user_2_personal_language','english','user',0),('weekend','5,6','app',0);

--
-- Table structure for table `garage3shipment_items`
--

CREATE TABLE `garage3shipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `purchase_order_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3shipment_items`
--


--
-- Table structure for table `garage3shipments`
--

CREATE TABLE `garage3shipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `shipment_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3shipments`
--


--
-- Table structure for table `garage3social_links`
--

CREATE TABLE `garage3social_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3social_links`
--


--
-- Table structure for table `garage3suppliers`
--

CREATE TABLE `garage3suppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `contact_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `note` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `currency_id` int(11) NOT NULL DEFAULT '0',
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3suppliers`
--


--
-- Table structure for table `garage3task_status`
--

CREATE TABLE `garage3task_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `key_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3task_status`
--

INSERT INTO `garage3task_status` VALUES (1,'To Do','to_do','#F9A52D',0,0),(2,'In progress','in_progress','#1672B9',1,0),(3,'Done','done','#00B393',2,0),(4,'holding','','#aab7b7',3,0);

--
-- Table structure for table `garage3tasks`
--

CREATE TABLE `garage3tasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `milestone_id` int(11) NOT NULL DEFAULT '0',
  `assigned_to` int(11) NOT NULL,
  `deadline` date DEFAULT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `points` tinyint(4) NOT NULL DEFAULT '1',
  `status` enum('to_do','in_progress','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `status_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `collaborators` text COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `recurring_task_id` int(11) NOT NULL DEFAULT '0',
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `created_date` date NOT NULL,
  `next_recurring_date` date DEFAULT NULL,
  `reminder_date` date NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3tasks`
--


--
-- Table structure for table `garage3taxes`
--

CREATE TABLE `garage3taxes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `percentage` double NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garage3taxes`
--

INSERT INTO `garage3taxes` VALUES (1,'Tax (10%)',10,0),(2,'VAT',5,0);

--
-- Table structure for table `garage3team`
--

CREATE TABLE `garage3team` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `members` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3team`
--


--
-- Table structure for table `garage3team_member_job_info`
--

CREATE TABLE `garage3team_member_job_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `date_of_hire` date DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `salary` double NOT NULL DEFAULT '0',
  `salary_term` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `working_hours` int(11) DEFAULT NULL,
  `yearly_leaves` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3team_member_job_info`
--


--
-- Table structure for table `garage3ticket_comments`
--

CREATE TABLE `garage3ticket_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ticket_comments`
--


--
-- Table structure for table `garage3ticket_types`
--

CREATE TABLE `garage3ticket_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3ticket_types`
--

INSERT INTO `garage3ticket_types` VALUES (1,'General Support',0),(2,'One way',0),(3,'Two way',0);

--
-- Table structure for table `garage3tickets`
--

CREATE TABLE `garage3tickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `ticket_type_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` enum('new','client_replied','open','closed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `last_activity_at` datetime DEFAULT NULL,
  `assigned_to` int(11) NOT NULL DEFAULT '0',
  `creator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `creator_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL,
  `closed_at` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3tickets`
--


--
-- Table structure for table `garage3to_do`
--

CREATE TABLE `garage3to_do` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `status` enum('to_do','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `start_date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3to_do`
--


--
-- Table structure for table `garage3transactions`
--

CREATE TABLE `garage3transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `type` text NOT NULL,
  `is_manual` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garage3transactions`
--


--
-- Table structure for table `garage3users`
--

CREATE TABLE `garage3users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nationality` varchar(250) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `first_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `superior_id` int(11) DEFAULT '-1',
  `user_type` enum('staff','client','lead') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'client',
  `is_admin` tinyint(1) NOT NULL DEFAULT '0',
  `role_id` int(11) NOT NULL DEFAULT '0',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image` text COLLATE utf8_unicode_ci,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `message_checked_at` datetime DEFAULT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `notification_checked_at` datetime DEFAULT NULL,
  `is_primary_contact` tinyint(1) NOT NULL DEFAULT '0',
  `job_title` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `disable_login` tinyint(1) NOT NULL DEFAULT '0',
  `note` mediumtext COLLATE utf8_unicode_ci,
  `address` text COLLATE utf8_unicode_ci,
  `alternative_address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `ssn` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gender` enum('male','female') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'male',
  `sticky_note` mediumtext COLLATE utf8_unicode_ci,
  `external_links` mediumtext COLLATE utf8_unicode_ci,
  `skype` text COLLATE utf8_unicode_ci,
  `enable_web_notification` tinyint(1) NOT NULL DEFAULT '1',
  `enable_email_notification` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `last_online` datetime DEFAULT NULL,
  `pt_account_id` int(11) NOT NULL DEFAULT '0',
  `sal_account_id` int(11) NOT NULL DEFAULT '0',
  `imb_account_id` int(11) NOT NULL DEFAULT '0',
  `resident_card_no` text COLLATE utf8_unicode_ci,
  `resident_card_expiry` date DEFAULT NULL,
  `passport_no` text COLLATE utf8_unicode_ci,
  `passport_expiry` date DEFAULT NULL,
  `requested_account_removal` tinyint(1) DEFAULT '0',
  `payroll` tinyint(1) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_type` (`user_type`),
  KEY `email` (`email`),
  KEY `client_id` (`client_id`),
  KEY `deleted` (`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3users`
--

INSERT INTO `garage3users` VALUES (2,'0','Admin','Admin',-1,'staff',1,0,'garage3@test.com','e10adc3949ba59abbe56e057f20f883e',NULL,'active',NULL,0,'2023-06-15 12:07:45',0,'Untitled',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'male',NULL,NULL,NULL,1,1,NULL,'2023-06-15 15:09:11',0,0,0,NULL,NULL,NULL,NULL,0,1,0);

--
-- Table structure for table `garage3vehicles`
--

CREATE TABLE `garage3vehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `ac` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'no',
  `rego` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `make` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_series` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fleet_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `transmission` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `body_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `color` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `seating_cap` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `odometer` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hours` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `drive_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `chassis_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rego_due_date` date DEFAULT NULL,
  `build_date` year(4) DEFAULT NULL COMMENT 'year',
  `produce_date` date DEFAULT NULL,
  `last_in_date` date DEFAULT NULL,
  `last_service` date DEFAULT NULL,
  `next_service` date DEFAULT NULL,
  `next_service_km` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `service_intervals` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cylinders` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `liters` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_induction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tare_mass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `radio_pin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `key_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tyre_size` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `imported_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `blocked` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4057 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3vehicles`
--


--
-- Table structure for table `garage3work_places`
--

CREATE TABLE `garage3work_places` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garage3work_places`
--


--
-- Table structure for table `garagedemoaccounts`
--

CREATE TABLE `garagedemoaccounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acc_name` varchar(255) NOT NULL,
  `acc_code` varchar(255) DEFAULT NULL,
  `acc_parent` int(11) NOT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garagedemoaccounts`
--

INSERT INTO `garagedemoaccounts` VALUES (1,'Assets','1',0,1,0),(2,'Liabilities','2',0,1,0),(3,'Owner\'s Equity','3',0,1,0),(4,'Expenses','4',0,1,0),(5,'Revenue','5',0,1,0),(6,'Cost of Goods Sold','6',0,1,0),(7,'Current Assets','1-1',1,1,0),(8,'Fixed Assets','1-2',1,1,0),(9,'Current Liabilities','2-1',2,1,0),(10,'Long-term Liabilities','2-2',2,1,0),(11,'Capital','3-1',3,1,0),(12,'Retain Earnings','3-2',3,1,0),(13,'Partners\' Withdrawal','3-3',3,1,0),(14,'Products','5-1-1',47,1,0),(15,'Services','5-1-2',47,1,0),(17,'Discounts','5-1-3',47,1,0),(18,'Banks','1-1-1',7,1,0),(19,'Cash In Hand','1-1-2',7,1,0),(20,'Receivable Accounts','1-1-3',7,1,0),(21,'Receivable Notes','1-1-4',7,1,0),(22,'Other Receivable Accounts','1-1-5',7,1,0),(23,'Employee Petty Cash','1-1-6',7,1,0),(24,'Inventory','1-1-7',7,1,0),(25,'Suppliers','2-1-1',9,1,0),(26,'Salary Payable','2-1-2',9,1,0),(47,'Sales','5-1',5,1,0),(48,'Employee Reimbursement','2-1-3',9,1,0),(52,'Default Bank','123456789',18,1,0),(53,'cheques Payable','2-1-4',9,1,0),(59,'Prepayments','1-1-8',7,1,0),(60,'Advance Payments','2-1-5',9,1,0),(67,'Salaries','4-1',4,1,0),(68,'Ahmed','1-1-3-1',20,1,0),(69,'Ahmed','2-1-5-1',60,1,0);

--
-- Table structure for table `garagedemoactivity_logs`
--

CREATE TABLE `garagedemoactivity_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `action` enum('created','updated','deleted') COLLATE utf8_unicode_ci NOT NULL,
  `log_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `log_type_title` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `log_type_id` int(11) NOT NULL DEFAULT '0',
  `changes` mediumtext COLLATE utf8_unicode_ci,
  `log_for` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `log_for_id` int(11) NOT NULL DEFAULT '0',
  `log_for2` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `log_for_id2` int(11) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoactivity_logs`
--

INSERT INTO `garagedemoactivity_logs` VALUES (1,'2023-09-06 16:08:24',2,'created','clients','',1,NULL,'',0,'',0,0),(2,'2023-09-10 13:40:51',2,'created','clients','',2,NULL,'',0,'',0,0),(3,'2023-09-10 13:44:12',2,'created','invoices','',1,NULL,'',0,'',0,0),(4,'2023-09-10 13:44:12',2,'updated','','',1,'a:1:{s:35:\"Primary Complaint[:2,textarea,0,1:]\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:12:\"window glass\";}}','',0,NULL,NULL,0),(5,'2023-09-10 13:49:24',2,'created','clients','',3,NULL,'',0,'',0,0),(6,'2023-09-10 13:49:24',2,'updated','clients','',3,'a:1:{s:10:\"account_id\";a:2:{s:4:\"from\";s:1:\"0\";s:2:\"to\";i:68;}}','',0,'',0,0),(7,'2023-09-10 13:49:24',2,'updated','clients','',3,'a:1:{s:18:\"advance_account_id\";a:2:{s:4:\"from\";s:1:\"0\";s:2:\"to\";i:69;}}','',0,'',0,0),(8,'2023-09-10 13:49:24',2,'created','invoices','',2,NULL,'',0,'',0,0),(9,'2023-09-10 13:52:24',2,'created','item_categories','',5,NULL,'',0,'',0,0),(10,'2023-09-10 13:52:31',2,'created','item_categories','',6,NULL,'',0,'',0,0),(11,'2023-09-10 13:53:13',2,'created','items','',1,NULL,'',0,'',0,0),(12,'2023-09-10 13:53:34',2,'created','item_categories','',7,NULL,'',0,'',0,0),(13,'2023-09-10 13:55:13',2,'created','items','',2,NULL,'',0,'',0,0),(14,'2023-09-10 13:56:09',2,'created','invoice_items','',1,NULL,'',0,'',0,0),(15,'2023-09-10 13:56:44',2,'created','invoice_items','',2,NULL,'',0,'',0,0),(16,'2023-09-10 13:58:46',2,'updated','invoices','',2,'a:1:{s:15:\"approval_status\";a:2:{s:4:\"from\";s:12:\"not_approved\";s:2:\"to\";s:8:\"approved\";}}','',0,'',0,0);

--
-- Table structure for table `garagedemoannouncements`
--

CREATE TABLE `garagedemoannouncements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `created_at` datetime NOT NULL,
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoannouncements`
--


--
-- Table structure for table `garagedemoattendance`
--

CREATE TABLE `garagedemoattendance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` enum('incomplete','pending','approved','rejected','deleted') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'incomplete',
  `user_id` int(11) NOT NULL,
  `in_time` datetime NOT NULL,
  `out_time` datetime DEFAULT NULL,
  `checked_by` int(11) DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `checked_at` datetime DEFAULT NULL,
  `reject_reason` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoattendance`
--


--
-- Table structure for table `garagedemobrands`
--

CREATE TABLE `garagedemobrands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `models` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemobrands`
--

INSERT INTO `garagedemobrands` VALUES (1,'BMW','335I',0),(2,'CADILLAC','ESCALADE',0),(3,'CHEVORLET','SILVERADO 1500,TAHOE,SUBURBAN,AVALANCHE,TRAVERSE,TRAVERSE AWD',0),(4,'CHRYSLER','CHRYSLER 300LX,GRAND VOYAGER,200C',0),(5,'DODGE','DORANGO ,CHARGER ,CALIBER ,RAM ,CHALENGER ,NITRO',0),(6,'FIAT','500',0),(7,'FORD','PICK-UP,DS350 AMBULANCE,F150,EXPEDITION,EXPLORER,RAPTOR,F250 SUPER DUTY,MUSTANG,RANGER,FOCUS,EDGE',0),(8,'GMC','YUKON XL ,SIERRA ,BUS 4X4 ,FIRE ,SIERRA DENALI ,ENVOY ,ACADIA',0),(9,'HUMMER','H2',0),(10,'HYUNDAI','SANTAFE',0),(11,'INFINITY','QX56,QX80',0),(12,'JEEP','CHEROKEE,SAHARA,GRAND CHEROKEE,COMANDER,LIBERTY,PATRIOT,COMPASS,RENEGADE,GRAND CHEROKEE SRT8,WRANGLER YJ,WRANGLER TJ,WRANGLER JK,WRANGLER JL,GLADIATOR',0),(13,'KIA','SOUL ,CERATO ,CARNAVAL',0),(14,'LAND ROVER','110 ,LR3 ,S 2 ,90 ,LR4 ,DISCOVERY',0),(15,'LEXUS','400 ,LX470 ,RX350',0),(16,'MAN','RECOVERI 25T, RECOVERY 1002',0),(17,'MANTRA','MANTRA',0),(18,'MAZDA','PIK UP,BUS,CX5,CX9',0),(19,'MERCEDES','E200,G-CLASS 500',0),(20,'MITSUBISHI','PAJERO,PICK UP,BUS,OUTLANDER',0),(21,'NISSAN','PATROL Y61,SUNNY,INFINITI,XTERRA,BUS,PICK UP,PATROL Y62,ARMADA,SENTRA,PATHFINDER,ALTIMA',0),(22,'PORSCHE','CAYENNE',0),(23,'SUZUKI','JIMMY',0),(24,'TOYOTA','LANDCRUISER,HILUX,FJ CRUISER,BUS COASTER,PRADO,TACOMA PICKUP,DAYNA,COROLA,AVALON,YARIS,EMBULANCE,TUNDRA,FORTUNER,RAV4,LEXUS ES330,LEXUS,CAMRY,ECHO,DAYHASU,SEQUOIA',0),(25,'VOLKSWAGON','TOURAGE',0);

--
-- Table structure for table `garagedemochecklist_items`
--

CREATE TABLE `garagedemochecklist_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `is_checked` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemochecklist_items`
--


--
-- Table structure for table `garagedemoci_sessions`
--

CREATE TABLE `garagedemoci_sessions` (
  `id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoci_sessions`
--

INSERT INTO `garagedemoci_sessions` VALUES ('6b33b4cc92625812999af8f04a75952cb1102b22','170.187.237.234',1690876373,_binary '__ci_last_regenerate|i:1690875990;user_id|s:1:\"2\";'),('72bf749541f612890e548cefbacaef5db8e5689d','5.162.26.185',1690876224,_binary '__ci_last_regenerate|i:1690876224;'),('85a0f8899f13ee5bc2d3c65428cd924982d4ec26','5.162.26.185',1690876224,_binary '__ci_last_regenerate|i:1690876224;'),('dfc135b4525dbad5d376d9ff3f8f642707698f6c','5.162.26.185',1690876227,_binary '__ci_last_regenerate|i:1690876227;'),('557d7a5e4ad94d565b9206b12d319f404eb0178a','5.162.26.185',1690876227,_binary '__ci_last_regenerate|i:1690876227;'),('3409e40de593db87e642fac155323d0bb30bbddb','161.8.109.180',1690975890,_binary '__ci_last_regenerate|i:1690975890;'),('a778b19471e2cd239366a2966f3b481a35d3ebb9','161.8.109.180',1690975890,_binary '__ci_last_regenerate|i:1690975890;'),('5a49f388308642257bd2ad50b8c0710d2b9756a9','134.0.176.9',1691223419,_binary '__ci_last_regenerate|i:1691223419;user_id|s:1:\"2\";'),('7769736426ad50a62efc3e36f0d23a12233031c1','134.0.176.9',1691225665,_binary '__ci_last_regenerate|i:1691223419;user_id|s:1:\"2\";'),('057462d923c2c5462185190c0a57ea81e7fa93be','134.0.176.9',1691224223,_binary '__ci_last_regenerate|i:1691224223;'),('5d11a4a1cf357b96dd52f2822606aefee84de5db','134.0.176.9',1691223889,_binary '__ci_last_regenerate|i:1691223889;'),('c73ac5d5f1de1a86f30fa385d5ac81da30a43a4c','134.0.176.9',1691228436,_binary '__ci_last_regenerate|i:1691224223;user_id|s:1:\"2\";'),('fb5979882640c97e92a09276367e2e74058d1279','134.0.176.9',1691292632,''),('752c69eff0197bbcabb731655439bcdb83166920','134.0.176.9',1691292632,''),('e0bf560eea4d873f5e3b2b3ef6ab9bac0359d4bd','37.41.108.187',1691510765,_binary '__ci_last_regenerate|i:1691510591;user_id|s:1:\"2\";'),('ef54f1b7250ebfb5e17f4776c32f35f16723f4d9','37.28.113.72',1694016704,_binary '__ci_last_regenerate|i:1694016704;user_id|s:1:\"2\";'),('644745e7dbfc43cfdd5c3a5e3b4d76e0c574526a','37.28.113.72',1694016769,_binary '__ci_last_regenerate|i:1694016704;user_id|s:1:\"2\";'),('b480c994856e4afc84f54d8d5a47ab9da208e74c','37.41.50.169',1694076547,_binary '__ci_last_regenerate|i:1694075847;user_id|s:1:\"2\";'),('31af091ce5139b6a8ff8682283fde80f516be1ab','161.8.109.180',1694353415,_binary '__ci_last_regenerate|i:1694353415;user_id|s:1:\"2\";'),('b4d6b118f0f3d4b33de87eb81fa85a3c8fe17e0b','54.91.146.119',1694352943,_binary '__ci_last_regenerate|i:1694352943;'),('665f3d642b91d8ac9c8350a0c1ac7bbf3176196b','54.91.146.119',1694352944,_binary '__ci_last_regenerate|i:1694352944;'),('bc0b1c92bba33eefc6a6b44d242ca63d17e9023e','161.8.109.180',1694353454,_binary '__ci_last_regenerate|i:1694353454;user_id|s:1:\"2\";'),('c60cb2b48c7791af85c2d52a1c6ecdc2d7627505','161.8.109.180',1694353442,_binary '__ci_last_regenerate|i:1694353415;user_id|s:1:\"2\";'),('e1c58917248c038c2df4e503b7e32636f4f93ec5','54.38.214.107',1694353453,_binary '__ci_last_regenerate|i:1694353452;'),('dded225a89ebc878a303bcbed230a61e12feddc1','161.8.109.180',1694353766,_binary '__ci_last_regenerate|i:1694353766;user_id|s:1:\"2\";'),('d0b6efa8cee9057ad3895f9ce21f47a43415ecd5','54.38.214.107',1694353764,_binary '__ci_last_regenerate|i:1694353764;'),('a23236ecef4b1d0e8bff97ba256888a26f08cbde','161.8.109.180',1694354121,_binary '__ci_last_regenerate|i:1694354121;user_id|s:1:\"2\";'),('ac9ef2c1ef65a79655ceb518b59b393779e9cbbc','161.8.109.180',1694354441,_binary '__ci_last_regenerate|i:1694354441;user_id|s:1:\"2\";'),('822b0a6df377925f93202e83bc6e71421dbe1955','161.8.109.180',1694356005,_binary '__ci_last_regenerate|i:1694354441;user_id|s:1:\"2\";'),('72366ab5de6f8bd280d1944b447471717ed89e99','161.8.109.180',1694405466,_binary '__ci_last_regenerate|i:1694405466;'),('c7bb1a359c2910dc5a4e7330ec4b345a3eb49bb3','161.8.109.180',1694436916,_binary '__ci_last_regenerate|i:1694436916;'),('2f0e2165d5267b0bf58407a1c92120f6b84fac00','161.8.109.180',1694521954,_binary '__ci_last_regenerate|i:1694521954;user_id|s:1:\"2\";'),('54b7ab8932bc23109a2cc663a7eac60f7be8bace','161.8.109.180',1694529300,_binary '__ci_last_regenerate|i:1694521954;user_id|s:1:\"2\";'),('6256b8d52bdb4a7f4c1b12756eb55929fe197912','161.8.109.180',1694591592,_binary '__ci_last_regenerate|i:1694591592;'),('815233abcfe55ce1f74bbb311a7a3a2f0c61d75e','161.8.109.180',1695209163,_binary '__ci_last_regenerate|i:1695209163;'),('cec7d6592f0093f5a3731636243d0543d7eef754','161.8.109.180',1695209163,_binary '__ci_last_regenerate|i:1695209163;'),('cbfd7a08e0c583558a3eb7903da5b9ceb8c2907b','5.36.68.7',1706975793,_binary '__ci_last_regenerate|i:1706772633;user_id|s:1:\"2\";'),('651cc2a29180798d05403754cba54f42e9885440','5.36.68.7',1706776576,_binary '__ci_last_regenerate|i:1706776576;'),('249f7470acbba0e133fd253a900ddbecc2c3b471','5.36.68.7',1706776576,_binary '__ci_last_regenerate|i:1706776576;'),('790711e8de8a37feaf269af51bec455aec49d20d','5.36.68.7',1706776576,_binary '__ci_last_regenerate|i:1706776576;'),('26ab51620b2d89de388a9b1fe676b5989ea5f10c','5.36.68.7',1706777485,_binary '__ci_last_regenerate|i:1706777485;'),('1e02fb71cdf04573fffe3eccfc943beaf063a0d6','5.36.68.7',1706777485,_binary '__ci_last_regenerate|i:1706777485;'),('9cc940dc143319695b709faa5e6a833f87c284ec','5.36.192.78',1707635269,_binary '__ci_last_regenerate|i:1707635269;'),('4f6fe996f7940083a8816b59b6e7a001406adc7f','5.37.220.28',1708178115,_binary '__ci_last_regenerate|i:1708178040;user_id|s:1:\"2\";'),('70b4a5d71fd5cfe8521ed72a68fd7b89b36ac58f','5.37.220.28',1708182925,_binary '__ci_last_regenerate|i:1708182925;'),('019f5dd9a7e6db1b7f2afa77cf915f0bc9433f43','5.37.220.28',1708182925,_binary '__ci_last_regenerate|i:1708182925;'),('a07efd4cb54351061020f01185f57782927843e4','5.37.220.28',1708182986,_binary '__ci_last_regenerate|i:1708182986;'),('0ec8b76695067a6fe42a2dde8d003dd7a3b93014','5.37.220.28',1708182986,_binary '__ci_last_regenerate|i:1708182986;'),('04aa88d67608148757ee5f86d78c8fe3067e59c2','5.37.220.28',1708183046,_binary '__ci_last_regenerate|i:1708183046;'),('0ce918fce918e59ee71cd673e60a78d64e41b6a4','5.37.220.28',1708183047,_binary '__ci_last_regenerate|i:1708183047;'),('bc69b2dba86b8a4076931eeb0d20803fb7b7a205','5.37.220.28',1708183047,_binary '__ci_last_regenerate|i:1708183047;'),('53c7b80dab68010dd92b09a9fae12dcb8b8c52bc','5.36.228.71',1719133120,_binary '__ci_last_regenerate|i:1719133120;user_id|s:1:\"2\";'),('379d92f645859d652a69c83f5ebc11c37242c021','5.36.228.71',1719133447,_binary '__ci_last_regenerate|i:1719133447;user_id|s:1:\"2\";'),('8f9601dbb8521b6deff089808ea1a40a05c48642','5.36.228.71',1719144746,_binary '__ci_last_regenerate|i:1719144746;user_id|s:1:\"2\";'),('9590ea73f9e870e471db91d515a3ea20a02b8ab8','5.36.228.71',1719144853,_binary '__ci_last_regenerate|i:1719144746;user_id|s:1:\"2\";'),('82d7ccfcc5abb7ff9d0fe1da176866221735931f','161.8.109.180',1726149136,_binary '__ci_last_regenerate|i:1726149132;'),('9bad54ac85f5d27e50e3056b1f176790fdfdd5e8','37.41.37.237',1748758371,_binary '__ci_last_regenerate|i:1748758371;');

--
-- Table structure for table `garagedemoclient_groups`
--

CREATE TABLE `garagedemoclient_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoclient_groups`
--

INSERT INTO `garagedemoclient_groups` VALUES (1,'Regular',0),(2,'VIP',0);

--
-- Table structure for table `garagedemoclients`
--

CREATE TABLE `garagedemoclients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `group_ids` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `is_lead` tinyint(1) NOT NULL DEFAULT '0',
  `lead_status_id` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `lead_source_id` int(11) NOT NULL,
  `last_lead_status` text COLLATE utf8_unicode_ci NOT NULL,
  `client_migration_date` date NOT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `disable_online_payment` tinyint(1) NOT NULL DEFAULT '0',
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `blocked_sale` tinyint(1) DEFAULT '0',
  `blocked_jobcard` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoclients`
--

INSERT INTO `garagedemoclients` VALUES (1,'OMAR','KK','','','','','2023-09-06','','KK','','','',0,0,0,0,0,0,'','0000-00-00','','',0,NULL,0,0,0,0),(2,'Mohammed',NULL,NULL,NULL,NULL,NULL,'2023-09-10',NULL,'96732388',NULL,'','',0,0,0,0,0,0,'','0000-00-00',NULL,NULL,0,NULL,0,0,0,0),(3,'Ahmed','','','','','','2023-09-10','','978653',NULL,'','',0,0,0,0,0,0,'','0000-00-00','',NULL,0,NULL,68,69,0,0);

--
-- Table structure for table `garagedemocontacts`
--

CREATE TABLE `garagedemocontacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `job_title` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `created_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemocontacts`
--


--
-- Table structure for table `garagedemocurrencies`
--

CREATE TABLE `garagedemocurrencies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `symbol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL DEFAULT '1',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemocurrencies`
--

INSERT INTO `garagedemocurrencies` VALUES (1,'USD','$',2.6,0),(2,'OMR','OMR',1,0);

--
-- Table structure for table `garagedemocustom_field_values`
--

CREATE TABLE `garagedemocustom_field_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `related_to_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to_id` int(11) NOT NULL,
  `custom_field_id` int(11) NOT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemocustom_field_values`
--

INSERT INTO `garagedemocustom_field_values` VALUES (1,'projects',1,2,'window glass',0);

--
-- Table structure for table `garagedemocustom_fields`
--

CREATE TABLE `garagedemocustom_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `placeholder` text COLLATE utf8_unicode_ci NOT NULL,
  `example_variable_name` text COLLATE utf8_unicode_ci,
  `options` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `field_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_table` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_estimate` tinyint(1) NOT NULL DEFAULT '0',
  `visible_to_admins_only` tinyint(1) NOT NULL DEFAULT '0',
  `hide_from_clients` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemocustom_fields`
--

INSERT INTO `garagedemocustom_fields` VALUES (1,'phone number 2','phone number 2','','','number','clients',1,0,1,0,0,0,0,1),(2,'Primary Complaint','Primary Complaint','','','textarea','projects',1,0,1,0,0,0,1,0);

--
-- Table structure for table `garagedemocustom_widgets`
--

CREATE TABLE `garagedemocustom_widgets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `content` text COLLATE utf8_unicode_ci,
  `show_title` tinyint(1) NOT NULL DEFAULT '0',
  `show_border` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemocustom_widgets`
--


--
-- Table structure for table `garagedemodashboards`
--

CREATE TABLE `garagedemodashboards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `data` text COLLATE utf8_unicode_ci,
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemodashboards`
--

INSERT INTO `garagedemodashboards` VALUES (2,25,'un paid invoice','a:0:{}','#83c340',0,0),(3,25,'tree','a:0:{}','#2d9cdb',0,0);

--
-- Table structure for table `garagedemodelivery_note_items`
--

CREATE TABLE `garagedemodelivery_note_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `invoice_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `delivery_note_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemodelivery_note_items`
--


--
-- Table structure for table `garagedemodelivery_notes`
--

CREATE TABLE `garagedemodelivery_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(11) NOT NULL DEFAULT '0',
  `delivery_note_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemodelivery_notes`
--


--
-- Table structure for table `garagedemoemail_templates`
--

CREATE TABLE `garagedemoemail_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `email_subject` text COLLATE utf8_unicode_ci NOT NULL,
  `default_message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `custom_message` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoemail_templates`
--


--
-- Table structure for table `garagedemoenteries`
--

CREATE TABLE `garagedemoenteries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trans_id` int(11) NOT NULL,
  `account` int(11) NOT NULL,
  `type` enum('dr','cr') NOT NULL,
  `amount` double NOT NULL,
  `narration` text NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garagedemoenteries`
--


--
-- Table structure for table `garagedemoestimate_forms`
--

CREATE TABLE `garagedemoestimate_forms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `enable_attachment` tinyint(4) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoestimate_forms`
--


--
-- Table structure for table `garagedemoestimate_items`
--

CREATE TABLE `garagedemoestimate_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoestimate_items`
--


--
-- Table structure for table `garagedemoestimate_requests`
--

CREATE TABLE `garagedemoestimate_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimate_form_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `status` enum('new','processing','hold','canceled','estimated') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoestimate_requests`
--


--
-- Table structure for table `garagedemoestimates`
--

CREATE TABLE `garagedemoestimates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL DEFAULT '0',
  `estimate_date` date NOT NULL,
  `valid_until` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','sent','accepted','declined','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoestimates`
--


--
-- Table structure for table `garagedemoevents`
--

CREATE TABLE `garagedemoevents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `location` mediumtext COLLATE utf8_unicode_ci,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `editable_google_event` tinyint(1) NOT NULL DEFAULT '0',
  `google_event_id` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` int(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `last_start_date` date DEFAULT NULL,
  `recurring_dates` longtext COLLATE utf8_unicode_ci NOT NULL,
  `confirmed_by` text COLLATE utf8_unicode_ci NOT NULL,
  `rejected_by` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoevents`
--


--
-- Table structure for table `garagedemoexpense_categories`
--

CREATE TABLE `garagedemoexpense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoexpense_categories`
--

INSERT INTO `garagedemoexpense_categories` VALUES (1,'Rent',92,0);

--
-- Table structure for table `garagedemoexpenses`
--

CREATE TABLE `garagedemoexpenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_date` date NOT NULL,
  `category_id` int(11) NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `amount` double NOT NULL,
  `payment_mode` enum('bank','cash_on_hand','cheque','reimbursement','pt_cash') COLLATE utf8_unicode_ci NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` int(11) DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `status` enum('draft','request_approval','approved','rejected') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoexpenses`
--


--
-- Table structure for table `garagedemogeneral_files`
--

CREATE TABLE `garagedemogeneral_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `eroom_id` int(11) NOT NULL DEFAULT '0',
  `vehicle_id` int(11) NOT NULL DEFAULT '0',
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemogeneral_files`
--


--
-- Table structure for table `garagedemohelp_articles`
--

CREATE TABLE `garagedemohelp_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `total_views` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemohelp_articles`
--


--
-- Table structure for table `garagedemohelp_categories`
--

CREATE TABLE `garagedemohelp_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('help','knowledge_base') COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemohelp_categories`
--


--
-- Table structure for table `garagedemointernal_transactions`
--

CREATE TABLE `garagedemointernal_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `from_employee` int(11) NOT NULL,
  `to_employee` int(11) NOT NULL,
  `amount` float(10,3) NOT NULL,
  `note` text COLLATE utf8_bin NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_bin NOT NULL DEFAULT 'draft',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `garagedemointernal_transactions`
--


--
-- Table structure for table `garagedemoinventory`
--

CREATE TABLE `garagedemoinventory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `module` enum('purchase_orders','stock_issues','stock_returns','invoices','inventory_adjustment','invoice_returns') COLLATE utf8_unicode_ci NOT NULL,
  `module_id` int(11) DEFAULT NULL,
  `module_item_id` int(11) DEFAULT NULL,
  `quantity` float DEFAULT '0',
  `datetime` datetime DEFAULT NULL,
  `from_id` int(11) NOT NULL COMMENT '100 from supplier, 101 from client, else branch id. ',
  `to_id` int(11) NOT NULL COMMENT '100 to supplier, 101 to client, else branch id. ',
  `reserved` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoinventory`
--

INSERT INTO `garagedemoinventory` VALUES (1,2,'invoices',2,1,1,'2023-09-10 00:00:00',7,101,0,NULL,0),(2,1,'invoices',2,2,1,'2023-09-10 00:00:00',7,101,0,NULL,0),(3,2,'inventory_adjustment',0,0,11,'2023-09-10 00:00:00',102,7,0,'',0),(4,2,'inventory_adjustment',0,0,9,'2024-06-23 00:00:00',7,102,0,'',0),(5,2,'inventory_adjustment',0,0,1,'2024-06-23 00:00:00',7,102,0,'',0),(6,2,'inventory_adjustment',0,0,2,'2024-06-23 00:00:00',102,6,0,'',0);

--
-- Table structure for table `garagedemoinvoice_items`
--

CREATE TABLE `garagedemoinvoice_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `invoice_id` int(11) NOT NULL,
  `non_stock` int(11) DEFAULT '0',
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoinvoice_items`
--

INSERT INTO `garagedemoinvoice_items` VALUES (1,2,'High Performance Tyre','',1,'No',60,60,0,2,0,0,0),(2,1,'Tyre Repair','',1,'',20,20,0,2,0,0,0);

--
-- Table structure for table `garagedemoinvoice_payments`
--

CREATE TABLE `garagedemoinvoice_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `invoice_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `account_transaction_id` int(11) NOT NULL DEFAULT '0',
  `advance_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoinvoice_payments`
--


--
-- Table structure for table `garagedemoinvoices`
--

CREATE TABLE `garagedemoinvoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `bill_date` date NOT NULL,
  `due_date` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','not_paid','cancelled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `delivery_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `approval_status` enum('not_approved','request_approval','approved','reserved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(4) NOT NULL DEFAULT '0',
  `recurring_invoice_id` int(11) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `next_recurring_date` date DEFAULT NULL,
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `due_reminder_date` date DEFAULT NULL,
  `recurring_reminder_date` date DEFAULT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` int(11) NOT NULL,
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoinvoices`
--

INSERT INTO `garagedemoinvoices` VALUES (1,2,1,'2023-09-10','2023-09-10',NULL,NULL,NULL,'draft','not_delivered','not_approved',0,0,0,0,0,NULL,0,NULL,0,NULL,NULL,0,'percentage','before_tax',NULL,0,7,0),(2,3,2,'2023-09-10','2023-09-10',NULL,NULL,NULL,'draft','not_delivered','approved',0,0,0,0,0,NULL,0,NULL,0,NULL,NULL,0,'percentage','before_tax',NULL,0,7,0);

--
-- Table structure for table `garagedemoip_sin`
--

CREATE TABLE `garagedemoip_sin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `sqn_id` int(11) DEFAULT '0',
  `delivery_user_id` int(11) DEFAULT NULL,
  `status` enum('draft','approved','rejected','assigned','received','returned','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `receiver_user_id` int(11) DEFAULT NULL,
  `delivery_comments` text COLLATE utf8_unicode_ci,
  `receiver_comments` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_sin`
--


--
-- Table structure for table `garagedemoip_sin_items`
--

CREATE TABLE `garagedemoip_sin_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sin_id` int(11) NOT NULL,
  `sqn_item_id` int(11) DEFAULT '0',
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_sin_items`
--


--
-- Table structure for table `garagedemoip_sqn`
--

CREATE TABLE `garagedemoip_sqn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_sqn`
--

INSERT INTO `garagedemoip_sqn` VALUES (1,7,'2023-09-10','test','draft','',0);

--
-- Table structure for table `garagedemoip_sqn_items`
--

CREATE TABLE `garagedemoip_sqn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `sqn_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_sqn_items`
--


--
-- Table structure for table `garagedemoip_srn`
--

CREATE TABLE `garagedemoip_srn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `branch_id` int(11) NOT NULL,
  `to_branch_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT '0',
  `client_id` int(11) DEFAULT '0',
  `invoice_id` int(11) DEFAULT '0',
  `reason` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','rejected','completed','final_approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_srn`
--


--
-- Table structure for table `garagedemoip_srn_items`
--

CREATE TABLE `garagedemoip_srn_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `srn_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoip_srn_items`
--


--
-- Table structure for table `garagedemoitem_brands`
--

CREATE TABLE `garagedemoitem_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoitem_brands`
--


--
-- Table structure for table `garagedemoitem_categories`
--

CREATE TABLE `garagedemoitem_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoitem_categories`
--

INSERT INTO `garagedemoitem_categories` VALUES (5,'Replacement',0),(6,'Repair',0),(7,'Tyres',0);

--
-- Table structure for table `garagedemoitems`
--

CREATE TABLE `garagedemoitems` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `part_no` text COLLATE utf8_unicode_ci,
  `part_no_2` text COLLATE utf8_unicode_ci,
  `serial_no` text COLLATE utf8_unicode_ci,
  `description` text COLLATE utf8_unicode_ci,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cost` double NOT NULL,
  `rate` double NOT NULL,
  `retail_rate` double NOT NULL,
  `category_id` int(11) NOT NULL,
  `item_type` enum('product','service') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'product',
  `item_level` int(11) DEFAULT '0',
  `item_brand` int(11) NOT NULL DEFAULT '0',
  `bar_code` text COLLATE utf8_unicode_ci,
  `blocked_sale` int(11) DEFAULT '0',
  `blocked_purchase` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoitems`
--

INSERT INTO `garagedemoitems` VALUES (1,'Tyre Repair','','','','','',10,20,30,6,'service',0,0,'',0,0,0),(2,'High Performance Tyre','','','','','',50,60,90,7,'product',0,0,'',0,0,0);

--
-- Table structure for table `garagedemoitems_levels`
--

CREATE TABLE `garagedemoitems_levels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoitems_levels`
--


--
-- Table structure for table `garagedemoitems_transfer_request`
--

CREATE TABLE `garagedemoitems_transfer_request` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `from_workplace_id` int(11) DEFAULT NULL,
  `to_workplace_id` int(11) DEFAULT NULL,
  `requested_by` int(11) DEFAULT NULL,
  `request_date` date DEFAULT NULL,
  `processed_by` int(11) DEFAULT NULL,
  `process_date` date DEFAULT NULL,
  `status` enum('transferred','rejected','pending','returned') COLLATE utf8_unicode_ci DEFAULT 'pending',
  `invoice_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoitems_transfer_request`
--


--
-- Table structure for table `garagedemolead_source`
--

CREATE TABLE `garagedemolead_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemolead_source`
--

INSERT INTO `garagedemolead_source` VALUES (1,'Google',1,0),(2,'Facebook',2,0),(3,'Twitter',3,0),(4,'Youtube',4,0),(5,'Elsewhere',5,0);

--
-- Table structure for table `garagedemolead_status`
--

CREATE TABLE `garagedemolead_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemolead_status`
--

INSERT INTO `garagedemolead_status` VALUES (1,'New','#f1c40f',0,0),(2,'Qualified','#2d9cdb',1,0),(3,'Discussion','#29c2c2',2,0),(4,'Negotiation','#2d9cdb',3,0),(5,'Won','#83c340',4,0),(6,'Lost','#e74c3c',5,0);

--
-- Table structure for table `garagedemoleads`
--

CREATE TABLE `garagedemoleads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoleads`
--


--
-- Table structure for table `garagedemoleave_applications`
--

CREATE TABLE `garagedemoleave_applications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_hours` decimal(7,2) NOT NULL,
  `total_days` decimal(5,2) NOT NULL,
  `applicant_id` int(11) NOT NULL,
  `reason` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `checked_at` datetime DEFAULT NULL,
  `checked_by` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `user_id` (`applicant_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoleave_applications`
--


--
-- Table structure for table `garagedemoleave_types`
--

CREATE TABLE `garagedemoleave_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoleave_types`
--

INSERT INTO `garagedemoleave_types` VALUES (1,'Casual Leave','active','#83c340','',0),(2,'Annual Leave','active','#83c340','',0),(3,'Emergency leave','active','#29c2c2','',0),(4,'Eid Vacation','active','#83c340','',0);

--
-- Table structure for table `garagedemomessages`
--

CREATE TABLE `garagedemomessages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `status` enum('unread','read') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unread',
  `message_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_by_users` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `message_from` (`from_user_id`),
  KEY `message_to` (`to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemomessages`
--


--
-- Table structure for table `garagedemomilestones`
--

CREATE TABLE `garagedemomilestones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `due_date` date NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemomilestones`
--


--
-- Table structure for table `garagedemonotes`
--

CREATE TABLE `garagedemonotes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemonotes`
--


--
-- Table structure for table `garagedemonotification_settings`
--

CREATE TABLE `garagedemonotification_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(250) NOT NULL,
  `category` varchar(50) NOT NULL,
  `enable_email` int(1) NOT NULL DEFAULT '0',
  `enable_web` int(1) NOT NULL DEFAULT '0',
  `notify_to_team` text NOT NULL,
  `notify_to_team_members` text NOT NULL,
  `notify_to_terms` text NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `event` (`event`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garagedemonotification_settings`
--

INSERT INTO `garagedemonotification_settings` VALUES (1,'project_created','project',1,1,'1','5','client_primary_contact,client_all_contacts',1,0),(2,'project_deleted','project',0,1,'1','5','project_members,client_primary_contact,client_all_contacts',2,0),(3,'project_task_created','project',0,1,'','5','project_members,task_assignee',3,0),(4,'project_task_updated','project',0,1,'','','task_assignee',4,0),(5,'project_task_assigned','project',0,1,'','','task_assignee',5,0),(7,'project_task_started','project',0,1,'','5','project_members,client_primary_contact,client_all_contacts',7,0),(8,'project_task_finished','project',0,0,'','','',8,0),(9,'project_task_reopened','project',0,0,'','','',9,0),(10,'project_task_deleted','project',0,1,'','','task_assignee',10,0),(11,'project_task_commented','project',0,1,'','','task_assignee',11,0),(12,'project_member_added','project',0,1,'','','project_members',12,0),(13,'project_member_deleted','project',0,1,'','','project_members',13,0),(14,'project_file_added','project',0,1,'','','project_members',14,0),(15,'project_file_deleted','project',0,1,'','','project_members',15,0),(16,'project_file_commented','project',0,1,'','','project_members',16,0),(17,'project_comment_added','project',0,1,'','','project_members',17,0),(18,'project_comment_replied','project',0,1,'','','project_members,comment_creator',18,0),(19,'project_customer_feedback_added','project',0,1,'','','project_members',19,0),(20,'project_customer_feedback_replied','project',0,1,'','','project_members,comment_creator',20,0),(21,'client_signup','client',0,0,'','','',21,0),(22,'invoice_online_payment_received','invoice',0,0,'','','',22,0),(23,'leave_application_submitted','leave',0,0,'','','',23,0),(24,'leave_approved','leave',0,1,'','','leave_applicant',24,0),(25,'leave_assigned','leave',0,1,'','','leave_applicant',25,0),(26,'leave_rejected','leave',0,1,'','','leave_applicant',26,0),(27,'leave_canceled','leave',0,0,'','','',27,0),(28,'ticket_created','ticket',0,1,'','6,7,5,11,12,1','client_all_contacts',28,0),(29,'ticket_commented','ticket',0,1,'','','client_primary_contact,ticket_creator',29,0),(30,'ticket_closed','ticket',0,1,'','','client_primary_contact,ticket_creator',30,0),(31,'ticket_reopened','ticket',0,1,'','','client_primary_contact,ticket_creator',31,0),(32,'estimate_request_received','estimate',0,0,'','','',32,0),(33,'estimate_sent','estimate',0,0,'','','',33,0),(34,'estimate_accepted','estimate',0,0,'','','',34,0),(35,'estimate_rejected','estimate',0,0,'','','',35,0),(36,'new_message_sent','message',0,0,'','','',36,0),(37,'message_reply_sent','message',0,0,'','','',37,0),(38,'invoice_payment_confirmation','invoice',0,0,'','','',22,0),(39,'new_event_added_in_calendar','event',0,0,'','','',39,0),(40,'recurring_invoice_created_vai_cron_job','invoice',0,0,'','','',22,0),(41,'new_announcement_created','announcement',1,1,'','','recipient',41,0),(42,'invoice_due_reminder_before_due_date','invoice',0,0,'','','',22,0),(43,'invoice_overdue_reminder','invoice',0,0,'','','',22,0),(44,'recurring_invoice_creation_reminder','invoice',0,0,'','','',22,0),(45,'project_completed','project',0,0,'','','',2,0),(46,'lead_created','lead',0,0,'','','',21,0),(47,'client_created_from_lead','lead',0,0,'','','',21,0),(48,'project_task_deadline_pre_reminder','project',0,1,'','','task_assignee',20,0),(49,'project_task_reminder_on_the_day_of_deadline','project',0,1,'','','task_assignee',20,0),(50,'project_task_deadline_overdue_reminder','project',0,1,'','','task_assignee',20,0),(51,'recurring_task_created_via_cron_job','project',0,1,'','','project_members,task_assignee',20,0),(52,'calendar_event_modified','event',0,0,'','','',39,0);

--
-- Table structure for table `garagedemonotifications`
--

CREATE TABLE `garagedemonotifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `notify_to` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `event` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `project_comment_id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `ticket_comment_id` int(11) NOT NULL,
  `project_file_id` int(11) NOT NULL,
  `leave_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `activity_log_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `invoice_payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL,
  `actual_message_id` int(11) NOT NULL,
  `parent_message_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `announcement_id` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemonotifications`
--

INSERT INTO `garagedemonotifications` VALUES (1,2,'','2023-09-10 13:44:12','','','project_created',1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,2,'','2023-09-10 13:49:24','4','','project_created',2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

--
-- Table structure for table `garagedemopayment_methods`
--

CREATE TABLE `garagedemopayment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `online_payable` tinyint(1) NOT NULL DEFAULT '0',
  `available_on_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `minimum_payment_amount` double NOT NULL DEFAULT '0',
  `settings` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopayment_methods`
--

INSERT INTO `garagedemopayment_methods` VALUES (1,'Cash','custom','',0,0,0,'a:0:{}',0),(4,'Bank transfer','custom','',0,0,0,'a:0:{}',0),(5,'Cheque','custom','',0,0,0,'a:0:{}',0),(6,'jk','custom','jh',0,0,0,'a:0:{}',1),(7,'Visa','custom','',0,0,0,'a:0:{}',0);

--
-- Table structure for table `garagedemopaypal_ipn`
--

CREATE TABLE `garagedemopaypal_ipn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `ipn_hash` longtext COLLATE utf8_unicode_ci NOT NULL,
  `ipn_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopaypal_ipn`
--


--
-- Table structure for table `garagedemopayroll`
--

CREATE TABLE `garagedemopayroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month` date NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopayroll`
--


--
-- Table structure for table `garagedemopayroll_detail`
--

CREATE TABLE `garagedemopayroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopayroll_detail`
--


--
-- Table structure for table `garagedemoposts`
--

CREATE TABLE `garagedemoposts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoposts`
--


--
-- Table structure for table `garagedemoproject_comments`
--

CREATE TABLE `garagedemoproject_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoproject_comments`
--


--
-- Table structure for table `garagedemoproject_files`
--

CREATE TABLE `garagedemoproject_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoproject_files`
--


--
-- Table structure for table `garagedemoproject_members`
--

CREATE TABLE `garagedemoproject_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoproject_members`
--

INSERT INTO `garagedemoproject_members` VALUES (1,2,1,1,0),(2,2,2,1,0);

--
-- Table structure for table `garagedemoproject_settings`
--

CREATE TABLE `garagedemoproject_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoproject_settings`
--


--
-- Table structure for table `garagedemoproject_time`
--

CREATE TABLE `garagedemoproject_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoproject_time`
--


--
-- Table structure for table `garagedemoprojects`
--

CREATE TABLE `garagedemoprojects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vehicle` int(11) NOT NULL DEFAULT '0',
  `work_place` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoprojects`
--

INSERT INTO `garagedemoprojects` VALUES (1,'2023-09-10 2-4057-Mohammed','','2023-09-10','2023-09-17',2,'2023-09-10',2,'open','',0,'',0,NULL,4057,7,0),(2,'2023-09-10 3-4058-Ahmed','',NULL,NULL,3,'2023-09-10',2,'open','',0,'',0,NULL,4058,7,0);

--
-- Table structure for table `garagedemopurchase_order_items`
--

CREATE TABLE `garagedemopurchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `work_place` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopurchase_order_items`
--


--
-- Table structure for table `garagedemopurchase_order_payments`
--

CREATE TABLE `garagedemopurchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopurchase_order_payments`
--


--
-- Table structure for table `garagedemopurchase_orders`
--

CREATE TABLE `garagedemopurchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `shipment_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `work_place` int(11) DEFAULT '0',
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `wip_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemopurchase_orders`
--


--
-- Table structure for table `garagedemoroles`
--

CREATE TABLE `garagedemoroles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoroles`
--


--
-- Table structure for table `garagedemosettings`
--

CREATE TABLE `garagedemosettings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemosettings`
--

INSERT INTO `garagedemosettings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Oman Garage','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','','app',0),('client_can_comment_on_files','','app',0),('client_can_comment_on_tasks','','app',0),('client_can_create_projects','','app',0),('client_can_create_tasks','','app',0),('client_can_edit_tasks','','app',0),('client_can_view_activity','','app',0),('client_can_view_gantt','','app',0),('client_can_view_milestones','','app',0),('client_can_view_overview','','app',0),('client_can_view_project_files','','app',0),('client_can_view_tasks','','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','','app',0),('client_message_users','5','app',0),('company_address','Al-Ma\'bila 11th\nPost Box No: 673, Postal Code: 113','app',0),('company_email','info@teamway.om','app',0),('company_name','My 4x4 Oman','app',0),('company_phone','00968 - 95094494','app',0),('company_vat_number','','app',0),('company_website','www.my4x4oman.com','app',0),('currency_position','right','app',0),('currency_symbol','/ OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','1','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','0','app',0),('estimate_color','#808080','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','muhand@almutsahel.com','app',0),('imap_host','','app',0),('imap_password','Mcs@123456','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','10','app',0),('initial_number_of_the_invoice','8938','app',0),('invoice_color','#808080','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','arabic','app',0),('module_announcement','','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','','app',0),('module_lead','','app',0),('module_leave','','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','','app',0),('module_todo','','app',0),('no_of_decimals','2','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('rows_per_page','100','app',0),('scrollbar','native','app',0),('send_bcc_to','','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','sigin-background-image.jpg','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('user_2_dashboard','','user',0),('user_2_personal_language','english','user',0),('weekend','5,6','app',0);

--
-- Table structure for table `garagedemoshipment_items`
--

CREATE TABLE `garagedemoshipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `purchase_order_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoshipment_items`
--


--
-- Table structure for table `garagedemoshipments`
--

CREATE TABLE `garagedemoshipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `shipment_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoshipments`
--


--
-- Table structure for table `garagedemosocial_links`
--

CREATE TABLE `garagedemosocial_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemosocial_links`
--


--
-- Table structure for table `garagedemosuppliers`
--

CREATE TABLE `garagedemosuppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `contact_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `note` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `currency_id` int(11) NOT NULL DEFAULT '0',
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemosuppliers`
--


--
-- Table structure for table `garagedemotask_status`
--

CREATE TABLE `garagedemotask_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `key_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemotask_status`
--

INSERT INTO `garagedemotask_status` VALUES (1,'To Do','to_do','#F9A52D',0,0),(2,'In progress','in_progress','#1672B9',1,0),(3,'Done','done','#00B393',2,0),(4,'holding','','#aab7b7',3,0);

--
-- Table structure for table `garagedemotasks`
--

CREATE TABLE `garagedemotasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `milestone_id` int(11) NOT NULL DEFAULT '0',
  `assigned_to` int(11) NOT NULL,
  `deadline` date DEFAULT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `points` tinyint(4) NOT NULL DEFAULT '1',
  `status` enum('to_do','in_progress','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `status_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `collaborators` text COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `recurring_task_id` int(11) NOT NULL DEFAULT '0',
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `created_date` date NOT NULL,
  `next_recurring_date` date DEFAULT NULL,
  `reminder_date` date NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemotasks`
--


--
-- Table structure for table `garagedemotaxes`
--

CREATE TABLE `garagedemotaxes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `percentage` double NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `garagedemotaxes`
--

INSERT INTO `garagedemotaxes` VALUES (1,'Tax (10%)',10,0),(2,'VAT',5,0);

--
-- Table structure for table `garagedemoteam`
--

CREATE TABLE `garagedemoteam` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `members` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoteam`
--


--
-- Table structure for table `garagedemoteam_member_job_info`
--

CREATE TABLE `garagedemoteam_member_job_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `date_of_hire` date DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `salary` double NOT NULL DEFAULT '0',
  `salary_term` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `working_hours` int(11) DEFAULT NULL,
  `yearly_leaves` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoteam_member_job_info`
--


--
-- Table structure for table `garagedemoticket_comments`
--

CREATE TABLE `garagedemoticket_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoticket_comments`
--


--
-- Table structure for table `garagedemoticket_types`
--

CREATE TABLE `garagedemoticket_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoticket_types`
--

INSERT INTO `garagedemoticket_types` VALUES (1,'General Support',0),(2,'One way',0),(3,'Two way',0);

--
-- Table structure for table `garagedemotickets`
--

CREATE TABLE `garagedemotickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `ticket_type_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` enum('new','client_replied','open','closed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `last_activity_at` datetime DEFAULT NULL,
  `assigned_to` int(11) NOT NULL DEFAULT '0',
  `creator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `creator_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL,
  `closed_at` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemotickets`
--


--
-- Table structure for table `garagedemoto_do`
--

CREATE TABLE `garagedemoto_do` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `status` enum('to_do','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `start_date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemoto_do`
--


--
-- Table structure for table `garagedemotransactions`
--

CREATE TABLE `garagedemotransactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `type` text NOT NULL,
  `is_manual` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `garagedemotransactions`
--


--
-- Table structure for table `garagedemousers`
--

CREATE TABLE `garagedemousers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nationality` varchar(250) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `first_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `superior_id` int(11) DEFAULT '-1',
  `user_type` enum('staff','client','lead') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'client',
  `is_admin` tinyint(1) NOT NULL DEFAULT '0',
  `role_id` int(11) NOT NULL DEFAULT '0',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image` text COLLATE utf8_unicode_ci,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `message_checked_at` datetime DEFAULT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `notification_checked_at` datetime DEFAULT NULL,
  `is_primary_contact` tinyint(1) NOT NULL DEFAULT '0',
  `job_title` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `disable_login` tinyint(1) NOT NULL DEFAULT '0',
  `note` mediumtext COLLATE utf8_unicode_ci,
  `address` text COLLATE utf8_unicode_ci,
  `alternative_address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `ssn` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gender` enum('male','female') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'male',
  `sticky_note` mediumtext COLLATE utf8_unicode_ci,
  `external_links` mediumtext COLLATE utf8_unicode_ci,
  `skype` text COLLATE utf8_unicode_ci,
  `enable_web_notification` tinyint(1) NOT NULL DEFAULT '1',
  `enable_email_notification` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `last_online` datetime DEFAULT NULL,
  `pt_account_id` int(11) NOT NULL DEFAULT '0',
  `sal_account_id` int(11) NOT NULL DEFAULT '0',
  `imb_account_id` int(11) NOT NULL DEFAULT '0',
  `resident_card_no` text COLLATE utf8_unicode_ci,
  `resident_card_expiry` date DEFAULT NULL,
  `passport_no` text COLLATE utf8_unicode_ci,
  `passport_expiry` date DEFAULT NULL,
  `requested_account_removal` tinyint(1) DEFAULT '0',
  `payroll` tinyint(1) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_type` (`user_type`),
  KEY `email` (`email`),
  KEY `client_id` (`client_id`),
  KEY `deleted` (`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemousers`
--

INSERT INTO `garagedemousers` VALUES (2,'0','Admin','Admin',-1,'staff',1,0,'demo@garage.om','e10adc3949ba59abbe56e057f20f883e',NULL,'active','2024-06-23 09:07:11',0,NULL,0,'Untitled',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'male',NULL,NULL,NULL,1,1,NULL,'2024-06-23 12:13:26',0,0,0,NULL,NULL,NULL,NULL,0,1,0),(3,'0','OMAR','',-1,'client',0,0,'KK@KK.KK',NULL,NULL,'active',NULL,1,NULL,1,'Untitled',0,NULL,NULL,NULL,'KK',NULL,NULL,NULL,'male',NULL,NULL,NULL,1,1,'2023-09-06 16:08:24',NULL,0,0,0,NULL,NULL,NULL,NULL,0,1,0),(4,'0','Ahmed','',-1,'client',0,0,'',NULL,NULL,'active',NULL,3,NULL,1,'Untitled',0,NULL,NULL,NULL,'978653',NULL,NULL,NULL,'male',NULL,NULL,NULL,1,1,'2023-09-10 13:49:24',NULL,0,0,0,NULL,NULL,NULL,NULL,0,1,0);

--
-- Table structure for table `garagedemovehicles`
--

CREATE TABLE `garagedemovehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `ac` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'no',
  `rego` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `make` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_series` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fleet_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `transmission` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `body_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `color` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `seating_cap` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `odometer` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hours` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `drive_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `engine_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `chassis_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rego_due_date` date DEFAULT NULL,
  `build_date` year(4) DEFAULT NULL COMMENT 'year',
  `produce_date` date DEFAULT NULL,
  `last_in_date` date DEFAULT NULL,
  `last_service` date DEFAULT NULL,
  `next_service` date DEFAULT NULL,
  `next_service_km` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `service_intervals` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cylinders` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `liters` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fuel_induction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tare_mass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `radio_pin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `key_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tyre_size` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `imported_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `blocked` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4059 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemovehicles`
--

INSERT INTO `garagedemovehicles` VALUES (4057,2,'','54736534','1','335I',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'أبيض',NULL,'1000',NULL,NULL,NULL,'65243654`354',NULL,NULL,1990,NULL,NULL,NULL,NULL,NULL,NULL,'4','4',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0),(4058,0,'','6475643','3','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'2000',NULL,NULL,NULL,'',NULL,NULL,0000,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0);

--
-- Table structure for table `garagedemowork_places`
--

CREATE TABLE `garagedemowork_places` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `garagedemowork_places`
--

INSERT INTO `garagedemowork_places` VALUES (6,'Qurum',0),(7,'Mabaila',0);


