--
-- Host: localhost    Database: topappkw_pos
-- ------------------------------------------------------


--
-- Current Database: `topappkw_pos`
--


--
-- Table structure for table `account_transactions`
--

CREATE TABLE `account_transactions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int NOT NULL,
  `type` enum('debit','credit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `sub_type` enum('opening_balance','fund_transfer','deposit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(22,4) NOT NULL,
  `reff_no` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `operation_date` datetime NOT NULL,
  `created_by` int NOT NULL,
  `transaction_id` int DEFAULT NULL,
  `transaction_payment_id` int DEFAULT NULL,
  `transfer_transaction_id` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_transactions_account_id_index` (`account_id`),
  KEY `account_transactions_transaction_id_index` (`transaction_id`),
  KEY `account_transactions_transaction_payment_id_index` (`transaction_payment_id`),
  KEY `account_transactions_transfer_transaction_id_index` (`transfer_transaction_id`),
  KEY `account_transactions_created_by_index` (`created_by`),
  KEY `account_transactions_type_index` (`type`),
  KEY `account_transactions_sub_type_index` (`sub_type`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `account_transactions`
--

INSERT INTO `account_transactions` (`id`, `account_id`, `type`, `sub_type`, `amount`, `reff_no`, `operation_date`, `created_by`, `transaction_id`, `transaction_payment_id`, `transfer_transaction_id`, `note`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,'credit',NULL,3.7500,NULL,'2021-07-04 20:15:52',1,2,1,NULL,NULL,NULL,'2021-09-21 15:35:47','2021-09-21 15:35:47'),(2,2,'credit','opening_balance',203.2850,NULL,'2021-11-15 09:56:44',1,NULL,NULL,NULL,NULL,NULL,'2021-11-15 08:56:44','2021-11-15 08:56:44'),(3,2,'debit',NULL,11.9000,NULL,'2021-11-15 09:57:00',1,245,5,NULL,NULL,NULL,'2021-11-15 08:57:46','2021-11-15 08:57:46'),(4,2,'debit',NULL,5.0000,NULL,'2021-11-15 16:45:00',1,246,6,NULL,NULL,NULL,'2021-11-15 15:45:38','2021-11-15 15:45:38');

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

CREATE TABLE `account_types` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_account_type_id` int DEFAULT NULL,
  `business_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_types_parent_account_type_id_index` (`parent_account_type_id`),
  KEY `account_types_business_id_index` (`business_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `account_types`
--

INSERT INTO `account_types` (`id`, `name`, `parent_account_type_id`, `business_id`, `created_at`, `updated_at`) VALUES (2,'Expense',NULL,1,'2021-09-21 15:33:03','2021-09-21 15:33:03'),(3,'CURRENT ASSETS',NULL,1,'2021-11-15 08:55:36','2021-11-15 08:55:36');

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

CREATE TABLE `accounts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `account_type_id` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int NOT NULL,
  `is_closed` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `accounts_business_id_index` (`business_id`),
  KEY `accounts_account_type_id_index` (`account_type_id`),
  KEY `accounts_created_by_index` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `accounts` (`id`, `business_id`, `name`, `account_number`, `account_details`, `account_type_id`, `note`, `created_by`, `is_closed`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,'menit','400100100','[{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null}]',2,NULL,1,1,NULL,'2021-09-21 15:33:35','2022-08-02 13:21:04'),(2,1,'PETTY CASH','10111012','[{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null},{\"label\":null,\"value\":null}]',3,NULL,1,1,NULL,'2021-11-15 08:56:44','2022-08-02 13:21:08');

--
-- Table structure for table `activity_log`
--

CREATE TABLE `activity_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `log_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject_id` int DEFAULT NULL,
  `subject_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_id` int DEFAULT NULL,
  `causer_id` int DEFAULT NULL,
  `causer_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `properties` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `activity_log_log_name_index` (`log_name`)
) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `activity_log`
--

INSERT INTO `activity_log` (`id`, `log_name`, `description`, `subject_id`, `subject_type`, `business_id`, `causer_id`, `causer_type`, `properties`, `created_at`, `updated_at`) VALUES (1,'default','deleted',2,'App\\User',1,1,'App\\User','{\"name\":\"\\u0627\\u0644\\u0633\\u064a\\u062f \\u0633\\u0627\\u0645\\u0631 \\u0639\\u0628\\u0648\\u062f\",\"id\":2}','2022-03-10 00:48:54','2022-03-10 00:48:54'),(2,'default','added',3,'App\\User',1,1,'App\\User','{\"name\":\"mr Rased mohamed\"}','2022-03-10 01:01:16','2022-03-10 01:01:16'),(3,'default','edited',3,'App\\User',1,1,'App\\User','{\"name\":\"mr Rased mohamed\"}','2022-03-10 01:02:38','2022-03-10 01:02:38'),(4,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:03:01','2022-03-10 01:03:01'),(5,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:03:17','2022-03-10 01:03:17'),(6,'default','edited',3,'App\\User',1,1,'App\\User','{\"name\":\"mr Rased mohamed\"}','2022-03-10 01:03:34','2022-03-10 01:03:34'),(7,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:03:40','2022-03-10 01:03:40'),(8,'default','edited',3,'App\\User',1,1,'App\\User','{\"name\":\"mr Rased mohamed\"}','2022-03-10 01:04:35','2022-03-10 01:04:35'),(9,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:04:49','2022-03-10 01:04:49'),(10,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:07:24','2022-03-10 01:07:24'),(11,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:07:31','2022-03-10 01:07:31'),(12,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:07:40','2022-03-10 01:07:40'),(13,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:07:54','2022-03-10 01:07:54'),(14,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:08:55','2022-03-10 01:08:55'),(15,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:09:10','2022-03-10 01:09:10'),(16,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:09:44','2022-03-10 01:09:44'),(17,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:10:12','2022-03-10 01:10:12'),(18,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:10:20','2022-03-10 01:10:20'),(19,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:10:50','2022-03-10 01:10:50'),(20,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:12:27','2022-03-10 01:12:27'),(21,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:12:49','2022-03-10 01:12:49'),(22,'default','added',1,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":2.5}}','2022-03-10 01:18:09','2022-03-10 01:18:09'),(23,'default','edited',1,'App\\User',1,1,'App\\User','{\"name\":\"Mr samer abooda\"}','2022-03-10 01:19:23','2022-03-10 01:19:23'),(24,'default','logout',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:19:43','2022-03-10 01:19:43'),(25,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-10 01:19:49','2022-03-10 01:19:49'),(26,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:35:11','2022-03-10 01:35:11'),(27,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:35:27','2022-03-10 01:35:27'),(28,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-03-10 01:35:32','2022-03-10 01:35:32'),(29,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-10 13:36:11','2022-03-10 13:36:11'),(30,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-12 00:03:05','2022-03-12 00:03:05'),(31,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-14 10:51:05','2022-03-14 10:51:05'),(32,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-19 18:37:08','2022-03-19 18:37:08'),(33,'default','logout',3,'App\\User',1,3,'App\\User','[]','2022-03-20 18:00:03','2022-03-20 18:00:03'),(34,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-20 18:00:14','2022-03-20 18:00:14'),(35,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-03-20 18:06:22','2022-03-20 18:06:22'),(36,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-20 18:06:26','2022-03-20 18:06:26'),(37,'default','added',4,'App\\User',1,3,'App\\User','{\"name\":\" amr \"}','2022-03-20 18:09:18','2022-03-20 18:09:18'),(38,'default','logout',3,'App\\User',1,3,'App\\User','[]','2022-03-20 18:09:35','2022-03-20 18:09:35'),(39,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-20 18:10:01','2022-03-20 18:10:01'),(40,'default','added',3,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"shipping_status\":\"delivered\",\"payment_status\":\"paid\",\"final_total\":78.5199999999999960209606797434389591217041015625}}','2022-03-20 18:13:36','2022-03-20 18:13:36'),(41,'default','added',4,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":77.5199999999999960209606797434389591217041015625}}','2022-03-20 18:14:05','2022-03-20 18:14:05'),(42,'default','added',5,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":38.75999999999999801048033987171947956085205078125}}','2022-03-20 18:15:10','2022-03-20 18:15:10'),(43,'default','added',9,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"status\":\"final\"}}','2022-03-20 18:27:06','2022-03-20 18:27:06'),(44,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-21 18:22:25','2022-03-21 18:22:25'),(45,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-03-23 13:47:48','2022-03-23 13:47:48'),(46,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-25 12:00:24','2022-03-25 12:00:24'),(47,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-03-25 12:02:14','2022-03-25 12:02:14'),(48,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-04 10:32:04','2022-04-04 10:32:04'),(49,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-14 12:59:54','2022-04-14 12:59:54'),(50,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-14 13:05:22','2022-04-14 13:05:22'),(51,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-16 17:13:54','2022-04-16 17:13:54'),(52,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-04-16 17:17:00','2022-04-16 17:17:00'),(53,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-16 17:22:01','2022-04-16 17:22:01'),(54,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-04-16 17:24:01','2022-04-16 17:24:01'),(55,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-16 17:24:18','2022-04-16 17:24:18'),(56,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-17 08:31:31','2022-04-17 08:31:31'),(57,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-04-17 09:17:07','2022-04-17 09:17:07'),(58,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-04-17 17:12:49','2022-04-17 17:12:49'),(59,'default','added',11,'App\\Transaction',1,1,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":129.780000000000001136868377216160297393798828125}}','2022-04-17 17:18:07','2022-04-17 17:18:07'),(60,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-04-21 22:17:57','2022-04-21 22:17:57'),(61,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-04-22 14:52:11','2022-04-22 14:52:11'),(62,'default','logout',3,'App\\User',1,3,'App\\User','[]','2022-04-22 14:56:49','2022-04-22 14:56:49'),(63,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-04-22 14:59:20','2022-04-22 14:59:20'),(64,'default','logout',3,'App\\User',1,3,'App\\User','[]','2022-04-22 14:59:43','2022-04-22 14:59:43'),(65,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-04-22 15:11:03','2022-04-22 15:11:03'),(66,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-10 13:06:49','2022-05-10 13:06:49'),(67,'default','added',6,'App\\Contact',1,3,'App\\User','[]','2022-05-10 13:07:49','2022-05-10 13:07:49'),(68,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-19 15:16:35','2022-05-19 15:16:35'),(69,'default','added',7,'App\\Contact',1,3,'App\\User','[]','2022-05-19 15:46:45','2022-05-19 15:46:45'),(70,'default','added',12,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"due\",\"final_total\":38000}}','2022-05-19 16:58:48','2022-05-19 16:58:48'),(71,'default','added',13,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"status\":\"final\"}}','2022-05-19 16:59:52','2022-05-19 16:59:52'),(72,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-20 10:13:07','2022-05-20 10:13:07'),(73,'default','deleted',4,'App\\User',1,3,'App\\User','{\"name\":\" amr \",\"id\":4}','2022-05-20 10:15:04','2022-05-20 10:15:04'),(74,'default','added',5,'App\\User',1,3,'App\\User','{\"name\":\"mr amro khalifa\"}','2022-05-20 10:18:42','2022-05-20 10:18:42'),(75,'default','edited',5,'App\\User',1,3,'App\\User','{\"name\":\"mr amro khalifa\"}','2022-05-20 10:20:10','2022-05-20 10:20:10'),(76,'default','added',6,'App\\User',1,3,'App\\User','{\"name\":\"mr hesham abdelhady\"}','2022-05-20 10:22:33','2022-05-20 10:22:33'),(77,'default','edited',3,'App\\User',1,3,'App\\User','{\"name\":\"mr mohamed rashed\"}','2022-05-20 10:26:05','2022-05-20 10:26:05'),(78,'default','added',7,'App\\User',1,3,'App\\User','{\"name\":\"mr seleem saad allah\"}','2022-05-20 10:28:07','2022-05-20 10:28:07'),(79,'default','added',8,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:30:13','2022-05-20 10:30:13'),(80,'default','contact_deleted',2,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:30:40','2022-05-20 10:30:40'),(81,'default','contact_deleted',6,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:30:48','2022-05-20 10:30:48'),(82,'default','contact_deleted',5,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:31:00','2022-05-20 10:31:00'),(83,'default','contact_deleted',4,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:31:05','2022-05-20 10:31:05'),(84,'default','contact_deleted',3,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:31:17','2022-05-20 10:31:17'),(85,'default','edited',7,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:32:30','2022-05-20 10:32:30'),(86,'default','edited',8,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:33:03','2022-05-20 10:33:03'),(87,'default','edited',7,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:34:10','2022-05-20 10:34:10'),(88,'default','added',9,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:36:39','2022-05-20 10:36:39'),(89,'default','edited',9,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:37:54','2022-05-20 10:37:54'),(90,'default','payment_deleted',5,'App\\TransactionPayment',1,3,'App\\User','{\"id\":5,\"ref_no\":\"PP2022\\/0003\"}','2022-05-20 10:39:52','2022-05-20 10:39:52'),(91,'default','payment_edited',12,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"paid\",\"final_total\":\"38000.0000\"},\"old\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"due\",\"final_total\":\"38000.0000\"}}','2022-05-20 10:40:17','2022-05-20 10:40:17'),(92,'default','added',10,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:42:13','2022-05-20 10:42:13'),(93,'default','edited',10,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:42:40','2022-05-20 10:42:40'),(94,'default','added',11,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:44:43','2022-05-20 10:44:43'),(95,'default','edited',1,'App\\Contact',1,3,'App\\User','[]','2022-05-20 10:46:18','2022-05-20 10:46:18'),(96,'default','added',15,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"status\":\"final\"}}','2022-05-20 12:15:41','2022-05-20 12:15:41'),(97,'default','added',21,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":100.9599999999999937472239253111183643341064453125}}','2022-05-20 13:36:16','2022-05-20 13:36:16'),(98,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-20 18:35:39','2022-05-20 18:35:39'),(99,'default','added',23,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":47.5}}','2022-05-20 18:54:29','2022-05-20 18:54:29'),(100,'default','added',24,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":134.020000000000010231815394945442676544189453125}}','2022-05-20 18:56:33','2022-05-20 18:56:33'),(101,'default','added',25,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":2163}}','2022-05-20 18:58:54','2022-05-20 18:58:54'),(102,'default','added',30,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":5}}','2022-05-20 19:10:23','2022-05-20 19:10:23'),(103,'default','added',31,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":1250}}','2022-05-20 19:11:03','2022-05-20 19:11:03'),(104,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-24 15:36:25','2022-05-24 15:36:25'),(105,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-05-25 15:44:39','2022-05-25 15:44:39'),(106,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-05-29 18:41:56','2022-05-29 18:41:56'),(107,'default','logout',1,'App\\User',1,1,'App\\User','[]','2022-05-29 18:44:49','2022-05-29 18:44:49'),(108,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-05-29 19:09:44','2022-05-29 19:09:44'),(109,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-06-04 15:41:26','2022-06-04 15:41:26'),(110,'default','login',1,'App\\User',1,1,'App\\User','[]','2022-06-04 18:40:55','2022-06-04 18:40:55'),(111,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-06-28 15:48:32','2022-06-28 15:48:32'),(112,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-06-30 23:13:44','2022-06-30 23:13:44'),(113,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-19 22:25:54','2022-07-19 22:25:54'),(114,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-25 09:01:23','2022-07-25 09:01:23'),(115,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-27 15:00:27','2022-07-27 15:00:27'),(116,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-28 12:09:58','2022-07-28 12:09:58'),(117,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-28 12:10:29','2022-07-28 12:10:29'),(118,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-29 11:33:42','2022-07-29 11:33:42'),(119,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-29 12:08:04','2022-07-29 12:08:04'),(120,'default','added',12,'App\\Contact',1,3,'App\\User','[]','2022-07-29 13:00:34','2022-07-29 13:00:34'),(121,'default','payment_edited',38,'App\\Transaction',1,3,'App\\User','[]','2022-07-29 13:01:21','2022-07-29 13:01:21'),(122,'default','added',39,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"due\",\"final_total\":10000}}','2022-07-29 13:05:43','2022-07-29 13:05:43'),(123,'default','payment_edited',39,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"paid\",\"final_total\":\"10000.0000\"},\"old\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"due\",\"final_total\":\"10000.0000\"}}','2022-07-29 13:07:47','2022-07-29 13:07:47'),(124,'default','edited',11,'App\\Contact',1,3,'App\\User','[]','2022-07-29 13:13:24','2022-07-29 13:13:24'),(125,'default','added',40,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"status\":\"final\"}}','2022-07-29 13:17:14','2022-07-29 13:17:14'),(126,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-29 14:46:59','2022-07-29 14:46:59'),(127,'default','edited',12,'App\\Contact',1,3,'App\\User','[]','2022-07-29 14:49:06','2022-07-29 14:49:06'),(128,'default','purchase_deleted',39,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"paid\",\"final_total\":\"10000.0000\"}}','2022-07-29 14:59:03','2022-07-29 14:59:03'),(129,'default','edited',12,'App\\Contact',1,3,'App\\User','[]','2022-07-29 15:36:59','2022-07-29 15:36:59'),(130,'default','added',42,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":95}}','2022-07-29 15:42:53','2022-07-29 15:42:53'),(131,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-29 17:06:19','2022-07-29 17:06:19'),(132,'default','added',43,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":43260}}','2022-07-29 17:13:32','2022-07-29 17:13:32'),(133,'default','added',44,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":43.25999999999999801048033987171947956085205078125}}','2022-07-29 17:14:27','2022-07-29 17:14:27'),(134,'default','added',45,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"status\":\"final\"}}','2022-07-29 17:37:23','2022-07-29 17:37:23'),(135,'default','added',47,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":56.25}}','2022-07-29 17:42:03','2022-07-29 17:42:03'),(136,'default','added',48,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":59.25}}','2022-07-29 17:43:36','2022-07-29 17:43:36'),(137,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-30 11:10:44','2022-07-30 11:10:44'),(138,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-30 15:10:34','2022-07-30 15:10:34'),(139,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-07-31 15:05:34','2022-07-31 15:05:34'),(140,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-02 11:32:40','2022-08-02 11:32:40'),(141,'default','sell_deleted',1,'App\\Transaction',1,3,'App\\User','{\"id\":1,\"invoice_no\":\"00006\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"2.5000\"}}','2022-08-02 11:47:50','2022-08-02 11:47:50'),(142,'default','sell_deleted',23,'App\\Transaction',1,3,'App\\User','{\"id\":23,\"invoice_no\":\"00011\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"47.5000\"}}','2022-08-02 11:48:01','2022-08-02 11:48:01'),(143,'default','added',49,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":65.969999999999998863131622783839702606201171875}}','2022-08-02 12:01:39','2022-08-02 12:01:39'),(144,'default','added',50,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":923.6499999999999772626324556767940521240234375}}','2022-08-02 12:07:13','2022-08-02 12:07:13'),(145,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-02 12:24:48','2022-08-02 12:24:48'),(146,'default','added',51,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"due\",\"final_total\":540}}','2022-08-02 12:53:36','2022-08-02 12:53:36'),(147,'default','purchase_deleted',51,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"paid\",\"final_total\":\"540.0000\"}}','2022-08-02 13:06:08','2022-08-02 13:06:08'),(148,'default','purchase_deleted',12,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"purchase\",\"status\":\"received\",\"payment_status\":\"paid\",\"final_total\":\"38000.0000\"}}','2022-08-02 13:06:18','2022-08-02 13:06:18'),(149,'default','sell_deleted',50,'App\\Transaction',1,3,'App\\User','{\"id\":50,\"invoice_no\":\"00020\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"923.6500\"}}','2022-08-02 13:06:40','2022-08-02 13:06:40'),(150,'default','sell_deleted',49,'App\\Transaction',1,3,'App\\User','{\"id\":49,\"invoice_no\":\"00019\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"65.9700\"}}','2022-08-02 13:06:48','2022-08-02 13:06:48'),(151,'default','sell_deleted',3,'App\\Transaction',1,3,'App\\User','{\"id\":3,\"invoice_no\":\"00007\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"shipping_status\":\"delivered\",\"payment_status\":\"paid\",\"final_total\":\"78.5200\"}}','2022-08-02 13:06:57','2022-08-02 13:06:57'),(152,'default','sell_deleted',30,'App\\Transaction',1,3,'App\\User','{\"id\":30,\"invoice_no\":\"00013\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"5.0000\"}}','2022-08-02 13:07:02','2022-08-02 13:07:02'),(153,'default','sell_deleted',31,'App\\Transaction',1,3,'App\\User','{\"id\":31,\"invoice_no\":\"00014\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"1250.0000\"}}','2022-08-02 13:07:05','2022-08-02 13:07:05'),(154,'default','sell_deleted',21,'App\\Transaction',1,3,'App\\User','{\"id\":21,\"invoice_no\":\"00010\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"100.9600\"}}','2022-08-02 13:07:16','2022-08-02 13:07:16'),(155,'default','sell_deleted',42,'App\\Transaction',1,3,'App\\User','{\"id\":42,\"invoice_no\":\"00015\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"95.0000\"}}','2022-08-02 13:07:21','2022-08-02 13:07:21'),(156,'default','sell_deleted',44,'App\\Transaction',1,3,'App\\User','{\"id\":44,\"invoice_no\":\"00016\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"43.2600\"}}','2022-08-02 13:07:25','2022-08-02 13:07:25'),(157,'default','sell_deleted',48,'App\\Transaction',1,3,'App\\User','{\"id\":48,\"invoice_no\":\"00018\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"59.2500\"}}','2022-08-02 13:07:30','2022-08-02 13:07:30'),(158,'default','sell_deleted',25,'App\\Transaction',1,3,'App\\User','{\"id\":25,\"invoice_no\":\"00012\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"2163.0000\"}}','2022-08-02 13:07:36','2022-08-02 13:07:36'),(159,'default','sell_deleted',47,'App\\Transaction',1,3,'App\\User','{\"id\":47,\"invoice_no\":\"00017\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"56.2500\"}}','2022-08-02 13:07:41','2022-08-02 13:07:41'),(160,'default','sell_deleted',11,'App\\Transaction',1,3,'App\\User','{\"id\":11,\"invoice_no\":\"00009\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"129.7800\"}}','2022-08-02 13:07:45','2022-08-02 13:07:45'),(161,'default','sell_deleted',4,'App\\Transaction',1,3,'App\\User','{\"id\":4,\"invoice_no\":\"00008\",\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":\"77.5200\"}}','2022-08-02 13:07:50','2022-08-02 13:07:50'),(162,'default','sell_deleted',43,'App\\Transaction',1,3,'App\\User','{\"id\":43,\"invoice_no\":\"2022\\/0006\",\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":\"43260.0000\"}}','2022-08-02 13:13:21','2022-08-02 13:13:21'),(163,'default','sell_deleted',24,'App\\Transaction',1,3,'App\\User','{\"id\":24,\"invoice_no\":\"2022\\/0005\",\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":\"134.0200\"}}','2022-08-02 13:13:29','2022-08-02 13:13:29'),(164,'default','sell_deleted',5,'App\\Transaction',1,3,'App\\User','{\"id\":5,\"invoice_no\":\"2022\\/0004\",\"attributes\":{\"type\":\"sell\",\"status\":\"draft\",\"sub_status\":\"quotation\",\"final_total\":\"38.7600\"}}','2022-08-02 13:13:36','2022-08-02 13:13:36'),(165,'default','contact_deleted',11,'App\\Contact',1,3,'App\\User','[]','2022-08-02 13:28:06','2022-08-02 13:28:06'),(166,'default','contact_deleted',8,'App\\Contact',1,3,'App\\User','[]','2022-08-02 13:29:08','2022-08-02 13:29:08'),(167,'default','contact_deleted',10,'App\\Contact',1,3,'App\\User','[]','2022-08-02 13:29:22','2022-08-02 13:29:22'),(168,'default','contact_deleted',7,'App\\Contact',1,3,'App\\User','[]','2022-08-02 13:29:26','2022-08-02 13:29:26'),(169,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-05 20:32:53','2022-08-05 20:32:53'),(170,'default','added',52,'App\\Transaction',1,3,'App\\User','{\"attributes\":{\"type\":\"sell\",\"status\":\"final\",\"payment_status\":\"paid\",\"final_total\":134.020000000000010231815394945442676544189453125}}','2022-08-05 20:36:57','2022-08-05 20:36:57'),(171,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-08 18:00:21','2022-08-08 18:00:21'),(172,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-13 11:29:21','2022-08-13 11:29:21'),(173,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-14 14:34:16','2022-08-14 14:34:16'),(174,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-08-16 16:54:23','2022-08-16 16:54:23'),(175,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-11-16 15:27:06','2022-11-16 15:27:06'),(176,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-12-04 19:15:56','2022-12-04 19:15:56'),(177,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-12-08 20:27:20','2022-12-08 20:27:20'),(178,'default','login',3,'App\\User',1,3,'App\\User','[]','2022-12-20 18:55:18','2022-12-20 18:55:18'),(179,'default','login',3,'App\\User',1,3,'App\\User','[]','2023-06-05 16:47:41','2023-06-05 16:47:41'),(180,'default','login',1,'App\\User',1,1,'App\\User','[]','2023-11-12 13:25:19','2023-11-12 13:25:19'),(181,'default','deleted',7,'App\\User',1,1,'App\\User','{\"name\":\"mr seleem saad allah\",\"id\":7}','2023-11-12 13:37:51','2023-11-12 13:37:51'),(182,'default','login',1,'App\\User',1,1,'App\\User','[]','2024-01-21 13:41:09','2024-01-21 13:41:09'),(183,'default','login',1,'App\\User',1,1,'App\\User','[]','2024-01-30 14:38:37','2024-01-30 14:38:37'),(184,'default','login',1,'App\\User',1,1,'App\\User','[]','2024-01-31 11:34:20','2024-01-31 11:34:20');

--
-- Table structure for table `barcodes`
--

CREATE TABLE `barcodes` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `width` double(22,4) DEFAULT NULL,
  `height` double(22,4) DEFAULT NULL,
  `paper_width` double(22,4) DEFAULT NULL,
  `paper_height` double(22,4) DEFAULT NULL,
  `top_margin` double(22,4) DEFAULT NULL,
  `left_margin` double(22,4) DEFAULT NULL,
  `row_distance` double(22,4) DEFAULT NULL,
  `col_distance` double(22,4) DEFAULT NULL,
  `stickers_in_one_row` int DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `is_continuous` tinyint(1) NOT NULL DEFAULT '0',
  `stickers_in_one_sheet` int DEFAULT NULL,
  `business_id` int unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `barcodes_business_id_foreign` (`business_id`),
  CONSTRAINT `barcodes_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `barcodes`
--

INSERT INTO `barcodes` (`id`, `name`, `description`, `width`, `height`, `paper_width`, `paper_height`, `top_margin`, `left_margin`, `row_distance`, `col_distance`, `stickers_in_one_row`, `is_default`, `is_continuous`, `stickers_in_one_sheet`, `business_id`, `created_at`, `updated_at`) VALUES (1,'20 Labels per Sheet','Sheet Size: 8.5\" x 11\", Label Size: 4\" x 1\", Labels per sheet: 20',4.0000,1.0000,8.5000,11.0000,0.5000,0.1250,0.0000,0.1875,2,0,0,20,NULL,'2017-12-18 04:13:44','2017-12-18 04:13:44'),(2,'30 Labels per sheet','Sheet Size: 8.5\" x 11\", Label Size: 2.625\" x 1\", Labels per sheet: 30',2.6250,1.0000,8.5000,11.0000,0.5000,0.1880,0.0000,0.1250,3,0,0,30,NULL,'2017-12-18 04:04:39','2017-12-18 04:10:40'),(3,'32 Labels per sheet','Sheet Size: 8.5\" x 11\", Label Size: 2\" x 1.25\", Labels per sheet: 32',2.0000,1.2500,8.5000,11.0000,0.5000,0.2500,0.0000,0.0000,4,0,0,32,NULL,'2017-12-18 03:55:40','2017-12-18 03:55:40'),(4,'40 Labels per sheet','Sheet Size: 8.5\" x 11\", Label Size: 2\" x 1\", Labels per sheet: 40',2.0000,1.0000,8.5000,11.0000,0.5000,0.2500,0.0000,0.0000,4,0,0,40,NULL,'2017-12-18 03:58:40','2017-12-18 03:58:40'),(5,'50 Labels per Sheet','Sheet Size: 8.5\" x 11\", Label Size: 1.5\" x 1\", Labels per sheet: 50',1.5000,1.0000,8.5000,11.0000,0.5000,0.5000,0.0000,0.0000,5,0,0,50,NULL,'2017-12-18 03:51:10','2017-12-18 03:51:10'),(6,'Continuous Rolls - 31.75mm x 25.4mm','Label Size: 31.75mm x 25.4mm, Gap: 3.18mm',1.2500,1.0000,1.2500,0.0000,0.1250,0.0000,0.1250,0.0000,1,0,1,NULL,NULL,'2017-12-18 03:51:10','2017-12-18 03:51:10');

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `contact_id` int unsigned NOT NULL,
  `waiter_id` int unsigned DEFAULT NULL,
  `table_id` int unsigned DEFAULT NULL,
  `correspondent_id` int DEFAULT NULL,
  `business_id` int unsigned NOT NULL,
  `location_id` int unsigned NOT NULL,
  `booking_start` datetime NOT NULL,
  `booking_end` datetime NOT NULL,
  `created_by` int unsigned NOT NULL,
  `booking_status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `booking_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `bookings_contact_id_foreign` (`contact_id`),
  KEY `bookings_business_id_foreign` (`business_id`),
  KEY `bookings_created_by_foreign` (`created_by`),
  KEY `bookings_table_id_index` (`table_id`),
  KEY `bookings_waiter_id_index` (`waiter_id`),
  KEY `bookings_location_id_index` (`location_id`),
  KEY `bookings_booking_status_index` (`booking_status`),
  KEY `bookings_correspondent_id_index` (`correspondent_id`),
  CONSTRAINT `bookings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `bookings_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `bookings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bookings`
--

INSERT INTO `bookings` (`id`, `contact_id`, `waiter_id`, `table_id`, `correspondent_id`, `business_id`, `location_id`, `booking_start`, `booking_end`, `created_by`, `booking_status`, `booking_note`, `created_at`, `updated_at`) VALUES (1,1,NULL,NULL,1,1,1,'2021-09-19 21:04:00','2021-09-19 21:04:00',1,'booked',NULL,'2021-09-19 21:04:05','2021-09-19 21:04:05'),(2,1,NULL,NULL,1,1,1,'2022-02-11 01:48:00','2022-02-12 01:48:00',1,'booked',NULL,'2022-02-11 00:48:25','2022-02-11 00:48:25');

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int unsigned NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `brands_business_id_foreign` (`business_id`),
  KEY `brands_created_by_foreign` (`created_by`),
  CONSTRAINT `brands_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `brands_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `brands`
--


--
-- Table structure for table `business_locations`
--

CREATE TABLE `business_locations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `location_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `landmark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `zip_code` char(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_scheme_id` int unsigned NOT NULL,
  `invoice_layout_id` int unsigned NOT NULL,
  `sale_invoice_layout_id` int DEFAULT NULL,
  `selling_price_group_id` int DEFAULT NULL,
  `print_receipt_on_invoice` tinyint(1) DEFAULT '1',
  `receipt_printer_type` enum('browser','printer') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'browser',
  `printer_id` int DEFAULT NULL,
  `mobile` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alternate_number` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `featured_products` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `default_payment_accounts` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `custom_field1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `business_locations_business_id_index` (`business_id`),
  KEY `business_locations_invoice_scheme_id_foreign` (`invoice_scheme_id`),
  KEY `business_locations_invoice_layout_id_foreign` (`invoice_layout_id`),
  KEY `business_locations_sale_invoice_layout_id_index` (`sale_invoice_layout_id`),
  KEY `business_locations_selling_price_group_id_index` (`selling_price_group_id`),
  KEY `business_locations_receipt_printer_type_index` (`receipt_printer_type`),
  KEY `business_locations_printer_id_index` (`printer_id`),
  CONSTRAINT `business_locations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `business_locations_invoice_layout_id_foreign` FOREIGN KEY (`invoice_layout_id`) REFERENCES `invoice_layouts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `business_locations_invoice_scheme_id_foreign` FOREIGN KEY (`invoice_scheme_id`) REFERENCES `invoice_schemes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `business_locations`
--

INSERT INTO `business_locations` (`id`, `business_id`, `location_id`, `name`, `landmark`, `country`, `state`, `city`, `zip_code`, `invoice_scheme_id`, `invoice_layout_id`, `sale_invoice_layout_id`, `selling_price_group_id`, `print_receipt_on_invoice`, `receipt_printer_type`, `printer_id`, `mobile`, `alternate_number`, `email`, `website`, `featured_products`, `is_active`, `default_payment_accounts`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,'BL9','Hawalli Store','تليكوم','Kuwait','Hawalli','Hawalli Store','15000',1,1,1,NULL,1,'browser',NULL,'00000000',NULL,NULL,'teleconm',NULL,1,'{\"cash\":{\"is_enabled\":\"1\",\"account\":null},\"card\":{\"is_enabled\":\"1\",\"account\":null},\"cheque\":{\"is_enabled\":\"1\",\"account\":null},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":null},\"other\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_4\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_5\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_6\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_7\":{\"is_enabled\":\"1\",\"account\":null}}',NULL,NULL,NULL,NULL,NULL,'2021-07-03 05:00:34','2022-03-10 00:57:33'),(2,1,'BL0002','تريد لاين',NULL,'sad','dasd','kuwait','1222',1,1,1,NULL,1,'browser',NULL,NULL,NULL,NULL,NULL,NULL,1,'{\"cash\":{\"is_enabled\":\"1\",\"account\":null},\"card\":{\"is_enabled\":\"1\",\"account\":null},\"cheque\":{\"is_enabled\":\"1\",\"account\":null},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":null},\"other\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_4\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_5\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_6\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_7\":{\"is_enabled\":\"1\",\"account\":null}}',NULL,NULL,NULL,NULL,NULL,'2022-03-20 18:02:12','2022-03-20 18:02:12'),(3,1,'BL0003','تيليكوم سمارت',NULL,'sad','dasd','kuwait','1222',1,1,1,0,1,'browser',NULL,NULL,NULL,NULL,NULL,NULL,1,'{\"cash\":{\"is_enabled\":\"1\",\"account\":null},\"card\":{\"is_enabled\":\"1\",\"account\":null},\"cheque\":{\"is_enabled\":\"1\",\"account\":null},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":null},\"other\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_4\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_5\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_6\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_7\":{\"is_enabled\":\"1\",\"account\":null}}',NULL,NULL,NULL,NULL,NULL,'2022-03-20 18:03:00','2022-03-20 18:03:00'),(4,1,'BL0004','بيست اي كي',NULL,'sad','dasd','kuwait','1222',1,1,1,0,1,'browser',NULL,NULL,NULL,NULL,NULL,NULL,1,'{\"cash\":{\"is_enabled\":\"1\",\"account\":null},\"card\":{\"is_enabled\":\"1\",\"account\":null},\"cheque\":{\"is_enabled\":\"1\",\"account\":null},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":null},\"other\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_4\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_5\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_6\":{\"is_enabled\":\"1\",\"account\":null},\"custom_pay_7\":{\"is_enabled\":\"1\",\"account\":null}}',NULL,NULL,NULL,NULL,NULL,'2022-03-20 18:06:00','2022-03-20 18:06:00');

--
-- Table structure for table `cash_register_transactions`
--

CREATE TABLE `cash_register_transactions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `cash_register_id` int unsigned NOT NULL,
  `amount` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `pay_method` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('debit','credit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_type` enum('initial','sell','transfer','refund') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cash_register_transactions_cash_register_id_foreign` (`cash_register_id`),
  KEY `cash_register_transactions_transaction_id_index` (`transaction_id`),
  KEY `cash_register_transactions_type_index` (`type`),
  KEY `cash_register_transactions_transaction_type_index` (`transaction_type`),
  CONSTRAINT `cash_register_transactions_cash_register_id_foreign` FOREIGN KEY (`cash_register_id`) REFERENCES `cash_registers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cash_register_transactions`
--

INSERT INTO `cash_register_transactions` (`id`, `cash_register_id`, `amount`, `pay_method`, `type`, `transaction_type`, `transaction_id`, `created_at`, `updated_at`) VALUES (3,2,100.0000,'cash','credit','initial',NULL,'2022-03-19 18:44:55','2022-03-19 18:44:55'),(8,3,23.0000,'cash','credit','initial',NULL,'2022-04-14 13:06:02','2022-04-14 13:06:02'),(11,4,46.0000,'cash','credit','initial',NULL,'2022-04-17 17:19:04','2022-04-17 17:19:04'),(14,5,2000.0000,'cash','credit','initial',NULL,'2022-05-20 18:55:53','2022-05-20 18:55:53'),(27,5,134.0200,'cash','credit','sell',52,'2022-08-05 20:36:57','2022-08-05 20:36:57'),(28,5,0.0000,'cash','credit','sell',52,'2022-08-05 20:36:57','2022-08-05 20:36:57');

--
-- Table structure for table `cash_registers`
--

CREATE TABLE `cash_registers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `location_id` int DEFAULT NULL,
  `user_id` int unsigned DEFAULT NULL,
  `status` enum('close','open') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
  `closed_at` datetime DEFAULT NULL,
  `closing_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `total_card_slips` int NOT NULL DEFAULT '0',
  `total_cheques` int NOT NULL DEFAULT '0',
  `denominations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `closing_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cash_registers_business_id_foreign` (`business_id`),
  KEY `cash_registers_user_id_foreign` (`user_id`),
  KEY `cash_registers_location_id_index` (`location_id`),
  CONSTRAINT `cash_registers_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `cash_registers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cash_registers`
--

INSERT INTO `cash_registers` (`id`, `business_id`, `location_id`, `user_id`, `status`, `closed_at`, `closing_amount`, `total_card_slips`, `total_cheques`, `denominations`, `closing_note`, `created_at`, `updated_at`) VALUES (1,1,1,3,'close','2022-03-10 03:18:28',2.5000,0,0,NULL,NULL,'2022-03-10 01:16:00','2022-03-10 01:18:28'),(2,1,1,3,'close','2022-05-20 20:55:18',226.0200,1,0,NULL,NULL,'2022-03-19 18:44:00','2022-05-20 18:55:18'),(3,1,2,1,'close','2022-04-17 19:18:44',152.7800,0,0,NULL,NULL,'2022-04-14 13:06:00','2022-04-17 17:18:44'),(4,1,1,1,'open',NULL,0.0000,0,0,NULL,NULL,'2022-04-17 17:19:00','2022-04-17 17:19:04'),(5,1,3,3,'open',NULL,0.0000,0,0,NULL,NULL,'2022-05-20 18:55:00','2022-05-20 18:55:53');

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int unsigned NOT NULL,
  `short_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int NOT NULL,
  `created_by` int unsigned NOT NULL,
  `woocommerce_cat_id` int DEFAULT NULL,
  `category_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `categories_business_id_foreign` (`business_id`),
  KEY `categories_created_by_foreign` (`created_by`),
  KEY `categories_parent_id_index` (`parent_id`),
  CONSTRAINT `categories_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `categories_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `business_id`, `short_code`, `parent_id`, `created_by`, `woocommerce_cat_id`, `category_type`, `description`, `slug`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,'الاجهزه',1,NULL,0,3,NULL,'product',NULL,NULL,NULL,'2022-03-20 17:20:08','2022-03-20 17:20:08'),(2,'الخطوط',1,NULL,0,3,NULL,'product',NULL,NULL,NULL,'2022-03-20 17:20:39','2022-03-20 17:20:39'),(3,'الاجهزه مستعمله',1,NULL,0,3,NULL,'product',NULL,NULL,NULL,'2022-03-20 17:21:12','2022-03-20 17:21:12'),(4,'الاكسسوارات',1,NULL,0,3,NULL,'product',NULL,NULL,NULL,'2022-03-20 17:21:27','2022-03-20 17:21:27'),(5,'64 جيجا',1,'64 جيجا',1,3,NULL,'product','64 جيجا',NULL,NULL,'2022-05-20 18:44:50','2022-07-25 12:15:34'),(6,'128 جيجا',1,NULL,1,3,NULL,'product',NULL,NULL,NULL,'2022-05-20 18:45:08','2022-05-20 18:45:08'),(7,'256 جيجا',1,NULL,1,3,NULL,'product','256 جيجا',NULL,NULL,'2022-07-25 12:17:49','2022-07-25 12:17:49');

--
-- Table structure for table `categorizables`
--

CREATE TABLE `categorizables` (
  `category_id` int NOT NULL,
  `categorizable_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `categorizable_id` bigint unsigned NOT NULL,
  KEY `categorizables_categorizable_type_categorizable_id_index` (`categorizable_type`,`categorizable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categorizables`
--


--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `supplier_business_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prefix` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `middle_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `tax_number` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_line_1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `address_line_2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `zip_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `mobile` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `landline` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alternate_number` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_term_number` int DEFAULT NULL,
  `pay_term_type` enum('days','months') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credit_limit` decimal(22,4) DEFAULT NULL,
  `created_by` int unsigned NOT NULL,
  `balance` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `total_rp` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',
  `total_rp_used` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',
  `total_rp_expired` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `shipping_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `shipping_custom_field_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_export` tinyint(1) NOT NULL DEFAULT '0',
  `export_custom_field_1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `export_custom_field_2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `export_custom_field_3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `export_custom_field_4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `export_custom_field_5` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `export_custom_field_6` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `position` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_group_id` int DEFAULT NULL,
  `custom_field1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field5` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field6` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field7` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field8` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field9` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field10` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contacts_business_id_foreign` (`business_id`),
  KEY `contacts_created_by_foreign` (`created_by`),
  KEY `contacts_type_index` (`type`),
  KEY `contacts_contact_status_index` (`contact_status`),
  CONSTRAINT `contacts_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contacts_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contacts`
--

INSERT INTO `contacts` (`id`, `business_id`, `type`, `supplier_business_name`, `name`, `prefix`, `first_name`, `middle_name`, `last_name`, `email`, `contact_id`, `contact_status`, `tax_number`, `city`, `state`, `country`, `address_line_1`, `address_line_2`, `zip_code`, `dob`, `mobile`, `landline`, `alternate_number`, `pay_term_number`, `pay_term_type`, `credit_limit`, `created_by`, `balance`, `total_rp`, `total_rp_used`, `total_rp_expired`, `is_default`, `shipping_address`, `shipping_custom_field_details`, `is_export`, `export_custom_field_1`, `export_custom_field_2`, `export_custom_field_3`, `export_custom_field_4`, `export_custom_field_5`, `export_custom_field_6`, `position`, `customer_group_id`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `custom_field5`, `custom_field6`, `custom_field7`, `custom_field8`, `custom_field9`, `custom_field10`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,'customer',NULL,'السيد amr  khalifa','السيد','amr',NULL,'khalifa',NULL,NULL,'inactive',NULL,'kuwait','الكويت','Kuwait','الكويت','الكويت','00965',NULL,'55701150','55701150','66606952',NULL,NULL,0.0000,1,0.0000,0,0,0,1,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2021-07-03 05:00:34','2022-08-02 13:32:25'),(2,1,'supplier',NULL,'   ',NULL,NULL,NULL,NULL,NULL,'مشاريع','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'55665287',NULL,NULL,NULL,NULL,NULL,1,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:30:40','2021-07-11 19:48:51','2022-05-20 10:30:40'),(3,1,'supplier','Shenzhen Times Innovation Technology Co.,Ltd','   ',NULL,NULL,NULL,NULL,NULL,'Albert Tan','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'55665287',NULL,NULL,NULL,NULL,NULL,1,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:31:17','2021-08-17 10:59:28','2022-05-20 10:31:17'),(4,1,'supplier',NULL,' LuLu  ',NULL,'LuLu',NULL,NULL,NULL,'LuLu','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'22250213',NULL,NULL,NULL,NULL,NULL,1,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:31:05','2021-11-15 08:49:30','2022-05-20 10:31:05'),(5,1,'supplier',NULL,'MARKAZ SAIF MARKAZ SAIF  ','MARKAZ SAIF','MARKAZ SAIF',NULL,NULL,NULL,'MARKAZ SAIF','inactive',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'94959560',NULL,NULL,NULL,NULL,NULL,1,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:31:00','2021-11-15 15:44:09','2022-05-20 10:31:00'),(6,1,'supplier',NULL,'   ',NULL,NULL,NULL,NULL,NULL,'اوريدو','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','0','0',NULL,NULL,NULL,3,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:30:48','2022-05-10 13:07:49','2022-05-20 10:30:48'),(7,1,'supplier',NULL,'السيد أحمد  نبيل','السيد','أحمد',NULL,'نبيل',NULL,'99848870','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'99848870',NULL,'90959939',10,'days',NULL,3,-56380.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-08-02 13:29:26','2022-05-19 15:46:45','2022-08-02 13:29:26'),(8,1,'supplier','شركة نور تك','السيد عمر  رضوان','السيد','عمر',NULL,'رضوان',NULL,'50636609','active',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'50636606',NULL,'90959939',NULL,NULL,NULL,3,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-08-02 13:29:08','2022-05-20 10:30:13','2022-08-02 13:29:08'),(9,1,'supplier','شركة اي تو','السيد محمود  هليل','السيد','محمود',NULL,'هليل',NULL,'55502792','inactive',NULL,'kuwait','الكويت','الكويت','الكويت',NULL,'00965',NULL,'55502792',NULL,'90959939',10,'days',NULL,3,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-05-20 10:36:39','2022-08-02 13:33:30'),(10,1,'supplier','شركة خاصة','السيد احمد  سمارة','السيد','احمد',NULL,'سمارة',NULL,'69304902','active',NULL,'kuwait','الكويت','Kuwait','الكويت','الكويت','00965',NULL,'69304902',NULL,'90959939',5,'days',NULL,3,0.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-08-02 13:29:22','2022-05-20 10:42:13','2022-08-02 13:29:22'),(11,1,'customer',NULL,'السيد سمير  ابو حمزة','السيد','سمير',NULL,'ابو حمزة',NULL,'CO0011','active',NULL,'kuwait','الكويت','Kuwait','الكويت','الكويت','00965',NULL,'96689050','96689050','96689050',10,'days',NULL,3,1000.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-08-02 13:28:06','2022-05-20 10:44:43','2022-08-02 13:28:06'),(12,1,'supplier',NULL,'السيد سليم  سعدالله','السيد','سليم',NULL,'سعدالله',NULL,'CO0012','inactive',NULL,'الفروانية','الفروانية','الكويت',NULL,NULL,NULL,NULL,'65603192',NULL,NULL,10,'days',NULL,3,8000.0000,0,0,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2022-07-29 13:00:34','2022-08-02 13:33:19');

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

CREATE TABLE `currencies` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `symbol` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `thousand_separator` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `decimal_separator` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `currencies` (`id`, `country`, `currency`, `code`, `symbol`, `thousand_separator`, `decimal_separator`, `created_at`, `updated_at`) VALUES (1,'Albania','Leke','ALL','Lek',',','.',NULL,NULL),(2,'America','Dollars','USD','$',',','.',NULL,NULL),(3,'Afghanistan','Afghanis','AF','؋',',','.',NULL,NULL),(4,'Argentina','Pesos','ARS','$',',','.',NULL,NULL),(5,'Aruba','Guilders','AWG','ƒ',',','.',NULL,NULL),(6,'Australia','Dollars','AUD','$',',','.',NULL,NULL),(7,'Azerbaijan','New Manats','AZ','ман',',','.',NULL,NULL),(8,'Bahamas','Dollars','BSD','$',',','.',NULL,NULL),(9,'Barbados','Dollars','BBD','$',',','.',NULL,NULL),(10,'Belarus','Rubles','BYR','p.',',','.',NULL,NULL),(11,'Belgium','Euro','EUR','€',',','.',NULL,NULL),(12,'Beliz','Dollars','BZD','BZ$',',','.',NULL,NULL),(13,'Bermuda','Dollars','BMD','$',',','.',NULL,NULL),(14,'Bolivia','Bolivianos','BOB','$b',',','.',NULL,NULL),(15,'Bosnia and Herzegovina','Convertible Marka','BAM','KM',',','.',NULL,NULL),(16,'Botswana','Pula\'s','BWP','P',',','.',NULL,NULL),(17,'Bulgaria','Leva','BG','лв',',','.',NULL,NULL),(18,'Brazil','Reais','BRL','R$',',','.',NULL,NULL),(19,'Britain [United Kingdom]','Pounds','GBP','£',',','.',NULL,NULL),(20,'Brunei Darussalam','Dollars','BND','$',',','.',NULL,NULL),(21,'Cambodia','Riels','KHR','៛',',','.',NULL,NULL),(22,'Canada','Dollars','CAD','$',',','.',NULL,NULL),(23,'Cayman Islands','Dollars','KYD','$',',','.',NULL,NULL),(24,'Chile','Pesos','CLP','$',',','.',NULL,NULL),(25,'China','Yuan Renminbi','CNY','¥',',','.',NULL,NULL),(26,'Colombia','Pesos','COP','$',',','.',NULL,NULL),(27,'Costa Rica','Colón','CRC','₡',',','.',NULL,NULL),(28,'Croatia','Kuna','HRK','kn',',','.',NULL,NULL),(29,'Cuba','Pesos','CUP','₱',',','.',NULL,NULL),(30,'Cyprus','Euro','EUR','€','.',',',NULL,NULL),(31,'Czech Republic','Koruny','CZK','Kč',',','.',NULL,NULL),(32,'Denmark','Kroner','DKK','kr',',','.',NULL,NULL),(33,'Dominican Republic','Pesos','DOP ','RD$',',','.',NULL,NULL),(34,'East Caribbean','Dollars','XCD','$',',','.',NULL,NULL),(35,'Egypt','Pounds','EGP','£',',','.',NULL,NULL),(36,'El Salvador','Colones','SVC','$',',','.',NULL,NULL),(37,'England [United Kingdom]','Pounds','GBP','£',',','.',NULL,NULL),(38,'Euro','Euro','EUR','€','.',',',NULL,NULL),(39,'Falkland Islands','Pounds','FKP','£',',','.',NULL,NULL),(40,'Fiji','Dollars','FJD','$',',','.',NULL,NULL),(41,'France','Euro','EUR','€','.',',',NULL,NULL),(42,'Ghana','Cedis','GHS','¢',',','.',NULL,NULL),(43,'Gibraltar','Pounds','GIP','£',',','.',NULL,NULL),(44,'Greece','Euro','EUR','€','.',',',NULL,NULL),(45,'Guatemala','Quetzales','GTQ','Q',',','.',NULL,NULL),(46,'Guernsey','Pounds','GGP','£',',','.',NULL,NULL),(47,'Guyana','Dollars','GYD','$',',','.',NULL,NULL),(48,'Holland [Netherlands]','Euro','EUR','€','.',',',NULL,NULL),(49,'Honduras','Lempiras','HNL','L',',','.',NULL,NULL),(50,'Hong Kong','Dollars','HKD','$',',','.',NULL,NULL),(51,'Hungary','Forint','HUF','Ft',',','.',NULL,NULL),(52,'Iceland','Kronur','ISK','kr',',','.',NULL,NULL),(53,'India','Rupees','INR','₹',',','.',NULL,NULL),(54,'Indonesia','Rupiahs','IDR','Rp',',','.',NULL,NULL),(55,'Iran','Rials','IRR','﷼',',','.',NULL,NULL),(56,'Ireland','Euro','EUR','€','.',',',NULL,NULL),(57,'Isle of Man','Pounds','IMP','£',',','.',NULL,NULL),(58,'Israel','New Shekels','ILS','₪',',','.',NULL,NULL),(59,'Italy','Euro','EUR','€','.',',',NULL,NULL),(60,'Jamaica','Dollars','JMD','J$',',','.',NULL,NULL),(61,'Japan','Yen','JPY','¥',',','.',NULL,NULL),(62,'Jersey','Pounds','JEP','£',',','.',NULL,NULL),(63,'Kazakhstan','Tenge','KZT','лв',',','.',NULL,NULL),(64,'Korea [North]','Won','KPW','₩',',','.',NULL,NULL),(65,'Korea [South]','Won','KRW','₩',',','.',NULL,NULL),(66,'Kyrgyzstan','Soms','KGS','лв',',','.',NULL,NULL),(67,'Laos','Kips','LAK','₭',',','.',NULL,NULL),(68,'Latvia','Lati','LVL','Ls',',','.',NULL,NULL),(69,'Lebanon','Pounds','LBP','£',',','.',NULL,NULL),(70,'Liberia','Dollars','LRD','$',',','.',NULL,NULL),(71,'Liechtenstein','Switzerland Francs','CHF','CHF',',','.',NULL,NULL),(72,'Lithuania','Litai','LTL','Lt',',','.',NULL,NULL),(73,'Luxembourg','Euro','EUR','€','.',',',NULL,NULL),(74,'Macedonia','Denars','MKD','ден',',','.',NULL,NULL),(75,'Malaysia','Ringgits','MYR','RM',',','.',NULL,NULL),(76,'Malta','Euro','EUR','€','.',',',NULL,NULL),(77,'Mauritius','Rupees','MUR','₨',',','.',NULL,NULL),(78,'Mexico','Pesos','MXN','$',',','.',NULL,NULL),(79,'Mongolia','Tugriks','MNT','₮',',','.',NULL,NULL),(80,'Mozambique','Meticais','MZ','MT',',','.',NULL,NULL),(81,'Namibia','Dollars','NAD','$',',','.',NULL,NULL),(82,'Nepal','Rupees','NPR','₨',',','.',NULL,NULL),(83,'Netherlands Antilles','Guilders','ANG','ƒ',',','.',NULL,NULL),(84,'Netherlands','Euro','EUR','€','.',',',NULL,NULL),(85,'New Zealand','Dollars','NZD','$',',','.',NULL,NULL),(86,'Nicaragua','Cordobas','NIO','C$',',','.',NULL,NULL),(87,'Nigeria','Nairas','NGN','₦',',','.',NULL,NULL),(88,'North Korea','Won','KPW','₩',',','.',NULL,NULL),(89,'Norway','Krone','NOK','kr',',','.',NULL,NULL),(90,'Oman','Rials','OMR','﷼',',','.',NULL,NULL),(91,'Pakistan','Rupees','PKR','₨',',','.',NULL,NULL),(92,'Panama','Balboa','PAB','B/.',',','.',NULL,NULL),(93,'Paraguay','Guarani','PYG','Gs',',','.',NULL,NULL),(94,'Peru','Nuevos Soles','PE','S/.',',','.',NULL,NULL),(95,'Philippines','Pesos','PHP','Php',',','.',NULL,NULL),(96,'Poland','Zlotych','PL','zł',',','.',NULL,NULL),(97,'Qatar','Rials','QAR','﷼',',','.',NULL,NULL),(98,'Romania','New Lei','RO','lei',',','.',NULL,NULL),(99,'Russia','Rubles','RUB','руб',',','.',NULL,NULL),(100,'Saint Helena','Pounds','SHP','£',',','.',NULL,NULL),(101,'Saudi Arabia','Riyals','SAR','﷼',',','.',NULL,NULL),(102,'Serbia','Dinars','RSD','Дин.',',','.',NULL,NULL),(103,'Seychelles','Rupees','SCR','₨',',','.',NULL,NULL),(104,'Singapore','Dollars','SGD','$',',','.',NULL,NULL),(105,'Slovenia','Euro','EUR','€','.',',',NULL,NULL),(106,'Solomon Islands','Dollars','SBD','$',',','.',NULL,NULL),(107,'Somalia','Shillings','SOS','S',',','.',NULL,NULL),(108,'South Africa','Rand','ZAR','R',',','.',NULL,NULL),(109,'South Korea','Won','KRW','₩',',','.',NULL,NULL),(110,'Spain','Euro','EUR','€','.',',',NULL,NULL),(111,'Sri Lanka','Rupees','LKR','₨',',','.',NULL,NULL),(112,'Sweden','Kronor','SEK','kr',',','.',NULL,NULL),(113,'Switzerland','Francs','CHF','CHF',',','.',NULL,NULL),(114,'Suriname','Dollars','SRD','$',',','.',NULL,NULL),(115,'Syria','Pounds','SYP','£',',','.',NULL,NULL),(116,'Taiwan','New Dollars','TWD','NT$',',','.',NULL,NULL),(117,'Thailand','Baht','THB','฿',',','.',NULL,NULL),(118,'Trinidad and Tobago','Dollars','TTD','TT$',',','.',NULL,NULL),(119,'Turkey','Lira','TRY','TL',',','.',NULL,NULL),(120,'Turkey','Liras','TRL','£',',','.',NULL,NULL),(121,'Tuvalu','Dollars','TVD','$',',','.',NULL,NULL),(122,'Ukraine','Hryvnia','UAH','₴',',','.',NULL,NULL),(123,'United Kingdom','Pounds','GBP','£',',','.',NULL,NULL),(124,'United States of America','Dollars','USD','$',',','.',NULL,NULL),(125,'Uruguay','Pesos','UYU','$U',',','.',NULL,NULL),(126,'Uzbekistan','Sums','UZS','лв',',','.',NULL,NULL),(127,'Vatican City','Euro','EUR','€','.',',',NULL,NULL),(128,'Venezuela','Bolivares Fuertes','VEF','Bs',',','.',NULL,NULL),(129,'Vietnam','Dong','VND','₫',',','.',NULL,NULL),(130,'Yemen','Rials','YER','﷼',',','.',NULL,NULL),(131,'Zimbabwe','Zimbabwe Dollars','ZWD','Z$',',','.',NULL,NULL),(132,'Iraq','Iraqi dinar','IQD','د.ع',',','.',NULL,NULL),(133,'Kenya','Kenyan shilling','KES','KSh',',','.',NULL,NULL),(134,'Bangladesh','Taka','BDT','৳',',','.',NULL,NULL),(135,'Algerie','Algerian dinar','DZD','د.ج',' ','.',NULL,NULL),(136,'United Arab Emirates','United Arab Emirates dirham','AED','د.إ',',','.',NULL,NULL),(137,'Uganda','Uganda shillings','UGX','USh',',','.',NULL,NULL),(138,'Tanzania','Tanzanian shilling','TZS','TSh',',','.',NULL,NULL),(139,'Angola','Kwanza','AOA','Kz',',','.',NULL,NULL),(140,'Kuwait','Kuwaiti dinar','KWD','KD',',','.',NULL,NULL),(141,'Bahrain','Bahraini dinar','BHD','BD',',','.',NULL,NULL);

--
-- Table structure for table `customer_groups`
--

CREATE TABLE `customer_groups` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(5,2) NOT NULL,
  `price_calculation_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'percentage',
  `selling_price_group_id` int DEFAULT NULL,
  `created_by` int unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `customer_groups_business_id_foreign` (`business_id`),
  KEY `customer_groups_created_by_index` (`created_by`),
  KEY `customer_groups_price_calculation_type_index` (`price_calculation_type`),
  KEY `customer_groups_selling_price_group_id_index` (`selling_price_group_id`),
  CONSTRAINT `customer_groups_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_groups`
--


--
-- Table structure for table `dashboard_configurations`
--

CREATE TABLE `dashboard_configurations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `created_by` int NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `color` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `configuration` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dashboard_configurations_business_id_foreign` (`business_id`),
  CONSTRAINT `dashboard_configurations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dashboard_configurations`
--


--
-- Table structure for table `discount_variations`
--

CREATE TABLE `discount_variations` (
  `discount_id` int NOT NULL,
  `variation_id` int NOT NULL,
  KEY `discount_variations_discount_id_index` (`discount_id`),
  KEY `discount_variations_variation_id_index` (`variation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `discount_variations`
--


--
-- Table structure for table `discounts`
--

CREATE TABLE `discounts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int NOT NULL,
  `brand_id` int DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `location_id` int DEFAULT NULL,
  `priority` int DEFAULT NULL,
  `discount_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `starts_at` datetime DEFAULT NULL,
  `ends_at` datetime DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `applicable_in_spg` tinyint(1) DEFAULT '0',
  `applicable_in_cg` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `discounts_business_id_index` (`business_id`),
  KEY `discounts_brand_id_index` (`brand_id`),
  KEY `discounts_category_id_index` (`category_id`),
  KEY `discounts_location_id_index` (`location_id`),
  KEY `discounts_priority_index` (`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `discounts`
--


--
-- Table structure for table `document_and_notes`
--

CREATE TABLE `document_and_notes` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `notable_id` int NOT NULL,
  `notable_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `heading` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_private` tinyint(1) NOT NULL DEFAULT '0',
  `created_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `document_and_notes_business_id_index` (`business_id`),
  KEY `document_and_notes_notable_id_index` (`notable_id`),
  KEY `document_and_notes_created_by_index` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_and_notes`
--


--
-- Table structure for table `essentials_allowances_and_deductions`
--

CREATE TABLE `essentials_allowances_and_deductions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('allowance','deduction') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(22,4) NOT NULL,
  `amount_type` enum('fixed','percent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `applicable_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_allowances_and_deductions_business_id_index` (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_allowances_and_deductions`
--


--
-- Table structure for table `essentials_attendances`
--

CREATE TABLE `essentials_attendances` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `business_id` int NOT NULL,
  `clock_in_time` datetime DEFAULT NULL,
  `clock_out_time` datetime DEFAULT NULL,
  `essentials_shift_id` int DEFAULT NULL,
  `ip_address` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `clock_in_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `clock_out_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_attendances_user_id_index` (`user_id`),
  KEY `essentials_attendances_business_id_index` (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_attendances`
--


--
-- Table structure for table `essentials_document_shares`
--

CREATE TABLE `essentials_document_shares` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `document_id` int NOT NULL,
  `value_type` enum('user','role') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_document_shares`
--


--
-- Table structure for table `essentials_documents`
--

CREATE TABLE `essentials_documents` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `user_id` int NOT NULL,
  `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_documents`
--


--
-- Table structure for table `essentials_holidays`
--

CREATE TABLE `essentials_holidays` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `business_id` int NOT NULL,
  `location_id` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_holidays_business_id_index` (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_holidays`
--


--
-- Table structure for table `essentials_leave_types`
--

CREATE TABLE `essentials_leave_types` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `leave_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `max_leave_count` int DEFAULT NULL,
  `leave_count_interval` enum('month','year') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_leave_types_business_id_index` (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_leave_types`
--


--
-- Table structure for table `essentials_leaves`
--

CREATE TABLE `essentials_leaves` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `essentials_leave_type_id` int DEFAULT NULL,
  `business_id` int NOT NULL,
  `user_id` int NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `ref_no` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('pending','approved','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_leaves_essentials_leave_type_id_index` (`essentials_leave_type_id`),
  KEY `essentials_leaves_business_id_index` (`business_id`),
  KEY `essentials_leaves_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_leaves`
--


--
-- Table structure for table `essentials_messages`
--

CREATE TABLE `essentials_messages` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `user_id` int NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `location_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_messages`
--


--
-- Table structure for table `essentials_reminders`
--

CREATE TABLE `essentials_reminders` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `user_id` int NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  `repeat` enum('one_time','every_day','every_week','every_month') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_reminders`
--


--
-- Table structure for table `essentials_shifts`
--

CREATE TABLE `essentials_shifts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('fixed_shift','flexible_shift') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fixed_shift',
  `business_id` int NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `holidays` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_shifts`
--


--
-- Table structure for table `essentials_to_dos`
--

CREATE TABLE `essentials_to_dos` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `task` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `task_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estimated_hours` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `priority` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_to_dos_status_index` (`status`),
  KEY `essentials_to_dos_priority_index` (`priority`),
  KEY `essentials_to_dos_created_by_index` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_to_dos`
--

INSERT INTO `essentials_to_dos` (`id`, `business_id`, `task`, `date`, `end_date`, `task_id`, `description`, `status`, `estimated_hours`, `priority`, `created_by`, `created_at`, `updated_at`) VALUES (1,1,'new task','2021-07-03','2021-07-24','2021/0001','finish it please','new','15','high',1,'2021-07-03 06:13:01','2021-07-03 06:13:01');

--
-- Table structure for table `essentials_todo_comments`
--

CREATE TABLE `essentials_todo_comments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `task_id` int NOT NULL,
  `comment_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `essentials_todo_comments_task_id_index` (`task_id`),
  KEY `essentials_todo_comments_comment_by_index` (`comment_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_todo_comments`
--


--
-- Table structure for table `essentials_todos_users`
--

CREATE TABLE `essentials_todos_users` (
  `todo_id` int NOT NULL,
  `user_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_todos_users`
--

INSERT INTO `essentials_todos_users` (`todo_id`, `user_id`) VALUES (1,1);

--
-- Table structure for table `essentials_user_allowance_and_deductions`
--

CREATE TABLE `essentials_user_allowance_and_deductions` (
  `user_id` int NOT NULL,
  `allowance_deduction_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_user_allowance_and_deductions`
--


--
-- Table structure for table `essentials_user_shifts`
--

CREATE TABLE `essentials_user_shifts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `essentials_shift_id` int NOT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `essentials_user_shifts`
--


--
-- Table structure for table `expense_categories`
--

CREATE TABLE `expense_categories` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int unsigned NOT NULL,
  `code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `expense_categories_business_id_foreign` (`business_id`),
  CONSTRAINT `expense_categories_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_categories`
--


--
-- Table structure for table `group_sub_taxes`
--

CREATE TABLE `group_sub_taxes` (
  `group_tax_id` int unsigned NOT NULL,
  `tax_id` int unsigned NOT NULL,
  KEY `group_sub_taxes_group_tax_id_foreign` (`group_tax_id`),
  KEY `group_sub_taxes_tax_id_foreign` (`tax_id`),
  CONSTRAINT `group_sub_taxes_group_tax_id_foreign` FOREIGN KEY (`group_tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  CONSTRAINT `group_sub_taxes_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `group_sub_taxes`
--


--
-- Table structure for table `invoice_layouts`
--

CREATE TABLE `invoice_layouts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `header_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `invoice_no_prefix` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quotation_no_prefix` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line5` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading_not_paid` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading_paid` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quotation_heading` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `round_off_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paid_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_client_id` tinyint(1) NOT NULL DEFAULT '0',
  `client_id_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `client_tax_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_time_format` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_time` tinyint(1) NOT NULL DEFAULT '1',
  `show_brand` tinyint(1) NOT NULL DEFAULT '0',
  `show_sku` tinyint(1) NOT NULL DEFAULT '1',
  `show_cat_code` tinyint(1) NOT NULL DEFAULT '1',
  `show_expiry` tinyint(1) NOT NULL DEFAULT '0',
  `show_lot` tinyint(1) NOT NULL DEFAULT '0',
  `show_image` tinyint(1) NOT NULL DEFAULT '0',
  `show_sale_description` tinyint(1) NOT NULL DEFAULT '0',
  `sales_person_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_sales_person` tinyint(1) NOT NULL DEFAULT '0',
  `table_product_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_qty_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_unit_price_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_subtotal_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cat_code_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `logo` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_logo` tinyint(1) NOT NULL DEFAULT '0',
  `show_business_name` tinyint(1) NOT NULL DEFAULT '0',
  `show_location_name` tinyint(1) NOT NULL DEFAULT '1',
  `show_landmark` tinyint(1) NOT NULL DEFAULT '1',
  `show_city` tinyint(1) NOT NULL DEFAULT '1',
  `show_state` tinyint(1) NOT NULL DEFAULT '1',
  `show_zip_code` tinyint(1) NOT NULL DEFAULT '1',
  `show_country` tinyint(1) NOT NULL DEFAULT '1',
  `show_mobile_number` tinyint(1) NOT NULL DEFAULT '1',
  `show_alternate_number` tinyint(1) NOT NULL DEFAULT '0',
  `show_email` tinyint(1) NOT NULL DEFAULT '0',
  `show_tax_1` tinyint(1) NOT NULL DEFAULT '1',
  `show_tax_2` tinyint(1) NOT NULL DEFAULT '0',
  `show_barcode` tinyint(1) NOT NULL DEFAULT '0',
  `show_payments` tinyint(1) NOT NULL DEFAULT '0',
  `show_customer` tinyint(1) NOT NULL DEFAULT '0',
  `customer_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_reward_point` tinyint(1) NOT NULL DEFAULT '0',
  `highlight_color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `footer_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `module_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `common_settings` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `business_id` int unsigned NOT NULL,
  `design` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'classic',
  `cn_heading` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'cn = credit note',
  `cn_no_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cn_amount_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_tax_headings` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `show_previous_bal` tinyint(1) NOT NULL DEFAULT '0',
  `prev_bal_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `change_return_label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_fields` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `contact_custom_fields` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `location_custom_fields` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_layouts_business_id_foreign` (`business_id`),
  CONSTRAINT `invoice_layouts_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_layouts`
--

INSERT INTO `invoice_layouts` (`id`, `name`, `header_text`, `invoice_no_prefix`, `quotation_no_prefix`, `invoice_heading`, `sub_heading_line1`, `sub_heading_line2`, `sub_heading_line3`, `sub_heading_line4`, `sub_heading_line5`, `invoice_heading_not_paid`, `invoice_heading_paid`, `quotation_heading`, `sub_total_label`, `discount_label`, `tax_label`, `total_label`, `round_off_label`, `total_due_label`, `paid_label`, `show_client_id`, `client_id_label`, `client_tax_label`, `date_label`, `date_time_format`, `show_time`, `show_brand`, `show_sku`, `show_cat_code`, `show_expiry`, `show_lot`, `show_image`, `show_sale_description`, `sales_person_label`, `show_sales_person`, `table_product_label`, `table_qty_label`, `table_unit_price_label`, `table_subtotal_label`, `cat_code_label`, `logo`, `show_logo`, `show_business_name`, `show_location_name`, `show_landmark`, `show_city`, `show_state`, `show_zip_code`, `show_country`, `show_mobile_number`, `show_alternate_number`, `show_email`, `show_tax_1`, `show_tax_2`, `show_barcode`, `show_payments`, `show_customer`, `customer_label`, `show_reward_point`, `highlight_color`, `footer_text`, `module_info`, `common_settings`, `is_default`, `business_id`, `design`, `cn_heading`, `cn_no_label`, `cn_amount_label`, `table_tax_headings`, `show_previous_bal`, `prev_bal_label`, `change_return_label`, `product_custom_fields`, `contact_custom_fields`, `location_custom_fields`, `created_at`, `updated_at`) VALUES (1,'Default',NULL,'Invoice No.',NULL,'Invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Subtotal','Discount','Tax','Total',NULL,'Total Due','Total Paid',0,NULL,NULL,'Date',NULL,1,0,1,1,0,0,0,0,NULL,0,'Product','Quantity','Unit Price','Subtotal',NULL,NULL,0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,'Customer',0,'#000000',NULL,'{\"types_of_service\":{\"types_of_service_label\":null},\"tables\":{\"table_label\":null},\"service_staff\":{\"service_staff_label\":null},\"repair\":{\"repair_status_label\":null,\"repair_warranty_label\":null,\"brand_label\":null,\"device_label\":null,\"model_no_label\":null,\"serial_no_label\":null,\"defects_label\":null,\"repair_checklist_label\":null}}','{\"due_date_label\":null,\"total_quantity_label\":null,\"item_discount_label\":null,\"num_to_word_format\":\"international\"}',1,1,'slim',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,'2021-07-03 05:00:34','2021-07-07 19:32:48');

--
-- Table structure for table `invoice_schemes`
--

CREATE TABLE `invoice_schemes` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `scheme_type` enum('blank','year') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_number` int DEFAULT NULL,
  `invoice_count` int NOT NULL DEFAULT '0',
  `total_digits` int DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_schemes_business_id_foreign` (`business_id`),
  KEY `invoice_schemes_scheme_type_index` (`scheme_type`),
  CONSTRAINT `invoice_schemes_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_schemes`
--

INSERT INTO `invoice_schemes` (`id`, `business_id`, `name`, `scheme_type`, `prefix`, `start_number`, `invoice_count`, `total_digits`, `is_default`, `created_at`, `updated_at`) VALUES (1,1,'Invoice','blank',NULL,1,21,5,1,'2021-07-03 05:00:34','2022-08-05 20:36:57');

--
-- Table structure for table `media`
--

CREATE TABLE `media` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `uploaded_by` int DEFAULT NULL,
  `model_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `woocommerce_media_id` int DEFAULT NULL,
  `model_media_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `model_id` bigint unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `media_model_type_model_id_index` (`model_type`,`model_id`),
  KEY `media_business_id_index` (`business_id`),
  KEY `media_uploaded_by_index` (`uploaded_by`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `media`
--

INSERT INTO `media` (`id`, `business_id`, `file_name`, `description`, `uploaded_by`, `model_type`, `woocommerce_media_id`, `model_media_type`, `model_id`, `created_at`, `updated_at`) VALUES (1,1,'1646869901_1612184462_star.png',NULL,1,'App\\User',NULL,NULL,1,'2022-03-10 00:51:41','2022-03-10 00:51:41'),(2,1,'1653038079_1954649696_Penguins.jpg',NULL,3,'App\\User',NULL,NULL,3,'2022-05-20 10:14:39','2022-05-20 10:14:39');

--
-- Table structure for table `mfg_ingredient_groups`
--

CREATE TABLE `mfg_ingredient_groups` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mfg_ingredient_groups`
--


--
-- Table structure for table `mfg_recipe_ingredients`
--

CREATE TABLE `mfg_recipe_ingredients` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `mfg_recipe_id` int unsigned NOT NULL,
  `variation_id` int NOT NULL,
  `mfg_ingredient_group_id` int DEFAULT NULL,
  `quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `waste_percent` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `sub_unit_id` int DEFAULT NULL,
  `sort_order` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mfg_recipe_ingredients_mfg_recipe_id_foreign` (`mfg_recipe_id`),
  CONSTRAINT `mfg_recipe_ingredients_mfg_recipe_id_foreign` FOREIGN KEY (`mfg_recipe_id`) REFERENCES `mfg_recipes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mfg_recipe_ingredients`
--


--
-- Table structure for table `mfg_recipes`
--

CREATE TABLE `mfg_recipes` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `variation_id` int NOT NULL,
  `instructions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `waste_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `ingredients_cost` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `extra_cost` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `production_cost_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'percentage',
  `total_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `final_price` decimal(22,4) NOT NULL,
  `sub_unit_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mfg_recipes_product_id_index` (`product_id`),
  KEY `mfg_recipes_variation_id_index` (`variation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mfg_recipes`
--


--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=351 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2016_06_01_000001_create_oauth_auth_codes_table',1),(4,'2016_06_01_000002_create_oauth_access_tokens_table',1),(5,'2016_06_01_000003_create_oauth_refresh_tokens_table',1),(6,'2016_06_01_000004_create_oauth_clients_table',1),(7,'2016_06_01_000005_create_oauth_personal_access_clients_table',1),(8,'2017_07_05_071953_create_currencies_table',1),(9,'2017_07_05_073658_create_business_table',1),(10,'2017_07_22_075923_add_business_id_users_table',1),(11,'2017_07_23_113209_create_brands_table',1),(12,'2017_07_26_083429_create_permission_tables',1),(13,'2017_07_26_110000_create_tax_rates_table',1),(14,'2017_07_26_122313_create_units_table',1),(15,'2017_07_27_075706_create_contacts_table',1),(16,'2017_08_04_071038_create_categories_table',1),(17,'2017_08_08_115903_create_products_table',1),(18,'2017_08_09_061616_create_variation_templates_table',1),(19,'2017_08_09_061638_create_variation_value_templates_table',1),(20,'2017_08_10_061146_create_product_variations_table',1),(21,'2017_08_10_061216_create_variations_table',1),(22,'2017_08_19_054827_create_transactions_table',1),(23,'2017_08_31_073533_create_purchase_lines_table',1),(24,'2017_10_15_064638_create_transaction_payments_table',1),(25,'2017_10_31_065621_add_default_sales_tax_to_business_table',1),(26,'2017_11_20_051930_create_table_group_sub_taxes',1),(27,'2017_11_20_063603_create_transaction_sell_lines',1),(28,'2017_11_21_064540_create_barcodes_table',1),(29,'2017_11_23_181237_create_invoice_schemes_table',1),(30,'2017_12_25_122822_create_business_locations_table',1),(31,'2017_12_25_160253_add_location_id_to_transactions_table',1),(32,'2017_12_25_163227_create_variation_location_details_table',1),(33,'2018_01_04_115627_create_sessions_table',1),(34,'2018_01_05_112817_create_invoice_layouts_table',1),(35,'2018_01_06_112303_add_invoice_scheme_id_and_invoice_layout_id_to_business_locations',1),(36,'2018_01_08_104124_create_expense_categories_table',1),(37,'2018_01_08_123327_modify_transactions_table_for_expenses',1),(38,'2018_01_09_111005_modify_payment_status_in_transactions_table',1),(39,'2018_01_09_111109_add_paid_on_column_to_transaction_payments_table',1),(40,'2018_01_25_172439_add_printer_related_fields_to_business_locations_table',1),(41,'2018_01_27_184322_create_printers_table',1),(42,'2018_01_30_181442_create_cash_registers_table',1),(43,'2018_01_31_125836_create_cash_register_transactions_table',1),(44,'2018_02_07_173326_modify_business_table',1),(45,'2018_02_08_105425_add_enable_product_expiry_column_to_business_table',1),(46,'2018_02_08_111027_add_expiry_period_and_expiry_period_type_columns_to_products_table',1),(47,'2018_02_08_131118_add_mfg_date_and_exp_date_purchase_lines_table',1),(48,'2018_02_08_155348_add_exchange_rate_to_transactions_table',1),(49,'2018_02_09_124945_modify_transaction_payments_table_for_contact_payments',1),(50,'2018_02_12_113640_create_transaction_sell_lines_purchase_lines_table',1),(51,'2018_02_12_114605_add_quantity_sold_in_purchase_lines_table',1),(52,'2018_02_13_183323_alter_decimal_fields_size',1),(53,'2018_02_14_161928_add_transaction_edit_days_to_business_table',1),(54,'2018_02_15_161032_add_document_column_to_transactions_table',1),(55,'2018_02_17_124709_add_more_options_to_invoice_layouts',1),(56,'2018_02_19_111517_add_keyboard_shortcut_column_to_business_table',1),(57,'2018_02_19_121537_stock_adjustment_move_to_transaction_table',1),(58,'2018_02_20_165505_add_is_direct_sale_column_to_transactions_table',1),(59,'2018_02_21_105329_create_system_table',1),(60,'2018_02_23_100549_version_1_2',1),(61,'2018_02_23_125648_add_enable_editing_sp_from_purchase_column_to_business_table',1),(62,'2018_02_26_103612_add_sales_commission_agent_column_to_business_table',1),(63,'2018_02_26_130519_modify_users_table_for_sales_cmmsn_agnt',1),(64,'2018_02_26_134500_add_commission_agent_to_transactions_table',1),(65,'2018_02_27_121422_add_item_addition_method_to_business_table',1),(66,'2018_02_27_170232_modify_transactions_table_for_stock_transfer',1),(67,'2018_03_05_153510_add_enable_inline_tax_column_to_business_table',1),(68,'2018_03_06_210206_modify_product_barcode_types',1),(69,'2018_03_13_181541_add_expiry_type_to_business_table',1),(70,'2018_03_16_113446_product_expiry_setting_for_business',1),(71,'2018_03_19_113601_add_business_settings_options',1),(72,'2018_03_26_125334_add_pos_settings_to_business_table',1),(73,'2018_03_26_165350_create_customer_groups_table',1),(74,'2018_03_27_122720_customer_group_related_changes_in_tables',1),(75,'2018_03_29_110138_change_tax_field_to_nullable_in_business_table',1),(76,'2018_03_29_115502_add_changes_for_sr_number_in_products_and_sale_lines_table',1),(77,'2018_03_29_134340_add_inline_discount_fields_in_purchase_lines',1),(78,'2018_03_31_140921_update_transactions_table_exchange_rate',1),(79,'2018_04_03_103037_add_contact_id_to_contacts_table',1),(80,'2018_04_03_122709_add_changes_to_invoice_layouts_table',1),(81,'2018_04_09_135320_change_exchage_rate_size_in_business_table',1),(82,'2018_04_17_123122_add_lot_number_to_business',1),(83,'2018_04_17_160845_add_product_racks_table',1),(84,'2018_04_20_182015_create_res_tables_table',1),(85,'2018_04_24_105246_restaurant_fields_in_transaction_table',1),(86,'2018_04_24_114149_add_enabled_modules_business_table',1),(87,'2018_04_24_133704_add_modules_fields_in_invoice_layout_table',1),(88,'2018_04_27_132653_quotation_related_change',1),(89,'2018_05_02_104439_add_date_format_and_time_format_to_business',1),(90,'2018_05_02_111939_add_sell_return_to_transaction_payments',1),(91,'2018_05_14_114027_add_rows_positions_for_products',1),(92,'2018_05_14_125223_add_weight_to_products_table',1),(93,'2018_05_14_164754_add_opening_stock_permission',1),(94,'2018_05_15_134729_add_design_to_invoice_layouts',1),(95,'2018_05_16_183307_add_tax_fields_invoice_layout',1),(96,'2018_05_18_191956_add_sell_return_to_transaction_table',1),(97,'2018_05_21_131349_add_custom_fileds_to_contacts_table',1),(98,'2018_05_21_131607_invoice_layout_fields_for_sell_return',1),(99,'2018_05_21_131949_add_custom_fileds_and_website_to_business_locations_table',1),(100,'2018_05_22_123527_create_reference_counts_table',1),(101,'2018_05_22_154540_add_ref_no_prefixes_column_to_business_table',1),(102,'2018_05_24_132620_add_ref_no_column_to_transaction_payments_table',1),(103,'2018_05_24_161026_add_location_id_column_to_business_location_table',1),(104,'2018_05_25_180603_create_modifiers_related_table',1),(105,'2018_05_29_121714_add_purchase_line_id_to_stock_adjustment_line_table',1),(106,'2018_05_31_114645_add_res_order_status_column_to_transactions_table',1),(107,'2018_06_05_103530_rename_purchase_line_id_in_stock_adjustment_lines_table',1),(108,'2018_06_05_111905_modify_products_table_for_modifiers',1),(109,'2018_06_06_110524_add_parent_sell_line_id_column_to_transaction_sell_lines_table',1),(110,'2018_06_07_152443_add_is_service_staff_to_roles_table',1),(111,'2018_06_07_182258_add_image_field_to_products_table',1),(112,'2018_06_13_133705_create_bookings_table',1),(113,'2018_06_15_173636_add_email_column_to_contacts_table',1),(114,'2018_06_27_182835_add_superadmin_related_fields_business',1),(115,'2018_06_27_185405_create_packages_table',1),(116,'2018_06_28_182803_create_subscriptions_table',1),(117,'2018_07_10_101913_add_custom_fields_to_products_table',1),(118,'2018_07_17_103434_add_sales_person_name_label_to_invoice_layouts_table',1),(119,'2018_07_17_163920_add_theme_skin_color_column_to_business_table',1),(120,'2018_07_17_182021_add_rows_to_system_table',1),(121,'2018_07_19_131721_add_options_to_packages_table',1),(122,'2018_07_24_160319_add_lot_no_line_id_to_transaction_sell_lines_table',1),(123,'2018_07_25_110004_add_show_expiry_and_show_lot_colums_to_invoice_layouts_table',1),(124,'2018_07_25_172004_add_discount_columns_to_transaction_sell_lines_table',1),(125,'2018_07_26_124720_change_design_column_type_in_invoice_layouts_table',1),(126,'2018_07_26_170424_add_unit_price_before_discount_column_to_transaction_sell_line_table',1),(127,'2018_07_28_103614_add_credit_limit_column_to_contacts_table',1),(128,'2018_08_08_110755_add_new_payment_methods_to_transaction_payments_table',1),(129,'2018_08_08_122225_modify_cash_register_transactions_table_for_new_payment_methods',1),(130,'2018_08_14_104036_add_opening_balance_type_to_transactions_table',1),(131,'2018_08_17_155534_add_min_termination_alert_days',1),(132,'2018_08_28_105945_add_business_based_username_settings_to_system_table',1),(133,'2018_08_30_105906_add_superadmin_communicator_logs_table',1),(134,'2018_09_04_155900_create_accounts_table',1),(135,'2018_09_06_114438_create_selling_price_groups_table',1),(136,'2018_09_06_154057_create_variation_group_prices_table',1),(137,'2018_09_07_102413_add_permission_to_access_default_selling_price',1),(138,'2018_09_07_134858_add_selling_price_group_id_to_transactions_table',1),(139,'2018_09_10_112448_update_product_type_to_single_if_null_in_products_table',1),(140,'2018_09_10_152703_create_account_transactions_table',1),(141,'2018_09_10_173656_add_account_id_column_to_transaction_payments_table',1),(142,'2018_09_19_123914_create_notification_templates_table',1),(143,'2018_09_22_110504_add_sms_and_email_settings_columns_to_business_table',1),(144,'2018_09_24_134942_add_lot_no_line_id_to_stock_adjustment_lines_table',1),(145,'2018_09_26_105557_add_transaction_payments_for_existing_expenses',1),(146,'2018_09_27_111609_modify_transactions_table_for_purchase_return',1),(147,'2018_09_27_131154_add_quantity_returned_column_to_purchase_lines_table',1),(148,'2018_10_02_131401_add_return_quantity_column_to_transaction_sell_lines_table',1),(149,'2018_10_03_104918_add_qty_returned_column_to_transaction_sell_lines_purchase_lines_table',1),(150,'2018_10_03_185947_add_default_notification_templates_to_database',1),(151,'2018_10_09_153105_add_business_id_to_transaction_payments_table',1),(152,'2018_10_16_135229_create_permission_for_sells_and_purchase',1),(153,'2018_10_22_114441_add_columns_for_variable_product_modifications',1),(154,'2018_10_22_134428_modify_variable_product_data',1),(155,'2018_10_30_181558_add_table_tax_headings_to_invoice_layout',1),(156,'2018_10_31_122619_add_pay_terms_field_transactions_table',1),(157,'2018_10_31_161328_add_new_permissions_for_pos_screen',1),(158,'2018_10_31_174752_add_access_selected_contacts_only_to_users_table',1),(159,'2018_10_31_175627_add_user_contact_access',1),(160,'2018_10_31_180559_add_auto_send_sms_column_to_notification_templates_table',1),(161,'2018_11_02_130636_add_custom_permissions_to_packages_table',1),(162,'2018_11_02_171949_change_card_type_column_to_varchar_in_transaction_payments_table',1),(163,'2018_11_05_161848_add_more_fields_to_packages_table',1),(164,'2018_11_08_105621_add_role_permissions',1),(165,'2018_11_26_114135_add_is_suspend_column_to_transactions_table',1),(166,'2018_11_28_104410_modify_units_table_for_multi_unit',1),(167,'2018_11_28_170952_add_sub_unit_id_to_purchase_lines_and_sell_lines',1),(168,'2018_11_29_115918_add_primary_key_in_system_table',1),(169,'2018_12_03_185546_add_product_description_column_to_products_table',1),(170,'2018_12_06_114937_modify_system_table_and_users_table',1),(171,'2018_12_10_124621_modify_system_table_values_null_default',1),(172,'2018_12_13_160007_add_custom_fields_display_options_to_invoice_layouts_table',1),(173,'2018_12_14_103307_modify_system_table',1),(174,'2018_12_18_133837_add_prev_balance_due_columns_to_invoice_layouts_table',1),(175,'2018_12_18_170656_add_invoice_token_column_to_transaction_table',1),(176,'2018_12_20_133639_add_date_time_format_column_to_invoice_layouts_table',1),(177,'2018_12_21_120659_add_recurring_invoice_fields_to_transactions_table',1),(178,'2018_12_24_154933_create_notifications_table',1),(179,'2019_01_08_112015_add_document_column_to_transaction_payments_table',1),(180,'2019_01_10_124645_add_account_permission',1),(181,'2019_01_16_125825_add_subscription_no_column_to_transactions_table',1),(182,'2019_01_28_111647_add_order_addresses_column_to_transactions_table',1),(183,'2019_02_13_173821_add_is_inactive_column_to_products_table',1),(184,'2019_02_19_103118_create_discounts_table',1),(185,'2019_02_21_120324_add_discount_id_column_to_transaction_sell_lines_table',1),(186,'2019_02_21_134324_add_permission_for_discount',1),(187,'2019_03_04_170832_add_service_staff_columns_to_transaction_sell_lines_table',1),(188,'2019_03_09_102425_add_sub_type_column_to_transactions_table',1),(189,'2019_03_09_124457_add_indexing_transaction_sell_lines_purchase_lines_table',1),(190,'2019_03_12_120336_create_activity_log_table',1),(191,'2019_03_15_132925_create_media_table',1),(192,'2019_05_08_130339_add_indexing_to_parent_id_in_transaction_payments_table',1),(193,'2019_05_10_132311_add_missing_column_indexing',1),(194,'2019_05_10_135434_add_missing_database_column_indexes',1),(195,'2019_05_14_091812_add_show_image_column_to_invoice_layouts_table',1),(196,'2019_05_25_104922_add_view_purchase_price_permission',1),(197,'2019_06_17_103515_add_profile_informations_columns_to_users_table',1),(198,'2019_06_18_135524_add_permission_to_view_own_sales_only',1),(199,'2019_06_19_112058_add_database_changes_for_reward_points',1),(200,'2019_06_28_133732_change_type_column_to_string_in_transactions_table',1),(201,'2019_07_13_111420_add_is_created_from_api_column_to_transactions_table',1),(202,'2019_07_15_165136_add_fields_for_combo_product',1),(203,'2019_07_19_103446_add_mfg_quantity_used_column_to_purchase_lines_table',1),(204,'2019_07_22_152649_add_not_for_selling_in_product_table',1),(205,'2019_07_29_185351_add_show_reward_point_column_to_invoice_layouts_table',1),(206,'2019_08_08_162302_add_sub_units_related_fields',1),(207,'2019_08_16_115300_create_superadmin_frontend_pages_table',1),(208,'2019_08_26_133419_update_price_fields_decimal_point',1),(209,'2019_09_02_160054_remove_location_permissions_from_roles',1),(210,'2019_09_03_185259_add_permission_for_pos_screen',1),(211,'2019_09_04_163141_add_location_id_to_cash_registers_table',1),(212,'2019_09_04_184008_create_types_of_services_table',1),(213,'2019_09_06_131445_add_types_of_service_fields_to_transactions_table',1),(214,'2019_09_09_134810_add_default_selling_price_group_id_column_to_business_locations_table',1),(215,'2019_09_12_105616_create_product_locations_table',1),(216,'2019_09_17_122522_add_custom_labels_column_to_business_table',1),(217,'2019_09_18_164319_add_shipping_fields_to_transactions_table',1),(218,'2019_09_19_170927_close_all_active_registers',1),(219,'2019_09_23_161906_add_media_description_cloumn_to_media_table',1),(220,'2019_10_18_155633_create_account_types_table',1),(221,'2019_10_22_163335_add_common_settings_column_to_business_table',1),(222,'2019_10_29_132521_add_update_purchase_status_permission',1),(223,'2019_11_09_110522_add_indexing_to_lot_number',1),(224,'2019_11_19_170824_add_is_active_column_to_business_locations_table',1),(225,'2019_11_21_162913_change_quantity_field_types_to_decimal',1),(226,'2019_11_25_160340_modify_categories_table_for_polymerphic_relationship',1),(227,'2019_12_02_105025_create_warranties_table',1),(228,'2019_12_03_180342_add_common_settings_field_to_invoice_layouts_table',1),(229,'2019_12_05_183955_add_more_fields_to_users_table',1),(230,'2019_12_06_174904_add_change_return_label_column_to_invoice_layouts_table',1),(231,'2019_12_11_121307_add_draft_and_quotation_list_permissions',1),(232,'2019_12_12_180126_copy_expense_total_to_total_before_tax',1),(233,'2019_12_19_181412_make_alert_quantity_field_nullable_on_products_table',1),(234,'2019_12_25_173413_create_dashboard_configurations_table',1),(235,'2020_01_08_133506_create_document_and_notes_table',1),(236,'2020_01_09_113252_add_cc_bcc_column_to_notification_templates_table',1),(237,'2020_01_16_174818_add_round_off_amount_field_to_transactions_table',1),(238,'2020_01_28_162345_add_weighing_scale_settings_in_business_settings_table',1),(239,'2020_02_18_172447_add_import_fields_to_transactions_table',1),(240,'2020_03_13_135844_add_is_active_column_to_selling_price_groups_table',1),(241,'2020_03_16_115449_add_contact_status_field_to_contacts_table',1),(242,'2020_03_26_124736_add_allow_login_column_in_users_table',1),(243,'2020_04_13_154150_add_feature_products_column_to_business_loactions',1),(244,'2020_04_15_151802_add_user_type_to_users_table',1),(245,'2020_04_22_153905_add_subscription_repeat_on_column_to_transactions_table',1),(246,'2020_04_28_111436_add_shipping_address_to_contacts_table',1),(247,'2020_06_01_094654_add_max_sale_discount_column_to_users_table',1),(248,'2020_06_12_162245_modify_contacts_table',1),(249,'2020_06_22_103104_change_recur_interval_default_to_one',1),(250,'2020_07_09_174621_add_balance_field_to_contacts_table',1),(251,'2020_07_23_104933_change_status_column_to_varchar_in_transaction_table',1),(252,'2020_09_07_171059_change_completed_stock_transfer_status_to_final',1),(253,'2020_09_21_123224_modify_booking_status_column_in_bookings_table',1),(254,'2020_09_22_121639_create_discount_variations_table',1),(255,'2020_10_05_121550_modify_business_location_table_for_invoice_layout',1),(256,'2020_10_16_175726_set_status_as_received_for_opening_stock',1),(257,'2020_10_23_170823_add_for_group_tax_column_to_tax_rates_table',1),(258,'2020_11_04_130940_add_more_custom_fields_to_contacts_table',1),(259,'2020_11_10_152841_add_cash_register_permissions',1),(260,'2020_11_17_164041_modify_type_column_to_varchar_in_contacts_table',1),(261,'2020_12_18_181447_add_shipping_custom_fields_to_transactions_table',1),(262,'2020_12_22_164303_add_sub_status_column_to_transactions_table',1),(263,'2020_12_24_153050_add_custom_fields_to_transactions_table',1),(264,'2020_12_28_105403_add_whatsapp_text_column_to_notification_templates_table',1),(265,'2020_12_29_165925_add_model_document_type_to_media_table',1),(266,'2021_02_08_175632_add_contact_number_fields_to_users_table',1),(267,'2021_02_11_172217_add_indexing_for_multiple_columns',1),(268,'2021_02_23_122043_add_more_columns_to_customer_groups_table',1),(269,'2021_02_24_175551_add_print_invoice_permission_to_all_roles',1),(270,'2021_03_03_162021_add_purchase_order_columns_to_purchase_lines_and_transactions_table',1),(271,'2021_03_11_120229_add_sales_order_columns',1),(272,'2021_03_16_120705_add_business_id_to_activity_log_table',1),(273,'2021_03_16_153427_add_code_columns_to_business_table',1),(274,'2021_03_18_173308_add_account_details_column_to_accounts_table',1),(275,'2021_03_18_183119_add_prefer_payment_account_columns_to_transactions_table',1),(276,'2021_03_22_120810_add_more_types_of_service_custom_fields',1),(277,'2021_03_24_183132_add_shipping_export_custom_field_details_to_contacts_table',1),(278,'2021_03_25_170715_add_export_custom_fields_info_to_transactions_table',1),(279,'2021_04_15_063449_add_denominations_column_to_cash_registers_table',1),(280,'2019_07_15_114211_add_manufacturing_module_version_to_system_table',2),(281,'2019_07_15_114403_create_mfg_recipes_table',2),(282,'2019_07_18_180217_add_production_columns_to_transactions_table',2),(283,'2019_07_26_110753_add_manufacturing_settings_column_to_business_table',2),(284,'2019_07_26_170450_add_manufacturing_permissions',2),(285,'2019_08_08_110035_create_mfg_recipe_ingredients_table',2),(286,'2019_08_08_172837_add_recipe_add_edit_permissions',2),(287,'2019_08_12_114610_add_ingredient_waste_percent_columns',2),(288,'2019_11_05_115136_create_ingredient_groups_table',2),(289,'2020_02_22_120303_add_column_to_mfg_recipe_ingredients_table',2),(290,'2020_08_19_103831_add_production_cost_type_to_recipe_and_transaction_table',2),(291,'2020_09_29_184909_add_product_catalogue_version',3),(292,'2018_10_10_110400_add_module_version_to_system_table',4),(293,'2018_10_10_122845_add_woocommerce_api_settings_to_business_table',4),(294,'2018_10_10_162041_add_woocommerce_category_id_to_categories_table',4),(295,'2018_10_11_173839_create_woocommerce_sync_logs_table',4),(296,'2018_10_16_123522_add_woocommerce_tax_rate_id_column_to_tax_rates_table',4),(297,'2018_10_23_111555_add_woocommerce_attr_id_column_to_variation_templates_table',4),(298,'2018_12_03_163945_add_woocommerce_permissions',4),(299,'2019_02_18_154414_change_woocommerce_sync_logs_table',4),(300,'2019_04_19_174129_add_disable_woocommerce_sync_column_to_products_table',4),(301,'2019_06_08_132440_add_woocommerce_wh_oc_secret_column_to_business_table',4),(302,'2019_10_01_171828_add_woocommerce_media_id_columns',4),(303,'2018_10_01_151252_create_documents_table',5),(304,'2018_10_02_151803_create_document_shares_table',5),(305,'2018_10_09_134558_create_reminders_table',5),(306,'2018_11_16_170756_create_to_dos_table',5),(307,'2019_02_22_120329_essentials_messages',5),(308,'2019_02_22_161513_add_message_permissions',5),(309,'2019_03_29_164339_add_essentials_version_to_system_table',5),(310,'2019_05_17_153306_create_essentials_leave_types_table',5),(311,'2019_05_17_175921_create_essentials_leaves_table',5),(312,'2019_05_21_154517_add_essentials_settings_columns_to_business_table',5),(313,'2019_05_21_181653_create_table_essentials_attendance',5),(314,'2019_05_30_110049_create_essentials_payrolls_table',5),(315,'2019_06_04_105723_create_essentials_holidays_table',5),(316,'2019_06_28_134217_add_payroll_columns_to_transactions_table',5),(317,'2019_08_26_103520_add_approve_leave_permission',5),(318,'2019_08_27_103724_create_essentials_allowance_and_deduction_table',5),(319,'2019_08_27_105236_create_essentials_user_allowances_and_deductions',5),(320,'2019_09_20_115906_add_more_columns_to_essentials_to_dos_table',5),(321,'2019_09_23_120439_create_essentials_todo_comments_table',5),(322,'2019_12_05_170724_add_hrm_columns_to_users_table',5),(323,'2019_12_09_105809_add_allowance_and_deductions_permission',5),(324,'2020_03_28_152838_create_essentials_shift_table',5),(325,'2020_03_30_162029_create_user_shifts_table',5),(326,'2020_03_31_134558_add_shift_id_to_attendance_table',5),(327,'2019_03_07_155813_make_repair_statuses_table',6),(328,'2019_03_08_120634_add_repair_columns_to_transactions_table',6),(329,'2019_03_14_182704_add_repair_permissions',6),(330,'2019_03_29_110241_add_repair_version_column_to_system_table',6),(331,'2019_04_12_113901_add_repair_settings_column_to_business_table',6),(332,'2020_05_05_125008_create_device_models_table',6),(333,'2020_05_06_103135_add_repair_model_id_column_to_products_table',6),(334,'2020_07_11_120308_add_columns_to_repair_statuses_table',6),(335,'2020_07_31_130737_create_job_sheets_table',6),(336,'2020_08_07_124241_add_job_sheet_id_to_transactions_table',6),(337,'2020_08_22_104640_add_email_template_field_to_repair_status_table',6),(338,'2020_10_19_131934_add_job_sheet_custom_fields_to_repair_job_sheets_table',6),(339,'2019_11_12_163135_create_projects_table',7),(340,'2019_11_12_164431_create_project_members_table',7),(341,'2019_11_14_112230_create_project_tasks_table',7),(342,'2019_11_14_112258_create_project_task_members_table',7),(343,'2019_11_18_154617_create_project_task_comments_table',7),(344,'2019_11_19_134807_create_project_time_logs_table',7),(345,'2019_12_11_102549_add_more_fields_in_transactions_table',7),(346,'2019_12_11_102735_create_invoice_lines_table',7),(347,'2020_01_07_172852_add_project_permissions',7),(348,'2020_01_08_115422_add_project_module_version_to_system_table',7),(349,'2020_07_10_114514_set_location_id_on_existing_invoice',7),(350,'2020_08_18_123107_add_connector_module_version_to_system_table',8);

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `model_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_type_model_id_index` (`model_type`,`model_id`),
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` (`permission_id`, `model_type`, `model_id`) VALUES (80,'App\\User',1),(80,'App\\User',2),(80,'App\\User',3),(134,'App\\User',4),(134,'App\\User',5),(134,'App\\User',6),(133,'App\\User',7);

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` int unsigned NOT NULL,
  `model_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_type_model_id_index` (`model_type`,`model_id`),
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES (1,'App\\User',1),(3,'App\\User',2),(4,'App\\User',3),(3,'App\\User',4),(4,'App\\User',5),(4,'App\\User',6),(4,'App\\User',7);

--
-- Table structure for table `notification_templates`
--

CREATE TABLE `notification_templates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `template_for` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `sms_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `whatsapp_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cc` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bcc` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `auto_send` tinyint(1) NOT NULL DEFAULT '0',
  `auto_send_sms` tinyint(1) NOT NULL DEFAULT '0',
  `auto_send_wa_notif` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notification_templates`
--

INSERT INTO `notification_templates` (`id`, `business_id`, `template_for`, `email_body`, `sms_body`, `whatsapp_text`, `subject`, `cc`, `bcc`, `auto_send`, `auto_send_sms`, `auto_send_wa_notif`, `created_at`, `updated_at`) VALUES (1,1,'new_sale','<p>Dear {contact_name},</p>\n\n                    <p>Your invoice number is {invoice_number}<br />\n                    Total amount: {total_amount}<br />\n                    Paid amount: {received_amount}</p>\n\n                    <p>Thank you for shopping with us.</p>\n\n                    <p>{business_logo}</p>\n\n                    <p>&nbsp;</p>','Dear {contact_name}, Thank you for shopping with us. {business_name}',NULL,'Thank you from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(2,1,'payment_received','<p>Dear {contact_name},</p>\n\n                <p>We have received a payment of {received_amount}</p>\n\n                <p>{business_logo}</p>','Dear {contact_name}, We have received a payment of {received_amount}. {business_name}',NULL,'Payment Received, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(3,1,'payment_reminder','<p>Dear {contact_name},</p>\n\n                    <p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\n\n                    <p>{business_logo}</p>','Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}',NULL,'Payment Reminder, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(4,1,'new_booking','<p>Dear {contact_name},</p>\n\n                    <p>Your booking is confirmed</p>\n\n                    <p>Date: {start_time} to {end_time}</p>\n\n                    <p>Table: {table}</p>\n\n                    <p>Location: {location}</p>\n\n                    <p>{business_logo}</p>','Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}',NULL,'Booking Confirmed - {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(5,1,'new_order','<p>Dear {contact_name},</p>\n\n                    <p>We have a new order with reference number {order_ref_number}. Kindly process the products as soon as possible.</p>\n\n                    <p>{business_name}<br />\n                    {business_logo}</p>','Dear {contact_name}, We have a new order with reference number {order_ref_number}. Kindly process the products as soon as possible. {business_name}',NULL,'New Order, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(6,1,'payment_paid','<p>Dear {contact_name},</p>\n\n                    <p>We have paid amount {paid_amount} again invoice number {order_ref_number}.<br />\n                    Kindly note it down.</p>\n\n                    <p>{business_name}<br />\n                    {business_logo}</p>','We have paid amount {paid_amount} again invoice number {order_ref_number}.\n                    Kindly note it down. {business_name}',NULL,'Payment Paid, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(7,1,'items_received','<p>Dear {contact_name},</p>\n\n                    <p>We have received all items from invoice reference number {order_ref_number}. Thank you for processing it.</p>\n\n                    <p>{business_name}<br />\n                    {business_logo}</p>','We have received all items from invoice reference number {order_ref_number}. Thank you for processing it. {business_name}',NULL,'Items received, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(8,1,'items_pending','<p>Dear {contact_name},<br />\n                    This is to remind you that we have not yet received some items from invoice reference number {order_ref_number}. Please process it as soon as possible.</p>\n\n                    <p>{business_name}<br />\n                    {business_logo}</p>','This is to remind you that we have not yet received some items from invoice reference number {order_ref_number} . Please process it as soon as possible.{business_name}',NULL,'Items Pending, from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34'),(9,1,'new_quotation','<p>Dear {contact_name},</p>\n\n                    <p>Your quotation number is {invoice_number}<br />\n                    Total amount: {total_amount}</p>\n\n                    <p>Thank you for shopping with us.</p>\n\n                    <p>{business_logo}</p>\n\n                    <p>&nbsp;</p>','Dear {contact_name}, Thank you for shopping with us. {business_name}',NULL,'Thank you from {business_name}',NULL,NULL,0,0,0,'2021-07-03 05:00:34','2021-07-03 05:00:34');

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `notifiable_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `notifiable_id` bigint unsigned NOT NULL,
  `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `type`, `notifiable_type`, `notifiable_id`, `data`, `read_at`, `created_at`, `updated_at`) VALUES ('4634bdb4-e3eb-486c-81ab-8434ff93c75d','Modules\\Project\\Notifications\\NewTaskAssignedNotification','App\\User',2,'{\"project_task_id\":2,\"project_id\":\"4\"}',NULL,'2021-08-29 16:47:06','2021-08-29 16:47:06'),('60db0235-a653-4508-a289-507b8c0b6e61','Modules\\Project\\Notifications\\NewProjectAssignedNotification','App\\User',2,'{\"project_id\":4}',NULL,'2021-08-29 16:43:55','2021-08-29 16:43:55');

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint NOT NULL,
  `client_id` int unsigned NOT NULL,
  `scopes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_auth_codes`
--


--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `client_id` int unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_personal_access_clients_client_id_index` (`client_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES (1,2,'2021-07-04 17:35:03','2021-07-04 17:35:03');

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `location_count` int NOT NULL COMMENT 'No. of Business Locations, 0 = infinite option.',
  `user_count` int NOT NULL,
  `product_count` int NOT NULL,
  `bookings` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable bookings',
  `kitchen` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable kitchen',
  `order_screen` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable order_screen',
  `tables` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable tables',
  `invoice_count` int NOT NULL,
  `interval` enum('days','months','years') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `interval_count` int NOT NULL,
  `trial_days` int NOT NULL,
  `price` decimal(22,4) NOT NULL,
  `custom_permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_by` int NOT NULL,
  `sort_order` int NOT NULL DEFAULT '0',
  `is_active` tinyint(1) NOT NULL,
  `is_private` tinyint(1) NOT NULL DEFAULT '0',
  `is_one_time` tinyint(1) NOT NULL DEFAULT '0',
  `enable_custom_link` tinyint(1) NOT NULL DEFAULT '0',
  `custom_link` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_link_text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `packages`
--

INSERT INTO `packages` (`id`, `name`, `description`, `location_count`, `user_count`, `product_count`, `bookings`, `kitchen`, `order_screen`, `tables`, `invoice_count`, `interval`, `interval_count`, `trial_days`, `price`, `custom_permissions`, `created_by`, `sort_order`, `is_active`, `is_private`, `is_one_time`, `enable_custom_link`, `custom_link`, `custom_link_text`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,'Free Trail','Try The Application',0,0,0,0,0,0,0,50,'months',1,15,0.0000,'{\"connector_module\":\"1\",\"essentials_module\":\"1\",\"manufacturing_module\":\"1\",\"productcatalogue_module\":\"1\",\"project_module\":\"1\",\"repair_module\":\"1\",\"woocommerce_module\":\"1\"}',1,1,1,1,1,1,NULL,NULL,NULL,'2021-07-03 05:32:49','2022-03-20 18:01:18');

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES (1,'profit_loss_report.view','web','2021-07-03 04:48:41',NULL),(2,'direct_sell.access','web','2021-07-03 04:48:41',NULL),(3,'product.opening_stock','web','2021-07-03 04:50:19','2021-07-03 04:50:19'),(4,'crud_all_bookings','web','2021-07-03 04:50:49','2021-07-03 04:50:49'),(5,'crud_own_bookings','web','2021-07-03 04:50:49','2021-07-03 04:50:49'),(6,'access_default_selling_price','web','2021-07-03 04:51:42','2021-07-03 04:51:42'),(7,'purchase.payments','web','2021-07-03 04:51:57','2021-07-03 04:51:57'),(8,'sell.payments','web','2021-07-03 04:51:57','2021-07-03 04:51:57'),(9,'edit_product_price_from_sale_screen','web','2021-07-03 04:52:03','2021-07-03 04:52:03'),(10,'edit_product_discount_from_sale_screen','web','2021-07-03 04:52:03','2021-07-03 04:52:03'),(11,'roles.view','web','2021-07-03 04:52:09','2021-07-03 04:52:09'),(12,'roles.create','web','2021-07-03 04:52:09','2021-07-03 04:52:09'),(13,'roles.update','web','2021-07-03 04:52:10','2021-07-03 04:52:10'),(14,'roles.delete','web','2021-07-03 04:52:10','2021-07-03 04:52:10'),(15,'account.access','web','2021-07-03 04:52:26','2021-07-03 04:52:26'),(16,'discount.access','web','2021-07-03 04:52:32','2021-07-03 04:52:32'),(17,'view_purchase_price','web','2021-07-03 04:52:47','2021-07-03 04:52:47'),(18,'view_own_sell_only','web','2021-07-03 04:52:48','2021-07-03 04:52:48'),(19,'edit_product_discount_from_pos_screen','web','2021-07-03 04:53:05','2021-07-03 04:53:05'),(20,'edit_product_price_from_pos_screen','web','2021-07-03 04:53:05','2021-07-03 04:53:05'),(21,'access_shipping','web','2021-07-03 04:53:13','2021-07-03 04:53:13'),(22,'purchase.update_status','web','2021-07-03 04:53:18','2021-07-03 04:53:18'),(23,'list_drafts','web','2021-07-03 04:53:30','2021-07-03 04:53:30'),(24,'list_quotations','web','2021-07-03 04:53:30','2021-07-03 04:53:30'),(25,'view_cash_register','web','2021-07-03 04:54:37','2021-07-03 04:54:37'),(26,'close_cash_register','web','2021-07-03 04:54:37','2021-07-03 04:54:37'),(27,'print_invoice','web','2021-07-03 04:55:11','2021-07-03 04:55:11'),(28,'user.view','web','2021-07-03 04:55:27',NULL),(29,'user.create','web','2021-07-03 04:55:27',NULL),(30,'user.update','web','2021-07-03 04:55:27',NULL),(31,'user.delete','web','2021-07-03 04:55:27',NULL),(32,'supplier.view','web','2021-07-03 04:55:27',NULL),(33,'supplier.create','web','2021-07-03 04:55:27',NULL),(34,'supplier.update','web','2021-07-03 04:55:27',NULL),(35,'supplier.delete','web','2021-07-03 04:55:27',NULL),(36,'customer.view','web','2021-07-03 04:55:27',NULL),(37,'customer.create','web','2021-07-03 04:55:27',NULL),(38,'customer.update','web','2021-07-03 04:55:27',NULL),(39,'customer.delete','web','2021-07-03 04:55:27',NULL),(40,'product.view','web','2021-07-03 04:55:27',NULL),(41,'product.create','web','2021-07-03 04:55:27',NULL),(42,'product.update','web','2021-07-03 04:55:27',NULL),(43,'product.delete','web','2021-07-03 04:55:27',NULL),(44,'purchase.view','web','2021-07-03 04:55:27',NULL),(45,'purchase.create','web','2021-07-03 04:55:27',NULL),(46,'purchase.update','web','2021-07-03 04:55:27',NULL),(47,'purchase.delete','web','2021-07-03 04:55:27',NULL),(48,'sell.view','web','2021-07-03 04:55:27',NULL),(49,'sell.create','web','2021-07-03 04:55:27',NULL),(50,'sell.update','web','2021-07-03 04:55:27',NULL),(51,'sell.delete','web','2021-07-03 04:55:27',NULL),(52,'purchase_n_sell_report.view','web','2021-07-03 04:55:27',NULL),(53,'contacts_report.view','web','2021-07-03 04:55:27',NULL),(54,'stock_report.view','web','2021-07-03 04:55:27',NULL),(55,'tax_report.view','web','2021-07-03 04:55:27',NULL),(56,'trending_product_report.view','web','2021-07-03 04:55:27',NULL),(57,'register_report.view','web','2021-07-03 04:55:27',NULL),(58,'sales_representative.view','web','2021-07-03 04:55:27',NULL),(59,'expense_report.view','web','2021-07-03 04:55:27',NULL),(60,'business_settings.access','web','2021-07-03 04:55:27',NULL),(61,'barcode_settings.access','web','2021-07-03 04:55:27',NULL),(62,'invoice_settings.access','web','2021-07-03 04:55:27',NULL),(63,'brand.view','web','2021-07-03 04:55:27',NULL),(64,'brand.create','web','2021-07-03 04:55:27',NULL),(65,'brand.update','web','2021-07-03 04:55:27',NULL),(66,'brand.delete','web','2021-07-03 04:55:27',NULL),(67,'tax_rate.view','web','2021-07-03 04:55:27',NULL),(68,'tax_rate.create','web','2021-07-03 04:55:27',NULL),(69,'tax_rate.update','web','2021-07-03 04:55:27',NULL),(70,'tax_rate.delete','web','2021-07-03 04:55:27',NULL),(71,'unit.view','web','2021-07-03 04:55:27',NULL),(72,'unit.create','web','2021-07-03 04:55:27',NULL),(73,'unit.update','web','2021-07-03 04:55:27',NULL),(74,'unit.delete','web','2021-07-03 04:55:27',NULL),(75,'category.view','web','2021-07-03 04:55:27',NULL),(76,'category.create','web','2021-07-03 04:55:27',NULL),(77,'category.update','web','2021-07-03 04:55:27',NULL),(78,'category.delete','web','2021-07-03 04:55:27',NULL),(79,'expense.access','web','2021-07-03 04:55:27',NULL),(80,'access_all_locations','web','2021-07-03 04:55:27',NULL),(81,'dashboard.data','web','2021-07-03 04:55:27',NULL),(82,'location.1','web','2021-07-03 05:00:34','2021-07-03 05:00:34'),(83,'manufacturing.access_recipe','web','2021-07-03 05:55:09','2021-07-03 05:55:09'),(84,'manufacturing.access_production','web','2021-07-03 05:55:09','2021-07-03 05:55:09'),(85,'manufacturing.add_recipe','web','2021-07-03 05:55:11','2021-07-03 05:55:11'),(86,'manufacturing.edit_recipe','web','2021-07-03 05:55:11','2021-07-03 05:55:11'),(87,'woocommerce.syc_categories','web','2021-07-03 05:57:21','2021-07-03 05:57:21'),(88,'woocommerce.sync_products','web','2021-07-03 05:57:21','2021-07-03 05:57:21'),(89,'woocommerce.sync_orders','web','2021-07-03 05:57:21','2021-07-03 05:57:21'),(90,'woocommerce.map_tax_rates','web','2021-07-03 05:57:22','2021-07-03 05:57:22'),(91,'woocommerce.access_woocommerce_api_settings','web','2021-07-03 05:57:22','2021-07-03 05:57:22'),(92,'essentials.create_message','web','2021-07-03 06:09:00','2021-07-03 06:09:00'),(93,'essentials.view_message','web','2021-07-03 06:09:00','2021-07-03 06:09:00'),(94,'essentials.approve_leave','web','2021-07-03 06:09:09','2021-07-03 06:09:09'),(95,'essentials.assign_todos','web','2021-07-03 06:09:17','2021-07-03 06:09:17'),(96,'essentials.add_allowance_and_deduction','web','2021-07-03 06:09:19','2021-07-03 06:09:19'),(97,'repair.create','web','2021-07-03 06:23:24','2021-07-03 06:23:24'),(98,'repair.update','web','2021-07-03 06:23:25','2021-07-03 06:23:25'),(99,'repair.view','web','2021-07-03 06:23:25','2021-07-03 06:23:25'),(100,'repair.delete','web','2021-07-03 06:23:25','2021-07-03 06:23:25'),(101,'repair_status.update','web','2021-07-03 06:23:25','2021-07-03 06:23:25'),(102,'repair_status.access','web','2021-07-03 06:23:25','2021-07-03 06:23:25'),(103,'project.create_project','web','2021-07-04 16:17:23','2021-07-04 16:17:23'),(104,'project.edit_project','web','2021-07-04 16:17:23','2021-07-04 16:17:23'),(105,'project.delete_project','web','2021-07-04 16:17:23','2021-07-04 16:17:23'),(106,'supplier.view_own','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(107,'customer.view_own','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(108,'view_own_purchase','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(109,'purchase_order.view_own','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(110,'purchase_order.view_all','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(111,'purchase_order.create','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(112,'purchase_order.update','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(113,'purchase_order.delete','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(114,'direct_sell.view','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(115,'direct_sell.update','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(116,'direct_sell.delete','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(117,'view_commission_agent_sell','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(118,'access_sell_return','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(119,'edit_invoice_number','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(120,'so.view_own','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(121,'so.view_all','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(122,'so.create','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(123,'so.update','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(124,'so.delete','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(125,'access_own_shipping','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(126,'access_commission_agent_shipping','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(127,'view_product_stock_value','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(128,'expense.add','web','2022-03-10 01:02:20','2022-03-10 01:02:20'),(129,'expense.edit','web','2022-03-10 01:02:21','2022-03-10 01:02:21'),(130,'expense.delete','web','2022-03-10 01:02:21','2022-03-10 01:02:21'),(131,'all_expense.access','web','2022-03-10 01:02:21','2022-03-10 01:02:21'),(132,'view_own_expense','web','2022-03-10 01:02:21','2022-03-10 01:02:21'),(133,'location.2','web','2022-03-20 18:02:12','2022-03-20 18:02:12'),(134,'location.3','web','2022-03-20 18:03:00','2022-03-20 18:03:00'),(135,'location.4','web','2022-03-20 18:06:00','2022-03-20 18:06:00');

--
-- Table structure for table `pjt_invoice_lines`
--

CREATE TABLE `pjt_invoice_lines` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int unsigned NOT NULL,
  `task` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `rate` decimal(22,4) NOT NULL,
  `tax_rate_id` int DEFAULT NULL,
  `quantity` decimal(22,4) NOT NULL,
  `total` decimal(22,4) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_invoice_lines_transaction_id_foreign` (`transaction_id`),
  KEY `pjt_invoice_lines_tax_rate_id_index` (`tax_rate_id`),
  CONSTRAINT `pjt_invoice_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_invoice_lines`
--


--
-- Table structure for table `pjt_project_members`
--

CREATE TABLE `pjt_project_members` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int unsigned NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_project_members_project_id_foreign` (`project_id`),
  KEY `pjt_project_members_user_id_index` (`user_id`),
  CONSTRAINT `pjt_project_members_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `pjt_projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_project_members`
--

INSERT INTO `pjt_project_members` (`id`, `project_id`, `user_id`) VALUES (1,1,1),(2,2,1),(3,3,1),(4,4,1),(5,4,2);

--
-- Table structure for table `pjt_project_task_comments`
--

CREATE TABLE `pjt_project_task_comments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `project_task_id` int unsigned NOT NULL,
  `comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `commented_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_project_task_comments_project_task_id_foreign` (`project_task_id`),
  CONSTRAINT `pjt_project_task_comments_project_task_id_foreign` FOREIGN KEY (`project_task_id`) REFERENCES `pjt_project_tasks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_project_task_comments`
--


--
-- Table structure for table `pjt_project_task_members`
--

CREATE TABLE `pjt_project_task_members` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `project_task_id` int unsigned NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_project_task_members_project_task_id_foreign` (`project_task_id`),
  KEY `pjt_project_task_members_user_id_index` (`user_id`),
  CONSTRAINT `pjt_project_task_members_project_task_id_foreign` FOREIGN KEY (`project_task_id`) REFERENCES `pjt_project_tasks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_project_task_members`
--

INSERT INTO `pjt_project_task_members` (`id`, `project_task_id`, `user_id`) VALUES (1,1,1),(2,2,1),(3,2,2);

--
-- Table structure for table `pjt_project_tasks`
--

CREATE TABLE `pjt_project_tasks` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `project_id` int unsigned NOT NULL,
  `task_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `priority` enum('low','medium','high','urgent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'low',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int NOT NULL,
  `status` enum('completed','not_started','in_progress','on_hold','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'not_started',
  `custom_field_1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field_2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field_3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field_4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_project_tasks_project_id_foreign` (`project_id`),
  KEY `pjt_project_tasks_business_id_index` (`business_id`),
  KEY `pjt_project_tasks_created_by_index` (`created_by`),
  CONSTRAINT `pjt_project_tasks_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `pjt_projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_project_tasks`
--

INSERT INTO `pjt_project_tasks` (`id`, `business_id`, `project_id`, `task_id`, `subject`, `start_date`, `due_date`, `priority`, `description`, `created_by`, `status`, `custom_field_1`, `custom_field_2`, `custom_field_3`, `custom_field_4`, `created_at`, `updated_at`) VALUES (1,1,1,'#1','wef',NULL,NULL,'low','<p>wD</p>',1,'not_started',NULL,NULL,NULL,NULL,'2021-07-06 20:43:07','2021-07-06 20:43:07'),(2,1,4,'#1','ux / ui','2021-08-30 00:00:00','2021-09-04 00:00:00','medium','<p style=\"text-align: right;\">إنشاء محتوى للصفحات الخاصة بالمشروع وكتابة المحتوى الذي يجب تواجده.</p>\r\n<p style=\"text-align: right;\">انشاء سيناريو للتطبيق&nbsp;</p>\r\n<p style=\"text-align: right;\">تحديد احتياجات ومتطلبات التطبيق</p>',1,'in_progress',NULL,NULL,NULL,NULL,'2021-08-29 16:47:06','2021-08-29 16:47:06');

--
-- Table structure for table `pjt_project_time_logs`
--

CREATE TABLE `pjt_project_time_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int unsigned NOT NULL,
  `project_task_id` int unsigned DEFAULT NULL,
  `user_id` int NOT NULL,
  `start_datetime` datetime NOT NULL,
  `end_datetime` datetime NOT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_project_time_logs_project_id_foreign` (`project_id`),
  KEY `pjt_project_time_logs_project_task_id_foreign` (`project_task_id`),
  KEY `pjt_project_time_logs_user_id_index` (`user_id`),
  KEY `pjt_project_time_logs_created_by_index` (`created_by`),
  CONSTRAINT `pjt_project_time_logs_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `pjt_projects` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pjt_project_time_logs_project_task_id_foreign` FOREIGN KEY (`project_task_id`) REFERENCES `pjt_project_tasks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_project_time_logs`
--


--
-- Table structure for table `pjt_projects`
--

CREATE TABLE `pjt_projects` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_id` int DEFAULT NULL,
  `status` enum('not_started','in_progress','on_hold','cancelled','completed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `lead_id` int NOT NULL,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int NOT NULL,
  `settings` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pjt_projects_business_id_index` (`business_id`),
  KEY `pjt_projects_contact_id_index` (`contact_id`),
  KEY `pjt_projects_lead_id_index` (`lead_id`),
  KEY `pjt_projects_created_by_index` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pjt_projects`
--

INSERT INTO `pjt_projects` (`id`, `business_id`, `name`, `contact_id`, `status`, `lead_id`, `start_date`, `end_date`, `description`, `created_by`, `settings`, `created_at`, `updated_at`) VALUES (1,1,'one',1,'in_progress',1,NULL,'2021-07-21 00:00:00',NULL,1,'{\"enable_timelog\":1,\"enable_invoice\":1,\"enable_notes_documents\":1,\"members_crud_task\":0,\"members_crud_note\":0,\"members_crud_timelog\":0,\"task_view\":\"list_view\",\"task_id_prefix\":\"#\"}','2021-07-04 16:18:44','2021-07-04 16:18:44'),(2,1,'New app',1,'not_started',1,'2021-07-06 00:00:00','2021-07-31 00:00:00','<p>برمجة تطبيق تجارة الكترونية</p>',1,'{\"enable_timelog\":1,\"enable_invoice\":1,\"enable_notes_documents\":1,\"members_crud_task\":0,\"members_crud_note\":0,\"members_crud_timelog\":0,\"task_view\":\"list_view\",\"task_id_prefix\":\"#\"}','2021-07-07 13:05:06','2021-07-07 13:05:06'),(3,1,'اعداد عروض فنيه لمنتجاتنا',1,'in_progress',1,NULL,NULL,'<table style=\"border-collapse: collapse; width: 100%; height: 88px;\" border=\"1\">\r\n<tbody>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"width: 33.3333%; height: 22px;\">المصمم</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">كاتب المحتوى</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">&nbsp;</td>\r\n</tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"width: 33.3333%; height: 22px;\">عمر</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">يوسف</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">عرض فني للـ POS</td>\r\n</tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"width: 33.3333%; height: 22px;\">عمر&nbsp;</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">سامر</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">عرض فني للموقع + التطبيق E-commerce</td>\r\n</tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"width: 33.3333%; height: 22px;\">عمر</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">يوسف</td>\r\n<td style=\"width: 33.3333%; height: 22px;\">الخدمات التسويقية</td>\r\n</tr>\r\n</tbody>\r\n</table>',1,'{\"enable_timelog\":1,\"enable_invoice\":1,\"enable_notes_documents\":1,\"members_crud_task\":0,\"members_crud_note\":0,\"members_crud_timelog\":0,\"task_view\":\"list_view\",\"task_id_prefix\":\"#\"}','2021-07-07 14:43:53','2021-07-07 14:43:53'),(4,1,'تطبيق للسائق',NULL,'not_started',2,'2021-08-30 00:00:00','2021-08-31 00:00:00','<p style=\"text-align: right;\">عمل تطبيق للسائق يدير من خلاله الطلبات الخاصة به بالاضافة امكانية استقبال طلبات من عملاء آخرين.</p>',1,'{\"task_view\":\"list_view\",\"enable_timelog\":1,\"enable_notes_documents\":1,\"enable_invoice\":1,\"members_crud_task\":1,\"members_crud_note\":1,\"members_crud_timelog\":1,\"task_id_prefix\":\"#\"}','2021-08-29 16:43:55','2021-08-29 16:45:25');

--
-- Table structure for table `printers`
--

CREATE TABLE `printers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection_type` enum('network','windows','linux') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `capability_profile` enum('default','simple','SP2000','TEP-200M','P822D') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',
  `char_per_line` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip_address` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `port` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `path` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `printers_business_id_foreign` (`business_id`),
  CONSTRAINT `printers_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `printers`
--

INSERT INTO `printers` (`id`, `business_id`, `name`, `connection_type`, `capability_profile`, `char_per_line`, `ip_address`, `port`, `path`, `created_by`, `created_at`, `updated_at`) VALUES (1,1,'Test','network','default','42','4560','9100','',1,'2021-07-07 19:37:20','2021-07-07 19:46:17');

--
-- Table structure for table `product_locations`
--

CREATE TABLE `product_locations` (
  `product_id` int NOT NULL,
  `location_id` int NOT NULL,
  KEY `product_locations_product_id_index` (`product_id`),
  KEY `product_locations_location_id_index` (`location_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_locations`
--

INSERT INTO `product_locations` (`product_id`, `location_id`) VALUES (1,1),(2,1),(3,1),(3,2),(3,3),(3,4),(4,2),(5,2),(11,2),(12,2),(13,2),(14,2),(15,2),(16,2),(17,2),(18,2),(19,1),(19,2),(19,3),(19,4),(20,2),(21,3),(22,2),(22,1),(22,3),(22,4),(23,2),(23,3),(24,2),(24,3),(25,2),(25,3),(27,2),(28,2),(29,2);

--
-- Table structure for table `product_racks`
--

CREATE TABLE `product_racks` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `location_id` int unsigned NOT NULL,
  `product_id` int unsigned NOT NULL,
  `rack` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `row` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `position` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `product_racks_business_id_index` (`business_id`),
  KEY `product_racks_location_id_index` (`location_id`),
  KEY `product_racks_product_id_index` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_racks`
--


--
-- Table structure for table `product_variations`
--

CREATE TABLE `product_variations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `variation_template_id` int DEFAULT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` int unsigned NOT NULL,
  `is_dummy` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `product_variations_name_index` (`name`),
  KEY `product_variations_product_id_index` (`product_id`),
  CONSTRAINT `product_variations_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_variations`
--

INSERT INTO `product_variations` (`id`, `variation_template_id`, `name`, `product_id`, `is_dummy`, `created_at`, `updated_at`) VALUES (4,4,'الازرق',3,0,'2022-03-20 17:57:28','2022-03-20 17:57:28'),(5,3,'الاسود',3,0,'2022-03-20 17:57:28','2022-03-20 17:57:28'),(13,1,'بلح',3,0,'2022-05-19 16:56:46','2022-07-25 16:50:30'),(14,3,'الاسود',11,0,'2022-05-20 11:03:50','2022-05-20 11:03:50'),(46,NULL,'DUMMY',30,1,'2022-08-05 20:36:00','2022-08-05 20:36:00');

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int unsigned NOT NULL,
  `type` enum('single','variable','modifier','combo') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit_id` int unsigned DEFAULT NULL,
  `sub_unit_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `brand_id` int unsigned DEFAULT NULL,
  `category_id` int unsigned DEFAULT NULL,
  `sub_category_id` int unsigned DEFAULT NULL,
  `tax` int unsigned DEFAULT NULL,
  `tax_type` enum('inclusive','exclusive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `enable_stock` tinyint(1) NOT NULL DEFAULT '0',
  `alert_quantity` decimal(22,4) DEFAULT NULL,
  `sku` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode_type` enum('C39','C128','EAN13','EAN8','UPCA','UPCE') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'C128',
  `expiry_period` decimal(4,2) DEFAULT NULL,
  `expiry_period_type` enum('days','months') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_sr_no` tinyint(1) NOT NULL DEFAULT '0',
  `weight` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field3` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field4` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `woocommerce_media_id` int DEFAULT NULL,
  `product_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int unsigned NOT NULL,
  `woocommerce_product_id` int DEFAULT NULL,
  `woocommerce_disable_sync` tinyint(1) NOT NULL DEFAULT '0',
  `warranty_id` int DEFAULT NULL,
  `is_inactive` tinyint(1) NOT NULL DEFAULT '0',
  `repair_model_id` int unsigned DEFAULT NULL,
  `not_for_selling` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `products_brand_id_foreign` (`brand_id`),
  KEY `products_category_id_foreign` (`category_id`),
  KEY `products_sub_category_id_foreign` (`sub_category_id`),
  KEY `products_tax_foreign` (`tax`),
  KEY `products_name_index` (`name`),
  KEY `products_business_id_index` (`business_id`),
  KEY `products_unit_id_index` (`unit_id`),
  KEY `products_created_by_index` (`created_by`),
  KEY `products_warranty_id_index` (`warranty_id`),
  KEY `products_type_index` (`type`),
  KEY `products_tax_type_index` (`tax_type`),
  KEY `products_barcode_type_index` (`barcode_type`),
  KEY `products_repair_model_id_foreign` (`repair_model_id`),
  CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE,
  CONSTRAINT `products_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `products_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `products_repair_model_id_foreign` FOREIGN KEY (`repair_model_id`) REFERENCES `repair_device_models` (`id`),
  CONSTRAINT `products_sub_category_id_foreign` FOREIGN KEY (`sub_category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `products_tax_foreign` FOREIGN KEY (`tax`) REFERENCES `tax_rates` (`id`),
  CONSTRAINT `products_unit_id_foreign` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `business_id`, `type`, `unit_id`, `sub_unit_ids`, `brand_id`, `category_id`, `sub_category_id`, `tax`, `tax_type`, `enable_stock`, `alert_quantity`, `sku`, `barcode_type`, `expiry_period`, `expiry_period_type`, `enable_sr_no`, `weight`, `product_custom_field1`, `product_custom_field2`, `product_custom_field3`, `product_custom_field4`, `image`, `woocommerce_media_id`, `product_description`, `created_by`, `woocommerce_product_id`, `woocommerce_disable_sync`, `warranty_id`, `is_inactive`, `repair_model_id`, `not_for_selling`, `created_at`, `updated_at`) VALUES (3,'c21y',1,'variable',2,NULL,NULL,NULL,NULL,NULL,'exclusive',0,0.0000,'899659100996304710','C128',NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,'1650126382_111.webp',NULL,NULL,3,NULL,0,NULL,0,NULL,0,'2022-03-20 17:57:28','2022-08-02 13:31:51'),(11,'note 10 pro',1,'variable',2,'[\"2\"]',NULL,1,NULL,NULL,'exclusive',0,0.0000,'100100','C128',NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,0,NULL,0,NULL,0,'2022-05-20 11:03:50','2022-08-02 13:31:25'),(30,'sdsdfsdsd',1,'single',2,NULL,NULL,1,5,NULL,'exclusive',1,NULL,'dfsdfdf','C128',12.00,'months',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,0,NULL,0,NULL,0,'2022-08-05 20:36:00','2022-08-05 20:36:00');

--
-- Table structure for table `purchase_lines`
--

CREATE TABLE `purchase_lines` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int unsigned NOT NULL,
  `product_id` int unsigned NOT NULL,
  `variation_id` int unsigned NOT NULL,
  `quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `pp_without_discount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Purchase price before inline discounts',
  `discount_percent` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT 'Inline discount percentage',
  `purchase_price` decimal(22,4) NOT NULL,
  `purchase_price_inc_tax` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  `tax_id` int unsigned DEFAULT NULL,
  `purchase_order_line_id` int DEFAULT NULL,
  `quantity_sold` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Quanity sold from this purchase line',
  `quantity_adjusted` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Quanity adjusted in stock adjustment from this purchase line',
  `quantity_returned` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `po_quantity_purchased` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `mfg_quantity_used` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `mfg_date` date DEFAULT NULL,
  `exp_date` date DEFAULT NULL,
  `lot_number` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_unit_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `purchase_lines_transaction_id_foreign` (`transaction_id`),
  KEY `purchase_lines_product_id_foreign` (`product_id`),
  KEY `purchase_lines_variation_id_foreign` (`variation_id`),
  KEY `purchase_lines_tax_id_foreign` (`tax_id`),
  KEY `purchase_lines_sub_unit_id_index` (`sub_unit_id`),
  KEY `purchase_lines_lot_number_index` (`lot_number`),
  CONSTRAINT `purchase_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `purchase_lines_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  CONSTRAINT `purchase_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `purchase_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_lines`
--

INSERT INTO `purchase_lines` (`id`, `transaction_id`, `product_id`, `variation_id`, `quantity`, `pp_without_discount`, `discount_percent`, `purchase_price`, `purchase_price_inc_tax`, `item_tax`, `tax_id`, `purchase_order_line_id`, `quantity_sold`, `quantity_adjusted`, `quantity_returned`, `po_quantity_purchased`, `mfg_quantity_used`, `mfg_date`, `exp_date`, `lot_number`, `sub_unit_id`, `created_at`, `updated_at`) VALUES (1,2,3,4,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 17:58:14','2022-03-20 18:22:14'),(2,2,3,5,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 17:58:14','2022-03-20 18:22:14'),(3,6,3,4,20.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,10.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-08-02 13:07:45'),(4,6,3,5,20.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-08-02 13:07:45'),(5,7,3,4,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-08-02 13:07:36'),(6,7,3,5,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-08-02 13:07:26'),(7,8,3,4,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-03-20 18:22:14'),(8,8,3,5,10.0000,42.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:21:24','2022-03-20 18:22:14'),(9,10,3,4,10.0000,0.0000,0.00,42.0000,42.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-03-20 18:27:06','2022-03-20 18:27:06'),(16,14,11,19,1.0000,70.0000,0.00,70.0000,70.0000,0.0000,NULL,NULL,1.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-05-20 12:14:20','2022-08-02 13:17:29'),(21,16,11,19,1.0000,0.0000,0.00,70.0000,70.0000,0.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,'2022-05-20 12:15:41','2022-05-20 12:15:41');

--
-- Table structure for table `reference_counts`
--

CREATE TABLE `reference_counts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `ref_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `ref_count` int NOT NULL,
  `business_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reference_counts_business_id_index` (`business_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `reference_counts`
--

INSERT INTO `reference_counts` (`id`, `ref_type`, `ref_count`, `business_id`, `created_at`, `updated_at`) VALUES (1,'contacts',12,1,'2021-07-03 05:00:34','2022-07-29 13:00:34'),(2,'business_location',4,1,'2021-07-03 05:00:34','2022-03-20 18:05:59'),(3,'essentials_todos',1,1,'2021-07-03 06:13:01','2021-07-03 06:13:01'),(4,'sell_payment',22,1,'2021-07-04 17:15:52','2022-08-05 20:36:57'),(5,'username',6,1,'2021-07-07 14:50:10','2022-05-20 10:28:07'),(6,'purchase',6,1,'2021-07-11 19:50:00','2022-08-02 12:53:36'),(7,'draft',6,1,'2021-09-28 22:45:12','2022-07-29 17:13:32'),(8,'purchase_payment',20,1,'2021-11-15 08:57:46','2022-08-02 12:56:47'),(9,'stock_transfer',5,1,'2022-03-20 18:27:05','2022-07-29 17:37:23'),(10,'opening_balance',2,1,'2022-05-20 10:36:39','2022-07-29 13:00:34');

--
-- Table structure for table `repair_device_models`
--

CREATE TABLE `repair_device_models` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `repair_checklist` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `brand_id` int unsigned DEFAULT NULL,
  `device_id` int unsigned DEFAULT NULL,
  `created_by` int unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `repair_device_models_business_id_foreign` (`business_id`),
  KEY `repair_device_models_brand_id_foreign` (`brand_id`),
  KEY `repair_device_models_device_id_foreign` (`device_id`),
  KEY `repair_device_models_created_by_foreign` (`created_by`),
  CONSTRAINT `repair_device_models_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`),
  CONSTRAINT `repair_device_models_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `repair_device_models_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`),
  CONSTRAINT `repair_device_models_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `categories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `repair_device_models`
--


--
-- Table structure for table `repair_statuses`
--

CREATE TABLE `repair_statuses` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `color` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sort_order` int DEFAULT NULL,
  `business_id` int NOT NULL,
  `is_completed_status` tinyint(1) NOT NULL DEFAULT '0',
  `sms_template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `email_subject` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `email_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `repair_statuses`
--


--
-- Table structure for table `res_product_modifier_sets`
--

CREATE TABLE `res_product_modifier_sets` (
  `modifier_set_id` int unsigned NOT NULL,
  `product_id` int unsigned NOT NULL COMMENT 'Table use to store the modifier sets applicable for a product',
  KEY `res_product_modifier_sets_modifier_set_id_foreign` (`modifier_set_id`),
  CONSTRAINT `res_product_modifier_sets_modifier_set_id_foreign` FOREIGN KEY (`modifier_set_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `res_product_modifier_sets`
--


--
-- Table structure for table `res_tables`
--

CREATE TABLE `res_tables` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `location_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int unsigned NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `res_tables_business_id_foreign` (`business_id`),
  CONSTRAINT `res_tables_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `res_tables`
--


--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES (25,2),(26,2),(48,2),(49,2),(50,2),(51,2),(1,3),(2,3),(3,3),(7,3),(8,3),(9,3),(10,3),(16,3),(17,3),(18,3),(19,3),(20,3),(22,3),(23,3),(24,3),(27,3),(36,3),(37,3),(38,3),(39,3),(40,3),(41,3),(42,3),(43,3),(44,3),(45,3),(46,3),(47,3),(48,3),(49,3),(50,3),(51,3),(52,3),(53,3),(54,3),(55,3),(56,3),(57,3),(58,3),(59,3),(81,3),(107,3),(108,3),(109,3),(110,3),(111,3),(112,3),(113,3),(114,3),(115,3),(116,3),(117,3),(118,3),(119,3),(120,3),(121,3),(122,3),(123,3),(124,3),(127,3),(128,3),(129,3),(130,3),(131,3),(132,3),(1,4),(2,4),(3,4),(6,4),(7,4),(8,4),(9,4),(10,4),(11,4),(12,4),(13,4),(14,4),(15,4),(16,4),(17,4),(18,4),(19,4),(20,4),(21,4),(22,4),(23,4),(24,4),(25,4),(26,4),(27,4),(28,4),(29,4),(30,4),(31,4),(32,4),(33,4),(34,4),(35,4),(36,4),(37,4),(38,4),(39,4),(40,4),(41,4),(42,4),(43,4),(44,4),(45,4),(46,4),(47,4),(48,4),(49,4),(50,4),(51,4),(52,4),(53,4),(54,4),(55,4),(56,4),(57,4),(58,4),(59,4),(63,4),(64,4),(65,4),(66,4),(67,4),(68,4),(69,4),(70,4),(71,4),(72,4),(73,4),(74,4),(75,4),(76,4),(77,4),(78,4),(81,4),(106,4),(107,4),(108,4),(109,4),(110,4),(111,4),(112,4),(113,4),(114,4),(115,4),(116,4),(117,4),(118,4),(119,4),(120,4),(121,4),(122,4),(123,4),(124,4),(125,4),(126,4),(127,4),(128,4),(129,4),(130,4),(131,4),(132,4);

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

CREATE TABLE `roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int unsigned NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `is_service_staff` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `roles_business_id_foreign` (`business_id`),
  CONSTRAINT `roles_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` (`id`, `name`, `guard_name`, `business_id`, `is_default`, `is_service_staff`, `created_at`, `updated_at`) VALUES (1,'Admin#1','web',1,1,0,'2021-07-03 05:00:32','2021-07-03 05:00:32'),(2,'Cashier#1','web',1,0,0,'2021-07-03 05:00:33','2021-07-03 05:00:33'),(3,'موظف#1','web',1,0,0,'2021-07-07 14:46:13','2021-07-07 14:46:13'),(4,'مسئول#1','web',1,0,0,'2022-03-10 01:02:20','2022-03-10 01:02:20');

--
-- Table structure for table `sell_line_warranties`
--

CREATE TABLE `sell_line_warranties` (
  `sell_line_id` int NOT NULL,
  `warranty_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sell_line_warranties`
--


--
-- Table structure for table `selling_price_groups`
--

CREATE TABLE `selling_price_groups` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `business_id` int unsigned NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `selling_price_groups_business_id_foreign` (`business_id`),
  CONSTRAINT `selling_price_groups_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `selling_price_groups`
--


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int unsigned DEFAULT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `payload` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  UNIQUE KEY `sessions_id_unique` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--


--
-- Table structure for table `stock_adjustment_lines`
--

CREATE TABLE `stock_adjustment_lines` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int unsigned NOT NULL,
  `product_id` int unsigned NOT NULL,
  `variation_id` int unsigned NOT NULL,
  `quantity` decimal(22,4) NOT NULL,
  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Last purchase unit price',
  `removed_purchase_line` int DEFAULT NULL,
  `lot_no_line_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `stock_adjustment_lines_product_id_foreign` (`product_id`),
  KEY `stock_adjustment_lines_variation_id_foreign` (`variation_id`),
  KEY `stock_adjustment_lines_transaction_id_index` (`transaction_id`),
  KEY `stock_adjustment_lines_lot_no_line_id_index` (`lot_no_line_id`),
  CONSTRAINT `stock_adjustment_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `stock_adjustment_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `stock_adjustment_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_adjustment_lines`
--


--
-- Table structure for table `stock_adjustments_temp`
--

CREATE TABLE `stock_adjustments_temp` (
  `id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `stock_adjustments_temp`
--


--
-- Table structure for table `subscriptions`
--

CREATE TABLE `subscriptions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `package_id` int unsigned NOT NULL,
  `start_date` date DEFAULT NULL,
  `trial_end_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `package_price` decimal(22,4) NOT NULL,
  `package_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_id` int unsigned NOT NULL,
  `paid_via` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_transaction_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('approved','waiting','declined') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'waiting',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subscriptions_business_id_foreign` (`business_id`),
  KEY `subscriptions_package_id_index` (`package_id`),
  KEY `subscriptions_created_id_index` (`created_id`),
  CONSTRAINT `subscriptions_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `subscriptions`
--

INSERT INTO `subscriptions` (`id`, `business_id`, `package_id`, `start_date`, `trial_end_date`, `end_date`, `package_price`, `package_details`, `created_id`, `paid_via`, `payment_transaction_id`, `status`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,1,'2021-07-03','2024-01-01','2024-01-01',0.0000,'{\"location_count\":\"0\",\"user_count\":\"0\",\"product_count\":\"0\",\"invoice_count\":\"50\",\"name\":\"Free Trail\",\"connector_module\":\"1\",\"essentials_module\":\"1\",\"manufacturing_module\":\"1\",\"productcatalogue_module\":\"1\",\"project_module\":\"1\",\"repair_module\":\"1\",\"woocommerce_module\":\"1\"}',1,NULL,'FREE','approved',NULL,'2021-07-03 06:26:12','2023-11-12 13:28:20'),(2,1,1,'2023-08-02','2023-09-17','2023-09-02',0.0000,'{\"location_count\":0,\"user_count\":0,\"product_count\":0,\"invoice_count\":50,\"name\":\"Free Trail\",\"connector_module\":\"1\",\"essentials_module\":\"1\",\"manufacturing_module\":\"1\",\"productcatalogue_module\":\"1\",\"project_module\":\"1\",\"repair_module\":\"1\",\"woocommerce_module\":\"1\"}',1,'offline',NULL,'approved',NULL,'2023-11-12 13:27:19','2023-11-12 13:27:19');

--
-- Table structure for table `superadmin_communicator_logs`
--

CREATE TABLE `superadmin_communicator_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `superadmin_communicator_logs`
--


--
-- Table structure for table `superadmin_frontend_pages`
--

CREATE TABLE `superadmin_frontend_pages` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_shown` tinyint(1) NOT NULL,
  `menu_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `superadmin_frontend_pages`
--


--
-- Table structure for table `tax_rates`
--

CREATE TABLE `tax_rates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(22,4) NOT NULL,
  `is_tax_group` tinyint(1) NOT NULL DEFAULT '0',
  `for_tax_group` tinyint(1) NOT NULL DEFAULT '0',
  `created_by` int unsigned NOT NULL,
  `woocommerce_tax_rate_id` int DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tax_rates_business_id_foreign` (`business_id`),
  KEY `tax_rates_created_by_foreign` (`created_by`),
  CONSTRAINT `tax_rates_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `tax_rates_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tax_rates`
--


--
-- Table structure for table `transaction_sell_lines`
--

CREATE TABLE `transaction_sell_lines` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int unsigned NOT NULL,
  `product_id` int unsigned NOT NULL,
  `variation_id` int unsigned NOT NULL,
  `quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `mfg_waste_percent` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `quantity_returned` decimal(20,4) NOT NULL DEFAULT '0.0000',
  `unit_price_before_discount` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Sell price excluding tax',
  `line_discount_type` enum('fixed','percentage') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `line_discount_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `unit_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  `tax_id` int unsigned DEFAULT NULL,
  `discount_id` int DEFAULT NULL,
  `lot_no_line_id` int DEFAULT NULL,
  `sell_line_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `woocommerce_line_items_id` int DEFAULT NULL,
  `so_line_id` int DEFAULT NULL,
  `so_quantity_invoiced` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `res_service_staff_id` int DEFAULT NULL,
  `res_line_order_status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_sell_line_id` int DEFAULT NULL,
  `children_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Type of children for the parent, like modifier or combo',
  `sub_unit_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `transaction_sell_lines_transaction_id_foreign` (`transaction_id`),
  KEY `transaction_sell_lines_product_id_foreign` (`product_id`),
  KEY `transaction_sell_lines_variation_id_foreign` (`variation_id`),
  KEY `transaction_sell_lines_tax_id_foreign` (`tax_id`),
  KEY `transaction_sell_lines_children_type_index` (`children_type`),
  KEY `transaction_sell_lines_parent_sell_line_id_index` (`parent_sell_line_id`),
  KEY `transaction_sell_lines_line_discount_type_index` (`line_discount_type`),
  KEY `transaction_sell_lines_discount_id_index` (`discount_id`),
  KEY `transaction_sell_lines_lot_no_line_id_index` (`lot_no_line_id`),
  KEY `transaction_sell_lines_sub_unit_id_index` (`sub_unit_id`),
  CONSTRAINT `transaction_sell_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transaction_sell_lines_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transaction_sell_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transaction_sell_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_sell_lines`
--

INSERT INTO `transaction_sell_lines` (`id`, `transaction_id`, `product_id`, `variation_id`, `quantity`, `mfg_waste_percent`, `quantity_returned`, `unit_price_before_discount`, `unit_price`, `line_discount_type`, `line_discount_amount`, `unit_price_inc_tax`, `item_tax`, `tax_id`, `discount_id`, `lot_no_line_id`, `sell_line_note`, `woocommerce_line_items_id`, `so_line_id`, `so_quantity_invoiced`, `res_service_staff_id`, `res_line_order_status`, `parent_sell_line_id`, `children_type`, `sub_unit_id`, `created_at`, `updated_at`) VALUES (7,9,3,4,10.0000,0.0000,0.0000,42.0000,42.0000,NULL,0.0000,42.0000,0.0000,NULL,NULL,NULL,'',NULL,NULL,0.0000,NULL,NULL,NULL,'',NULL,'2022-03-20 18:27:06','2022-03-20 18:27:06'),(10,15,11,19,1.0000,0.0000,0.0000,70.0000,70.0000,NULL,0.0000,70.0000,0.0000,NULL,NULL,NULL,'',NULL,NULL,0.0000,NULL,NULL,NULL,'',NULL,'2022-05-20 12:15:41','2022-05-20 12:15:41'),(40,52,3,5,1.0000,0.0000,0.0000,43.2600,43.2600,'fixed',0.0000,43.2600,0.0000,NULL,NULL,NULL,'',NULL,NULL,0.0000,NULL,NULL,NULL,'',NULL,'2022-08-05 20:36:57','2022-08-05 20:36:57'),(41,52,3,4,1.0000,0.0000,0.0000,43.2600,43.2600,'fixed',0.0000,43.2600,0.0000,NULL,NULL,NULL,'',NULL,NULL,0.0000,NULL,NULL,NULL,'',NULL,'2022-08-05 20:36:57','2022-08-05 20:36:57'),(42,52,3,13,1.0000,0.0000,0.0000,47.5000,47.5000,'fixed',0.0000,47.5000,0.0000,NULL,NULL,NULL,'',NULL,NULL,0.0000,NULL,NULL,NULL,'',NULL,'2022-08-05 20:36:57','2022-08-05 20:36:57');

--
-- Table structure for table `transaction_sell_lines_purchase_lines`
--

CREATE TABLE `transaction_sell_lines_purchase_lines` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `sell_line_id` int unsigned DEFAULT NULL COMMENT 'id from transaction_sell_lines',
  `stock_adjustment_line_id` int unsigned DEFAULT NULL COMMENT 'id from stock_adjustment_lines',
  `purchase_line_id` int unsigned NOT NULL COMMENT 'id from purchase_lines',
  `quantity` decimal(22,4) NOT NULL,
  `qty_returned` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sell_line_id` (`sell_line_id`),
  KEY `stock_adjustment_line_id` (`stock_adjustment_line_id`),
  KEY `purchase_line_id` (`purchase_line_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_sell_lines_purchase_lines`
--

INSERT INTO `transaction_sell_lines_purchase_lines` (`id`, `sell_line_id`, `stock_adjustment_line_id`, `purchase_line_id`, `quantity`, `qty_returned`, `created_at`, `updated_at`) VALUES (1,1,NULL,0,1.0000,0.0000,'2022-03-10 01:18:09','2022-03-10 01:18:09'),(2,2,NULL,0,1.0000,0.0000,'2022-03-20 18:13:36','2022-03-20 18:13:36'),(3,3,NULL,0,1.0000,0.0000,'2022-03-20 18:13:36','2022-03-20 18:13:36'),(4,4,NULL,0,1.0000,0.0000,'2022-03-20 18:14:05','2022-03-20 18:14:05'),(5,5,NULL,0,1.0000,0.0000,'2022-03-20 18:14:05','2022-03-20 18:14:05'),(6,7,NULL,3,10.0000,0.0000,'2022-03-20 18:27:06','2022-03-20 18:27:06'),(9,10,NULL,16,1.0000,0.0000,'2022-05-20 12:15:41','2022-05-20 12:15:41');

--
-- Table structure for table `types_of_services`
--

CREATE TABLE `types_of_services` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `business_id` int NOT NULL,
  `location_price_group` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `packing_charge` decimal(22,4) DEFAULT NULL,
  `packing_charge_type` enum('fixed','percent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_custom_fields` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `types_of_services_business_id_index` (`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `types_of_services`
--


--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int unsigned NOT NULL,
  `actual_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `short_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `allow_decimal` tinyint(1) NOT NULL,
  `base_unit_id` int DEFAULT NULL,
  `base_unit_multiplier` decimal(20,4) DEFAULT NULL,
  `created_by` int unsigned NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `units_business_id_foreign` (`business_id`),
  KEY `units_created_by_foreign` (`created_by`),
  KEY `units_base_unit_id_index` (`base_unit_id`),
  CONSTRAINT `units_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  CONSTRAINT `units_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `business_id`, `actual_name`, `short_name`, `allow_decimal`, `base_unit_id`, `base_unit_multiplier`, `created_by`, `deleted_at`, `created_at`, `updated_at`) VALUES (1,1,'قطعة','ق',0,NULL,NULL,3,'2022-08-02 13:05:24','2022-03-10 01:16:59','2022-08-02 13:05:24'),(2,1,'حبة','حبة',0,NULL,NULL,3,NULL,'2022-05-20 12:28:54','2022-08-02 13:00:24');

--
-- Table structure for table `user_contact_access`
--

CREATE TABLE `user_contact_access` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `contact_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_contact_access_user_id_index` (`user_id`),
  KEY `user_contact_access_contact_id_index` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_contact_access`
--


--
-- Table structure for table `variation_group_prices`
--

CREATE TABLE `variation_group_prices` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `variation_id` int unsigned NOT NULL,
  `price_group_id` int unsigned NOT NULL,
  `price_inc_tax` decimal(22,4) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `variation_group_prices_variation_id_foreign` (`variation_id`),
  KEY `variation_group_prices_price_group_id_foreign` (`price_group_id`),
  CONSTRAINT `variation_group_prices_price_group_id_foreign` FOREIGN KEY (`price_group_id`) REFERENCES `selling_price_groups` (`id`) ON DELETE CASCADE,
  CONSTRAINT `variation_group_prices_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variation_group_prices`
--


--
-- Table structure for table `variation_location_details`
--

CREATE TABLE `variation_location_details` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int unsigned NOT NULL,
  `product_variation_id` int unsigned NOT NULL COMMENT 'id from product_variations table',
  `variation_id` int unsigned NOT NULL,
  `location_id` int unsigned NOT NULL,
  `qty_available` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `variation_location_details_location_id_foreign` (`location_id`),
  KEY `variation_location_details_product_id_index` (`product_id`),
  KEY `variation_location_details_product_variation_id_index` (`product_variation_id`),
  KEY `variation_location_details_variation_id_index` (`variation_id`),
  CONSTRAINT `variation_location_details_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `business_locations` (`id`),
  CONSTRAINT `variation_location_details_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variation_location_details`
--

INSERT INTO `variation_location_details` (`id`, `product_id`, `product_variation_id`, `variation_id`, `location_id`, `qty_available`, `created_at`, `updated_at`) VALUES (2,3,4,4,1,20.0000,'2022-03-20 17:58:14','2022-03-20 18:27:06'),(3,3,5,5,1,10.0000,'2022-03-20 17:58:14','2022-03-20 18:21:24'),(6,3,4,4,2,10.0000,'2022-03-20 18:21:24','2022-08-02 13:07:45'),(7,3,5,5,2,20.0000,'2022-03-20 18:21:24','2022-08-02 13:07:45'),(8,3,4,4,3,10.0000,'2022-03-20 18:21:24','2022-08-02 13:07:36'),(9,3,5,5,3,10.0000,'2022-03-20 18:21:24','2022-08-02 13:07:25'),(10,3,4,4,4,10.0000,'2022-03-20 18:21:24','2022-03-20 18:21:24'),(11,3,5,5,4,10.0000,'2022-03-20 18:21:24','2022-03-20 18:21:24'),(12,3,13,13,1,0.0000,'2022-05-19 16:58:48','2022-08-02 13:07:21'),(13,3,13,13,2,0.0000,'2022-05-19 16:59:52','2022-05-19 17:00:10'),(14,11,14,14,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(15,11,14,15,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(16,11,14,16,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(17,11,14,17,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(18,11,14,18,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(19,11,14,19,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:06:08'),(20,11,14,20,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(21,11,14,21,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(22,11,14,22,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(23,11,14,23,2,0.0000,'2022-05-20 12:14:20','2022-08-02 13:15:58'),(24,11,14,19,3,1.0000,'2022-05-20 12:15:41','2022-05-20 12:15:41'),(34,3,13,13,3,0.0000,'2022-05-20 18:54:29','2022-08-02 11:48:01');

--
-- Table structure for table `variation_templates`
--

CREATE TABLE `variation_templates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int unsigned NOT NULL,
  `woocommerce_attr_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `variation_templates_business_id_foreign` (`business_id`),
  CONSTRAINT `variation_templates_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variation_templates`
--

INSERT INTO `variation_templates` (`id`, `name`, `business_id`, `woocommerce_attr_id`, `created_at`, `updated_at`) VALUES (1,'بلح',1,NULL,'2022-03-20 17:22:10','2022-07-25 16:50:30'),(2,'الاخضر',1,NULL,'2022-03-20 17:22:29','2022-03-20 17:22:29'),(3,'الاسود',1,NULL,'2022-03-20 17:22:41','2022-03-20 17:22:41'),(4,'الازرق',1,NULL,'2022-03-20 17:22:56','2022-03-20 17:22:56'),(6,'أبيض',1,NULL,'2022-07-25 16:43:47','2022-07-25 16:43:47'),(7,'أحمر',1,NULL,'2022-07-25 16:50:56','2022-07-25 16:50:56');

--
-- Table structure for table `variation_value_templates`
--

CREATE TABLE `variation_value_templates` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `variation_template_id` int unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `variation_value_templates_name_index` (`name`),
  KEY `variation_value_templates_variation_template_id_index` (`variation_template_id`),
  CONSTRAINT `variation_value_templates_variation_template_id_foreign` FOREIGN KEY (`variation_template_id`) REFERENCES `variation_templates` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variation_value_templates`
--

INSERT INTO `variation_value_templates` (`id`, `name`, `variation_template_id`, `created_at`, `updated_at`) VALUES (1,'Red',1,'2022-03-20 17:22:10','2022-07-25 16:28:55'),(2,'.',1,'2022-03-20 17:22:10','2022-07-25 16:28:55'),(3,'Green',2,'2022-03-20 17:22:29','2022-07-25 16:28:38'),(4,'Black',3,'2022-03-20 17:22:41','2022-07-25 16:28:27'),(5,'Blue',4,'2022-03-20 17:22:56','2022-07-25 16:28:16'),(7,'blue',1,'2022-07-25 16:39:07','2022-07-25 16:39:07'),(8,'Black',1,'2022-07-25 16:39:07','2022-07-25 16:39:07'),(9,'White',1,'2022-07-25 16:39:07','2022-07-25 16:39:07'),(10,'White',6,'2022-07-25 16:43:47','2022-07-25 16:43:47'),(11,'Red',7,'2022-07-25 16:50:56','2022-07-25 16:50:56');

--
-- Table structure for table `variations`
--

CREATE TABLE `variations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` int unsigned NOT NULL,
  `sub_sku` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_variation_id` int unsigned NOT NULL,
  `woocommerce_variation_id` int DEFAULT NULL,
  `variation_value_id` int DEFAULT NULL,
  `default_purchase_price` decimal(22,4) DEFAULT NULL,
  `dpp_inc_tax` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `profit_percent` decimal(22,4) NOT NULL DEFAULT '0.0000',
  `default_sell_price` decimal(22,4) DEFAULT NULL,
  `sell_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `combo_variations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Contains the combo variation details',
  PRIMARY KEY (`id`),
  KEY `variations_product_id_foreign` (`product_id`),
  KEY `variations_product_variation_id_foreign` (`product_variation_id`),
  KEY `variations_name_index` (`name`),
  KEY `variations_sub_sku_index` (`sub_sku`),
  KEY `variations_variation_value_id_index` (`variation_value_id`),
  CONSTRAINT `variations_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `variations_product_variation_id_foreign` FOREIGN KEY (`product_variation_id`) REFERENCES `product_variations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variations`
--

INSERT INTO `variations` (`id`, `name`, `product_id`, `sub_sku`, `product_variation_id`, `woocommerce_variation_id`, `variation_value_id`, `default_purchase_price`, `dpp_inc_tax`, `profit_percent`, `default_sell_price`, `sell_price_inc_tax`, `created_at`, `updated_at`, `deleted_at`, `combo_variations`) VALUES (4,'Blue',3,'865496056178019',4,NULL,5,42.0000,42.0000,3.0000,43.2600,43.2600,'2022-03-20 17:57:28','2022-08-02 13:31:51',NULL,NULL),(5,'Black',3,'869774053999397',5,NULL,4,42.0000,42.0000,3.0000,43.2600,43.2600,'2022-03-20 17:57:28','2022-08-02 13:31:51',NULL,NULL),(13,'Red',3,'89965030621231819546',13,NULL,1,38.0000,38.0000,25.0000,47.5000,47.5000,'2022-05-19 16:56:46','2022-08-02 13:31:51',NULL,NULL),(14,'Black',11,'869998054106062',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:03:50','2022-08-02 13:31:25',NULL,NULL),(15,'Black',11,'869998054363747',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(16,'Black',11,'860710063944402',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(17,'Black',11,'860710063572724',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(18,'Black',11,'869998054130385',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(19,'Black',11,'869998054369801',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(20,'Black',11,'869998054115600',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(21,'Black',11,'869998054138149',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(22,'Black',11,'869998054306464',14,NULL,4,60.0000,60.0000,18.4200,71.0500,71.0500,'2022-05-20 11:21:13','2022-08-02 13:31:25',NULL,NULL),(23,'1',11,'869998054627984',14,NULL,4,70.0000,70.0000,1.5000,71.0500,71.0500,'2022-05-20 11:21:13','2022-05-20 19:05:28','2022-05-20 19:05:28',NULL),(61,'DUMMY',30,'dfsdfdf',46,NULL,NULL,122.0000,122.0000,25.0000,152.5000,152.5000,'2022-08-05 20:36:00','2022-08-05 20:36:00',NULL,'[]');

--
-- Table structure for table `warranties`
--

CREATE TABLE `warranties` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `duration` int NOT NULL,
  `duration_type` enum('days','months','years') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warranties_business_id_index` (`business_id`),
  KEY `warranties_duration_type_index` (`duration_type`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warranties`
--

INSERT INTO `warranties` (`id`, `name`, `business_id`, `description`, `duration`, `duration_type`, `created_at`, `updated_at`) VALUES (1,'trade line',1,'ضمان ضد عيوب الصناعة',1,'years','2022-05-20 11:27:57','2022-05-20 11:27:57');

--
-- Table structure for table `woocommerce_sync_logs`
--

CREATE TABLE `woocommerce_sync_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int NOT NULL,
  `sync_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `operation_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `woocommerce_sync_logs`
--


--
-- Dumping events for database 'topappkw_pos'
--

--
-- Dumping routines for database 'topappkw_pos'
--


