--
-- Host: localhost    Database: sss4c
-- ------------------------------------------------------


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

CREATE TABLE `activity_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `log_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject_id` bigint unsigned DEFAULT NULL,
  `causer_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `causer_id` bigint unsigned DEFAULT NULL,
  `properties` json DEFAULT NULL,
  `batch_uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subject` (`subject_type`,`subject_id`),
  KEY `causer` (`causer_type`,`causer_id`),
  KEY `activity_log_log_name_index` (`log_name`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `activity_log` VALUES (1,'default','updated','App\\Models\\Site','updated',3,'App\\Models\\User',1,'{\"old\": {\"name\": null, \"text\": null}, \"attributes\": {\"name\": null, \"text\": null}}',NULL,'2023-06-29 19:58:46','2023-06-29 19:58:46'),(2,'default','updated','App\\Models\\Site','updated',3,'App\\Models\\User',1,'[]',NULL,'2023-06-29 20:07:40','2023-06-29 20:07:40'),(3,'default','updated','App\\Models\\Site','updated',3,'App\\Models\\User',1,'{\"old\": {\"id\": 3, \"city\": \"London\", \"photo\": \"https://portal.sss4c.ca/storage/2023/06/27/06176812b30124494108ffe223ccdad3b7f3c95b.png\", \"status\": 0, \"address\": \"Toronto ABC\", \"country\": \"England\", \"province\": \"KSo\", \"site_code\": \"S003\", \"site_desc\": \"asdf asdf á fasd fasd fasd fasd fasd fasdf á\", \"site_name\": \"Tacc Construction Ltd a\", \"created_at\": \"2023-05-12T08:12:45.000000Z\", \"updated_at\": \"2023-06-30T03:07:40.000000Z\", \"contact_name\": \"Doan Ngoc Ha\", \"contact_phone\": \"0901234231\", \"working_field\": \"Construction\"}, \"attributes\": {\"id\": 3, \"city\": \"London\", \"photo\": \"https://portal.sss4c.ca/storage/2023/06/27/06176812b30124494108ffe223ccdad3b7f3c95b.png\", \"status\": 0, \"address\": \"Toronto ABC\", \"country\": \"England\", \"province\": \"KSo\", \"site_code\": \"S003\", \"site_desc\": \"asdf asdf á fasd fasd fasd fasd fasd fasdf á\", \"site_name\": \"Tacc Construction Ltd\", \"created_at\": \"2023-05-12T08:12:45.000000Z\", \"updated_at\": \"2023-06-30T03:19:53.000000Z\", \"contact_name\": \"Doan Ngoc Ha\", \"contact_phone\": \"0901234231\", \"working_field\": \"Construction\"}}',NULL,'2023-06-29 20:19:53','2023-06-29 20:19:53'),(4,'default','updated','App\\Models\\Site','updated',3,'App\\Models\\User',1,'{\"old\": {\"site_name\": \"Tacc Construction Ltd\", \"updated_at\": \"2023-06-30T03:19:53.000000Z\"}, \"attributes\": {\"site_name\": \"Tacc Construction Ltd a\", \"updated_at\": \"2023-06-30T03:21:26.000000Z\"}}',NULL,'2023-06-29 20:21:26','2023-06-29 20:21:26'),(5,'default','Look mum, I logged something',NULL,NULL,NULL,'App\\Models\\User',1,'[]',NULL,'2023-06-29 20:44:48','2023-06-29 20:44:48'),(6,'default','User Doan Ngoc Ha viewed the site','App\\Models\\Site','view',NULL,'App\\Models\\User',NULL,'[]',NULL,'2023-06-29 21:07:47','2023-06-29 21:07:47'),(7,'view','User Doan Ngoc Ha viewed the site','App\\Models\\Site','view',NULL,'App\\Models\\User',NULL,'[]',NULL,'2023-06-30 01:27:27','2023-06-30 01:27:27'),(8,'view','User Doan Ngoc Ha viewed the site','App\\Models\\Site','view',NULL,'App\\Models\\User',NULL,'[]',NULL,'2023-06-30 02:08:11','2023-06-30 02:08:11'),(9,'view','User Doan Ngoc Ha viewed the site','App\\Models\\Site','view',NULL,'App\\Models\\User',NULL,'[]',NULL,'2023-06-30 02:08:17','2023-06-30 02:08:17'),(10,'view','User Doan Ngoc Ha viewed the site','App\\Models\\Site','view',NULL,'App\\Models\\User',NULL,'[]',NULL,'2023-06-30 02:33:38','2023-06-30 02:33:38'),(11,'view','User Doan Ngoc Ha viewed the siteTacc Construction Ltd a','App\\Models\\Site','view',3,'App\\Models\\User',1,'[]',NULL,'2023-06-30 02:46:59','2023-06-30 02:46:59'),(12,'view','User Doan Ngoc Ha viewed the site Tacc Construction Ltd a','App\\Models\\Site','view',3,'App\\Models\\User',1,'[]',NULL,'2023-06-30 03:22:04','2023-06-30 03:22:04'),(13,'view','User Alex Gargot viewed the site Tacc Construction Ltd a','App\\Models\\Site','view',3,'App\\Models\\User',1,'[]',NULL,'2023-07-03 20:56:08','2023-07-03 20:56:08'),(14,'view','User Alex Gargot viewed the site Tacc Construction Ltd a','App\\Models\\Site','view',3,'App\\Models\\User',1,'[]',NULL,'2023-07-03 21:02:08','2023-07-03 21:02:08'),(15,'view','User Alex Gargot viewed the site Tacc Construction Ltd a','App\\Models\\Site','view',3,'App\\Models\\User',1,'[]',NULL,'2023-07-03 21:04:42','2023-07-03 21:04:42'),(16,'view','User Alex Gargot viewed the device Lodeking LT','App\\Models\\Device','view',4,'App\\Models\\User',1,'[]',NULL,'2023-07-03 23:43:23','2023-07-03 23:43:23');

--
-- Table structure for table `attachmentable`
--

CREATE TABLE `attachmentable` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `attachmentable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `attachmentable_id` int unsigned NOT NULL,
  `attachment_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `attachmentable_attachmentable_type_attachmentable_id_index` (`attachmentable_type`,`attachmentable_id`),
  KEY `attachmentable_attachment_id_foreign` (`attachment_id`),
  CONSTRAINT `attachmentable_attachment_id_foreign` FOREIGN KEY (`attachment_id`) REFERENCES `attachments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attachmentable`
--


--
-- Table structure for table `attachments`
--

CREATE TABLE `attachments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `extension` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` bigint NOT NULL DEFAULT '0',
  `sort` int NOT NULL DEFAULT '0',
  `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `alt` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `hash` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `disk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'public',
  `user_id` bigint unsigned DEFAULT NULL,
  `group` varchar(255) 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 AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attachments`
--

INSERT INTO `attachments` VALUES (1,'18dc6933e3be761005bb975eced03f31056a694f','Screen Shot 2023-05-09 at 10.00.43 PM.png','image/png','png',72232,0,'2023/05/09/',NULL,NULL,'e5e8f05bb7a922bf8718b02ee0d6b55a4766b7cb','public',1,NULL,'2023-05-09 08:14:59','2023-05-09 08:14:59'),(2,'96b917dcb64592258afd3760495cc04602dde427','Screen Shot 2023-05-10 at 1.57.41 PM.png','image/png','png',1392451,0,'2023/05/10/',NULL,NULL,'bdc27799d322a8c359346ccf5381d89404717d44','public',1,NULL,'2023-05-10 03:26:30','2023-05-10 03:26:30'),(3,'a2d6f40b5188c038937e474ab708cd9f81090f8a','Screen Shot 2023-05-04 at 9.18.53 AM.png','image/png','png',1421143,0,'2023/05/10/',NULL,NULL,'6d4958a6d3d2673d5fec1d94c57ab21861d3e498','public',1,NULL,'2023-05-10 03:52:47','2023-05-10 03:52:47'),(4,'a2d6f40b5188c038937e474ab708cd9f81090f8a','Screen Shot 2023-05-04 at 9.18.53 AM.png','image/png','png',1421143,0,'2023/05/10/',NULL,NULL,'6d4958a6d3d2673d5fec1d94c57ab21861d3e498','public',1,NULL,'2023-05-10 03:53:00','2023-05-10 03:53:00'),(5,'ff71b69e0647a64f9bb4b639bf4071e3afac1387','Screen Shot 2023-05-10 at 5.39.33 PM.png','image/png','png',1276889,0,'2023/05/10/',NULL,NULL,'e478e90b452f3411cb62e996aa6cee30e793fca7','public',1,NULL,'2023-05-10 03:53:07','2023-05-10 03:53:07'),(6,'a2d6f40b5188c038937e474ab708cd9f81090f8a','Screen Shot 2023-05-04 at 9.18.53 AM.png','image/png','png',1421143,0,'2023/05/10/',NULL,NULL,'6d4958a6d3d2673d5fec1d94c57ab21861d3e498','public',1,NULL,'2023-05-10 03:53:15','2023-05-10 03:53:15'),(7,'5b94ded5ba21bbc12135dcf8bf5e602648c0771e','Screen Shot 2023-05-12 at 3.08.20 PM.png','image/png','png',67355,0,'2023/05/12/',NULL,NULL,'6b78e93f0da15cd0da2c5df14216267096736b25','public',1,NULL,'2023-05-12 01:08:27','2023-05-12 01:08:27'),(8,'68a8b493cf62d0a85a10b1ca2a97ed23f4338821','Screen Shot 2023-05-12 at 3.09.12 PM.png','image/png','png',1752650,0,'2023/05/12/',NULL,NULL,'1147b00ce9606f695d9aa3636120c69c05ab7f10','public',1,NULL,'2023-05-12 01:09:19','2023-05-12 01:09:19'),(9,'155fedd01fd711764426de3c7ea28b806a2fb028','Screen Shot 2023-05-12 at 3.12.37 PM.png','image/png','png',122649,0,'2023/05/12/',NULL,NULL,'34c5f11f01b252228b02080cfaaae52340ac1568','public',1,NULL,'2023-05-12 01:12:44','2023-05-12 01:12:44'),(10,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 00:48:19','2023-05-16 00:48:19'),(11,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 00:51:07','2023-05-16 00:51:07'),(12,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 01:00:27','2023-05-16 01:00:27'),(13,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 01:07:03','2023-05-16 01:07:03'),(14,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 01:10:49','2023-05-16 01:10:49'),(15,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 01:14:30','2023-05-16 01:14:30'),(16,'bb58dfcf4fb30aef9f63e142b9855ccc9a390b91','Screenshot 2023-05-16 at 10.13.34 AM.png','image/png','png',390869,0,'2023/05/16/',NULL,NULL,'8b028f55b7ecdbb8f80b5eeb0084eff30e0cdc94','public',1,NULL,'2023-05-16 01:25:12','2023-05-16 01:25:12'),(17,'53f8b823cf19cdd05e17d259e8ee001c18f2d358','Approach_ReliAlert-1.png','image/png','png',152944,0,'2023/06/19/',NULL,NULL,'afe4732d1fb2918f2a48da2fe5ed23eb9a7d7001','public',1,NULL,'2023-06-19 04:19:16','2023-06-19 04:19:16'),(18,'e5a52520ecbabf2c8a2d1095fedc3bb2c2f0b810','c2.jpg.png','image/png','png',140579,0,'2023/06/19/',NULL,NULL,'beffc285de4c41b3be60db33588dfde25c5af54b','public',1,NULL,'2023-06-19 04:24:45','2023-06-19 04:24:45'),(19,'28c9c4155955c617ba7dfd7c2ac3ce5540c52fca','cau-tu-hanh-dongyang-ss1924-d15g2075-1.jpg','image/jpeg','jpg',157782,0,'2023/06/19/',NULL,NULL,'9282ca333f6cb1e697df94f2b5369ef1811efd9f','public',1,NULL,'2023-06-19 04:25:02','2023-06-19 04:25:02'),(20,'06bfba82f1c7aec41bc59084034e6695582432fb','images-2.jpeg','image/jpeg','jpeg',11055,0,'2023/06/19/',NULL,NULL,'42fe33398faec89b3063fd88d57ca4fb576afa2f','public',1,NULL,'2023-06-19 04:30:38','2023-06-19 04:30:38'),(21,'802e39bb9c907abfcd56b3ed14713f988d1835e7','images-3.jpeg','image/jpeg','jpeg',7202,0,'2023/06/19/',NULL,NULL,'76bc4a106982ac33154f66d63011e8476ec63b67','public',1,NULL,'2023-06-19 04:31:23','2023-06-19 04:31:23'),(22,'cbdd06e3ebc2578fae846757886c1794c9d80258','thue-xe-cau-100-tan.jpg','image/jpeg','jpg',112927,0,'2023/06/19/',NULL,NULL,'f41d34489d4de4f917430013ab49fcc9e574825e','public',1,NULL,'2023-06-19 04:35:13','2023-06-19 04:35:13'),(23,'d4bcba6888ed01699d81f136a2af73f468eba15d','xe-can-cau-300x200.jpg','image/jpeg','jpg',20232,0,'2023/06/19/',NULL,NULL,'2b78a16bc86e1271bab9f5a432f4016f75d5f6fa','public',1,NULL,'2023-06-19 04:35:36','2023-06-19 04:35:36'),(24,'95ac25dadc7e261093e157434c3e5c457e3d8a0a','Screenshot 2023-06-21 at 09.53.42.png','image/png','png',20782,0,'2023/06/21/',NULL,NULL,'196aa694f4a727140e5c3f22d0b8b5523d64dcda','public',1,NULL,'2023-06-20 19:59:16','2023-06-20 19:59:16'),(25,'58a641e2d10d2685efb0faec9c80a880081ec046','Screenshot 2023-06-21 at 09.54.03.png','image/png','png',40870,0,'2023/06/21/',NULL,NULL,'0ac2e1a69b8c8ffd448412d20911e2cebc454f5c','public',1,NULL,'2023-06-20 20:01:07','2023-06-20 20:01:07'),(26,'bee320acb8bf70f289ff29c5359412970390edff','Screenshot 2023-06-21 at 09.54.17.png','image/png','png',40982,0,'2023/06/21/',NULL,NULL,'4f2558b2f6e8163515a65f601874f3fdf6f3e515','public',1,NULL,'2023-06-20 20:01:22','2023-06-20 20:01:22'),(27,'046b606ced47afdec6ad95d9c47dc453a11e16da','Screenshot 2023-06-21 at 09.54.24.png','image/png','png',33525,0,'2023/06/21/',NULL,NULL,'0c09e6fc69a9b9f0d2ada70a42b49d43d11e621d','public',1,NULL,'2023-06-20 20:02:49','2023-06-20 20:02:49'),(28,'a4b54adc95b8aeac76ce60a9ba8c8dcab9af1ca5','Yale-LodeKing-LT-15T-1-blue-gear-box.jpg','image/jpeg','jpg',411017,0,'2023/06/22/',NULL,NULL,'1b29123b68ca9dd9f6fe84bd49b617a697414e19','public',1,NULL,'2023-06-21 22:05:37','2023-06-21 22:05:37'),(29,'2a825f89562c0922ebfe7907456d9451aec7bf01','11883__64900.jpg','image/jpeg','jpg',109751,0,'2023/06/22/',NULL,NULL,'2633375c472691c1763b0efd194071ab2ec655de','public',1,NULL,'2023-06-22 01:55:53','2023-06-22 01:55:53'),(30,'7d01f375931bf43e69a0c28af38efd01f8b344c0','21055__79659.jpg','image/jpeg','jpg',72306,0,'2023/06/22/',NULL,NULL,'0af1c07eb975254cbd4dc002e342314cd4d82c40','public',1,NULL,'2023-06-22 01:59:02','2023-06-22 01:59:02'),(31,'d6c8ed8ee917baaca622f8067f4b12e42a5b5b87','CM3532NH__47184.jpg','image/jpeg','jpg',108433,0,'2023/06/22/',NULL,NULL,'663809f17911035b151ad525e725310c3ff1b2a1','public',1,NULL,'2023-06-22 01:59:22','2023-06-22 01:59:22'),(32,'06176812b30124494108ffe223ccdad3b7f3c95b','3.png','image/png','png',196627,0,'2023/06/27/',NULL,NULL,'0c2399018aae06e587b0edfd74c64ac605eae67f','public',1,NULL,'2023-06-26 22:03:18','2023-06-26 22:03:18'),(33,'7d01f375931bf43e69a0c28af38efd01f8b344c0','21055__79659.jpg','image/jpeg','jpg',72306,0,'2023/06/22/',NULL,NULL,'0af1c07eb975254cbd4dc002e342314cd4d82c40','public',1,NULL,'2023-06-27 01:43:54','2023-06-27 01:43:54'),(34,'2a825f89562c0922ebfe7907456d9451aec7bf01','11883__64900.jpg','image/jpeg','jpg',109751,0,'2023/06/22/',NULL,NULL,'2633375c472691c1763b0efd194071ab2ec655de','public',1,NULL,'2023-06-27 01:44:58','2023-06-27 01:44:58'),(35,'f4490898584eca1af09662898471d97fb51eaace','home-06-category-banner-guides-1.jpg','image/jpeg','jpg',24902,0,'2023/06/29/',NULL,NULL,'5ab8d7929865ee0063cfc9f1f2a4f87e243d781a','public',1,NULL,'2023-06-29 04:04:28','2023-06-29 04:04:28');

--
-- Table structure for table `cities`
--

CREATE TABLE `cities` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `province_id` int NOT NULL,
  `name` varchar(255) 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=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cities`
--

INSERT INTO `cities` VALUES (4,4,'Others',NULL,NULL),(5,3,'Toronto',NULL,NULL),(6,3,'Windsor',NULL,NULL),(7,5,'Acton Vale',NULL,NULL);

--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `countries_name_unique` (`name`),
  UNIQUE KEY `countries_code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `countries`
--

INSERT INTO `countries` VALUES (3,'Others','OTHER',NULL,NULL),(4,'Canada','CAN',NULL,NULL);

--
-- Table structure for table `device_logs`
--

CREATE TABLE `device_logs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `device_id` int NOT NULL,
  `type` tinyint NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_by` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `modified_by` varchar(255) 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=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `device_logs`
--

INSERT INTO `device_logs` VALUES (1,1,1,'Hoist frame cracked','Ha Doan Ngoc','Ha Doan Ngoc','2023-06-22 02:21:47','2023-06-22 02:21:47'),(2,1,1,'Hoist will not freewheel','Ha Doan Ngoc','Ha Doan Ngoc','2023-06-22 02:21:47','2023-06-22 02:21:47'),(3,1,1,'Hoist hooks opened.','Ha Doan Ngoc','Ha Doan Ngoc','2023-06-22 02:21:47','2023-06-22 02:21:47'),(4,1,2,'Hoist overheats','Ha Doan Ngoc','Ha Doan Ngoc','2023-06-22 02:21:47','2023-06-22 02:21:47');

--
-- Table structure for table `devices`
--

CREATE TABLE `devices` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` blob,
  `serial` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mfg` timestamp NULL DEFAULT NULL,
  `load` int NOT NULL,
  `lifting_height` double(8,2) DEFAULT NULL,
  `duty_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `control` int NOT NULL,
  `braking` int NOT NULL,
  `hoisting_cycle` int NOT NULL,
  `start` int NOT NULL,
  `running_time` int NOT NULL,
  `temperature` double(8,2) NOT NULL,
  `site_id` int NOT NULL,
  `admin_id` json DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `modified_by` varchar(255) 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=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `devices`
--

INSERT INTO `devices` VALUES (1,'CM Lodestar VS',NULL,'BDHKSM463','electric-chain',NULL,2,NULL,'h2',520000,1000000,0,320000,3200,55.00,1,NULL,0,'Doan Ngoc Ha','Doan Ngoc Ha','2023-06-19 04:19:43','2023-06-22 02:00:10'),(2,'Shaw Box SK',NULL,'BDHJ43XS','wire-rope-hoists',NULL,2,NULL,'h3',720000,1000000,0,560000,3200,56.00,2,NULL,1,'Doan Ngoc Ha','Doan Ngoc Ha','2023-06-19 04:20:18','2023-06-22 02:00:25'),(3,'Yale YK Y80. Cable King',NULL,'BDHKSMK4D','wire-rope-hoists',NULL,1,NULL,'h3',640000,1000000,64000,480000,32000,60.00,1,NULL,1,'Doan Ngoc Ha','Doan Ngoc Ha','2023-06-19 04:31:01','2023-06-22 02:00:42'),(4,'Lodeking LT',NULL,'HNDKD45','wire-rope-hoists',NULL,3,NULL,'h2',64000,1000000,0,480000,3200,40.00,3,NULL,1,'Doan Ngoc Ha','Doan Ngoc Ha','2023-06-19 04:31:50','2023-06-22 02:21:47');

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

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


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

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

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

INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2014_10_12_200000_add_two_factor_columns_to_users_table',1),(4,'2015_04_12_000000_create_orchid_users_table',1),(5,'2015_10_19_214424_create_orchid_roles_table',1),(6,'2015_10_19_214425_create_orchid_role_users_table',1),(7,'2016_08_07_125128_create_orchid_attachmentstable_table',1),(8,'2017_09_17_125801_create_notifications_table',1),(9,'2019_08_19_000000_create_failed_jobs_table',1),(10,'2019_12_14_000001_create_personal_access_tokens_table',1),(11,'2023_02_23_071333_create_sessions_table',1),(12,'2023_02_23_103528_create_posts_table',1),(13,'2023_03_07_135009_create_tasks_table',1),(14,'2023_03_08_074300_update_task_database',1),(15,'2023_04_25_164300_create_site_table',1),(16,'2023_05_09_031252_update_site_table',1),(17,'2023_05_10_074032_update_enum_sitetable',2),(18,'2023_05_11_065137_add_site_status',3),(19,'2023_05_16_073433_new_user_profile_info',4),(20,'2023_05_16_093747_add_user_status',5),(21,'2023_06_22_042902_alter_devices_table_3',6),(22,'2023_06_22_044755_alter_devices_table_4',7),(23,'2023_06_26_102013_alter_devices_table_5',8),(24,'2023_06_26_102611_alter_devices_table_5',9),(25,'2023_06_27_043838_alter_sites_table_3',10),(26,'2023_06_29_030540_create_device_logs_table',11),(27,'2023_06_16_122020_create_devices_table',12),(28,'2023_06_19_090437_alter_devices_table',12),(29,'2023_06_19_104345_alter_devices_table_2',12),(30,'2023_06_29_102649_create_activity_log_table',12),(31,'2023_06_29_102650_add_event_column_to_activity_log_table',12),(32,'2023_06_29_102651_add_batch_uuid_column_to_activity_log_table',12);

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

CREATE TABLE `notifications` (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `notifiable_type` varchar(255) 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`
--


--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `password_resets`
--


--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `personal_access_tokens`
--


--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `body` varchar(255) 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 `posts`
--


--
-- Table structure for table `provinces`
--

CREATE TABLE `provinces` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `country_id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `provinces_code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `provinces`
--

INSERT INTO `provinces` VALUES (3,4,'Ontario','ON',NULL,NULL),(4,3,'Others','OTHER',NULL,NULL),(5,4,'Quebec','QC',NULL,NULL);

--
-- Table structure for table `role_users`
--

CREATE TABLE `role_users` (
  `user_id` bigint unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_users_role_id_foreign` (`role_id`),
  CONSTRAINT `role_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_users`
--

INSERT INTO `role_users` VALUES (1,1),(2,4);

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

CREATE TABLE `roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `permissions` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'super-admin','Super Admin','{\"platform.index\": \"1\", \"platform.dashboard.sm\": \"1\", \"platform.modules.sites\": \"1\", \"platform.systems.roles\": \"1\", \"platform.systems.users\": \"1\", \"platform.dashboard.admin\": \"1\", \"platform.dashboard.staff\": \"1\", \"platform.modules.devices\": \"1\", \"platform.systems.attachment\": \"1\"}','2023-05-09 17:23:46','2023-06-28 04:01:04'),(2,'site-manager','Site Manager','{\"platform.index\": \"1\", \"platform.modules.sites\": \"1\", \"platform.systems.roles\": \"0\", \"platform.systems.users\": \"1\", \"platform.modules.devices\": \"1\", \"platform.systems.dashboard\": \"0\", \"platform.systems.attachment\": \"0\", \"platform.systems.dashboard.sm\": \"1\", \"platform.systems.dashboard.staff\": \"0\"}','2023-05-09 17:24:41','2023-06-28 03:25:22'),(4,'staff','Staff','{\"platform.index\": \"1\", \"platform.modules.sites\": \"0\", \"platform.systems.roles\": \"0\", \"platform.systems.users\": \"0\", \"platform.modules.devices\": \"1\", \"platform.systems.dashboard\": \"0\", \"platform.systems.attachment\": \"0\", \"platform.systems.dashboard.sm\": \"0\", \"platform.systems.dashboard.staff\": \"1\"}','2023-06-28 03:27:21','2023-06-28 03:27:21');

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

CREATE TABLE `sessions` (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint 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` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


--
-- Table structure for table `sites`
--

CREATE TABLE `sites` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `site_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `site_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `site_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` tinyint NOT NULL DEFAULT '1',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `photo` blob,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `working_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sites_site_code_unique` (`site_code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sites`
--

INSERT INTO `sites` VALUES (1,'S001','Canada Construction Limited','Công ty cổ phần công nghệ Coming',0,'So 7 ngach Khuong Trung','Đoàn Ngọc Hà','090512341234',_binary 'https://portal.sss4c.ca/storage/2023/05/12/5b94ded5ba21bbc12135dcf8bf5e602648c0771e.png','2023-05-09 01:27:22','2023-06-26 04:16:05','','','',''),(2,'S002','CANA Group of Companies','adsf asdf asdf asd fasd fasdf asdf ads fasdf',1,'So 7 ngach 211/249 Khuong Trung, Thanh Xuan, Ha Noi','DOAN NGOC HA','0901234231',_binary 'https://portal.sss4c.ca/storage/2023/06/29/f4490898584eca1af09662898471d97fb51eaace.jpg','2023-05-09 08:15:01','2023-06-29 04:04:46','Construction','UK','London','London'),(3,'S003','Tacc Construction Ltd a','asdf asdf á fasd fasd fasd fasd fasd fasdf á',0,'Toronto ABC','Doan Ngoc Ha','0901234231',_binary 'https://portal.sss4c.ca/storage/2023/06/27/06176812b30124494108ffe223ccdad3b7f3c95b.png','2023-05-12 01:12:45','2023-06-29 20:21:26','Construction','England','London','KSo');

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text 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 `tasks`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `two_factor_secret` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `two_factor_recovery_codes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `two_factor_confirmed_at` timestamp NULL DEFAULT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `permissions` json DEFAULT NULL,
  `mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'Alex Gargot','admin@admin.com',NULL,'$2y$10$ISZcjyI7m0GrOZtq9vpjwOWfbB/ecj6TnSjndl7k1xFAKGp/nLqsO',NULL,NULL,NULL,'y2NiDE7IEX73MumLZkDTZQ4heQksGrJCzbeHUwVr7Zeig0VjRcAdALz42Yku','2023-05-09 00:32:37','2023-06-30 02:22:42','{\"platform.index\": \"1\", \"platform.dashboard.sm\": \"1\", \"platform.modules.sites\": \"1\", \"platform.systems.roles\": \"1\", \"platform.systems.users\": \"1\", \"platform.dashboard.admin\": \"1\", \"platform.dashboard.staff\": \"1\", \"platform.modules.devices\": \"1\", \"platform.systems.activity\": \"1\", \"platform.systems.attachment\": \"1\"}','+623412342314','https://portal.sss4c.ca/storage/2023/05/16/bb58dfcf4fb30aef9f63e142b9855ccc9a390b91.png',1),(2,'Duong Nguyen','wpstylish@gmail.com',NULL,'$2y$10$Jog4U1Ly1gD/m1r85VA9XuGJZ8b.4cs2bBJ50g5pCMsu5gvhD23lO',NULL,NULL,NULL,NULL,'2023-05-16 01:17:35','2023-06-28 03:27:39','{\"platform.index\": \"1\", \"platform.modules.sites\": \"0\", \"platform.systems.roles\": \"0\", \"platform.systems.users\": \"0\", \"platform.modules.devices\": \"0\", \"platform.systems.dashboard\": \"0\", \"platform.systems.attachment\": \"0\", \"platform.systems.dashboard.sm\": \"0\", \"platform.systems.dashboard.staff\": \"0\"}',NULL,NULL,1);


