--
-- 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 `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 `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 '[BLOB]','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 '[BLOB]','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 '[BLOB]','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`
--



