--
-- Host: localhost    Database: iplusview
-- ------------------------------------------------------


--
-- Table structure for table `banks`
--

CREATE TABLE `banks` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `user_id` bigint unsigned 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=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `banks`
--

INSERT INTO `banks` VALUES (1,'ไทยพาณิชย์ (SCB)','',0,NULL,1,2,NULL,'2023-09-04 15:28:43','2023-09-08 04:31:58'),(2,'กรุงไทย(KTB)','',0,NULL,1,2,NULL,'2023-09-04 15:28:46','2023-09-08 04:28:02'),(3,'กสิกรไทย (Kbank)','',0,NULL,1,2,NULL,'2023-09-04 15:28:50','2023-09-08 04:27:34'),(4,'กรุงเทพ (BBL)','',0,NULL,1,2,NULL,'2023-09-08 04:34:06','2023-09-08 04:34:06'),(5,'ทหารไทยธนชาติ (TTB)','',0,NULL,1,2,NULL,'2023-09-08 04:34:46','2023-09-08 04:39:03'),(6,'ออมสิน (GSB)','',0,NULL,1,2,NULL,'2023-09-08 04:35:11','2023-09-08 04:35:11'),(7,'กรุงศรีอยุธยา (BAY)','',0,NULL,1,2,NULL,'2023-09-08 04:36:13','2023-09-08 04:36:13'),(8,'ซีไอเอ็มบี (CIMB)','',0,NULL,1,2,NULL,'2023-09-08 04:36:46','2023-09-08 04:40:37'),(9,'เพื่อการเกษตรและสหกรณ์การเกษตร (BAAC)','',0,NULL,1,2,NULL,'2023-09-08 04:37:22','2023-09-08 04:40:28'),(10,'ซิตี้แบงค์ (CITI)','',0,NULL,1,2,NULL,'2023-09-08 04:38:04','2023-09-08 04:40:13'),(11,'อาคารสงเคราะห์ (GHB)','',0,NULL,1,2,NULL,'2023-09-08 04:38:43','2023-09-08 04:39:12'),(12,'เกียรตินาคิน (KK)','',0,NULL,1,2,NULL,'2023-09-08 04:41:38','2023-09-08 04:41:38'),(13,'แลนด์ แอนด์ เฮ้าส์ (LHBANK)','',0,NULL,1,2,NULL,'2023-09-08 04:42:07','2023-09-08 04:42:07'),(14,'ทรูมันนี่วอเลต (truemoney Wallet)','',0,NULL,1,2,NULL,'2023-09-08 04:42:35','2023-09-08 04:45:15'),(15,'ยูโอบี (UOB)','',0,NULL,1,2,NULL,'2023-09-08 04:45:59','2023-09-08 04:45:59'),(16,'สแตนดาร์ดชาร์เตอร์ด (SCBT)','',0,NULL,1,2,NULL,'2023-09-08 04:46:44','2023-09-08 04:46:44'),(17,'อิสลามแห่งประเทศไทย (ISBT)','',0,NULL,1,2,NULL,'2023-09-08 04:47:40','2023-09-08 04:47:40'),(18,'ไทยเครดิต เพื่อรายย่อย (TCR)','',0,NULL,1,2,NULL,'2023-09-08 04:48:26','2023-09-08 04:48:26'),(19,'ทิสโก้ (TISCO)','',0,NULL,1,2,NULL,'2023-09-08 04:49:28','2023-09-08 04:49:28'),(20,'พัฒนาวิสาหกิจขนาดกลางและขนาดย่อมแห่งประเทศไทย (SME)','',0,NULL,1,2,NULL,'2023-09-08 04:50:24','2023-09-08 04:50:24');

--
-- Table structure for table `buy_sells`
--

CREATE TABLE `buy_sells` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `direction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(15,6) NOT NULL DEFAULT '0.000000',
  `commission` double(15,6) NOT NULL DEFAULT '0.000000',
  `opening_point` double(15,6) NOT NULL DEFAULT '0.000000',
  `closing_point` double(15,6) NOT NULL DEFAULT '0.000000',
  `seconds` int NOT NULL DEFAULT '60',
  `status` int NOT NULL DEFAULT '0',
  `product_id` bigint unsigned DEFAULT NULL,
  `member_id` bigint unsigned DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `profit` double(15,6) NOT NULL DEFAULT '0.000000',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=424 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `buy_sells`
--


--
-- Table structure for table `deposit_withdraws`
--

CREATE TABLE `deposit_withdraws` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cash_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(15,2) NOT NULL DEFAULT '0.00',
  `promotion` double(15,2) NOT NULL DEFAULT '0.00',
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `member_id` bigint unsigned DEFAULT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `status` smallint NOT NULL DEFAULT '0',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=362 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deposit_withdraws`
--


--
-- 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 `invitation_codes`
--

CREATE TABLE `invitation_codes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `is_staff_code` 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invitation_codes`
--

INSERT INTO `invitation_codes` VALUES (1,'001',1,1,NULL,'2024-03-28 17:20:32','2024-03-28 17:20:32'),(2,'00186d8ce99',63,0,NULL,'2024-03-28 17:36:28','2024-03-28 17:36:28'),(3,'001ff43646e',64,0,NULL,'2024-03-28 17:45:38','2024-03-28 17:45:38');

--
-- Table structure for table `members`
--

CREATE TABLE `members` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bank_id` bigint unsigned DEFAULT NULL,
  `bank_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `user_id` bigint unsigned DEFAULT NULL,
  `is_new_member` tinyint(1) NOT NULL DEFAULT '1',
  `can_withdraw` tinyint(1) NOT NULL DEFAULT '1',
  `withdraw_message` 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,
  `credit` double(15,2) NOT NULL DEFAULT '0.00',
  `profile_photo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dob` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credit_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '100',
  `vip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdrawal_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdrawal_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `members`
--

INSERT INTO `members` VALUES (57,NULL,NULL,NULL,NULL,64,1,1,NULL,NULL,'2024-03-28 17:45:38','2024-03-28 17:45:38',0.00,NULL,NULL,NULL,'100',NULL,NULL,NULL);

--
-- 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=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` VALUES (37,'2014_10_12_000000_create_users_table',1),(38,'2014_10_12_100000_create_password_resets_table',1),(39,'2019_08_19_000000_create_failed_jobs_table',1),(40,'2019_12_14_000001_create_personal_access_tokens_table',1),(41,'2022_04_15_130146_create_permission_tables',1),(42,'2023_08_01_022821_create_banks_table',1),(43,'2023_08_09_043107_create_members_table',1),(44,'2023_08_16_151219_add_credit_to_members_table',1),(45,'2023_08_16_171549_create_deposit_withdraws_table',1),(46,'2023_08_19_120611_create_settings_table',1),(47,'2023_08_20_004345_add_status_to_deposit_withdraws_table',1),(48,'2023_08_20_134401_add_profile_photo_to_members',1),(49,'2023_08_20_202426_create_products_table',1),(50,'2023_08_20_211804_create_slides_table',1),(51,'2023_08_24_163357_add_address_to_tbl_members-table=members',1),(52,'2023_08_29_234028_create_notifications_table',1),(53,'2023_08_30_155515_add_image_to_deposit_withdraws_table',1),(54,'2023_08_30_165707_add_dob_to_members_table',1),(56,'2023_09_01_214007_create_sectors_table',2),(60,'2023_09_02_205848_create_product_prices_table',3),(61,'2023_09_06_204939_add_is_active_to_products',4),(62,'2023_09_06_212349_add_datetime_product_prices',4),(66,'2023_09_06_233249_create_buy_sells_table',5),(67,'2023_09_07_232703_add_commission_rate_to_products_table',6),(68,'2023_11_10_162613_add_embedded_graph_to_product_tbl',7),(69,'2023_11_21_205402_add_order_to_table_products',8),(70,'2023_12_27_194251_create_invitation_codes_table',9),(71,'2023_12_27_194270_add_invitation_code_id_to_users_table',9),(72,'2023_12_29_234554_add_credit_score_to_members_table',9),(73,'2024_01_11_121748_add_vip_to_members_table',9),(74,'2024_03_05_225551_add_embedded_graph_to_products_table',9),(75,'2024_03_18_235947_add_withdrawal_code_to_members_table',10),(76,'2024_03_23_155726_add_withdrawal_password_to_members_table',11),(77,'2024_03_26_213519_add_is_crypto_to_products_table',12),(78,'2024_04_21_222723_add_exchange_currency_image_to_settings_table',13);

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

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `model_type` varchar(255) 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_id_model_type_index` (`model_id`,`model_type`),
  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`
--


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

CREATE TABLE `model_has_roles` (
  `role_id` bigint unsigned NOT NULL,
  `model_type` varchar(255) 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_id_model_type_index` (`model_id`,`model_type`),
  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` VALUES (2,'App\\Models\\User',1),(1,'App\\Models\\User',53),(1,'App\\Models\\User',54),(1,'App\\Models\\User',55),(1,'App\\Models\\User',56),(1,'App\\Models\\User',57),(1,'App\\Models\\User',58),(1,'App\\Models\\User',59),(1,'App\\Models\\User',60),(1,'App\\Models\\User',61),(1,'App\\Models\\User',62),(1,'App\\Models\\User',63),(1,'App\\Models\\User',64);

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

CREATE TABLE `notifications` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `already_read` tinyint(1) NOT NULL DEFAULT '0',
  `member_id` bigint unsigned 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=65 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,
  KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


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

CREATE TABLE `permissions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_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`),
  UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permissions` VALUES (1,'role-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(2,'role-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(3,'role-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(4,'role-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(5,'user-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(6,'user-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(7,'user-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(8,'user-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(9,'bank-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(10,'bank-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(11,'bank-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(12,'bank-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(13,'member-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(14,'member-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(15,'member-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(16,'member-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(17,'deposit-withdraw-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(18,'deposit-withdraw-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(19,'deposit-withdraw-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(20,'deposit-withdraw-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(21,'slide-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(22,'slide-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(23,'slide-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(24,'slide-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(25,'report-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(26,'setup-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(27,'product-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(28,'product-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(29,'product-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(30,'product-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(31,'setting-list','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(32,'setting-create','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(33,'setting-edit','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(34,'setting-delete','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(35,'sector-list','web','2023-09-01 14:47:07','2023-09-01 14:47:07'),(36,'sector-create','web','2023-09-01 14:47:07','2023-09-01 14:47:07'),(37,'sector-edit','web','2023-09-01 14:47:07','2023-09-01 14:47:07'),(38,'sector-delete','web','2023-09-01 14:47:07','2023-09-01 14:47:07'),(39,'deposit-promotion','web','2024-03-28 17:19:27','2024-03-28 17:19:27'),(40,'withdraw-promotion','web','2024-03-28 17:19:27','2024-03-28 17:19:27'),(41,'invitationCode-list','web','2024-03-28 17:19:27','2024-03-28 17:19:27'),(42,'invitationCode-create','web','2024-03-28 17:19:27','2024-03-28 17:19:27'),(43,'invitationCode-edit','web','2024-03-28 17:19:27','2024-03-28 17:19:27'),(44,'invitationCode-delete','web','2024-03-28 17:19:27','2024-03-28 17:19:27');

--
-- 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,
  `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 `product_prices`
--

CREATE TABLE `product_prices` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `price` double(15,6) NOT NULL DEFAULT '0.000000',
  `product_id` bigint unsigned DEFAULT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `datetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4499 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_prices`
--

INSERT INTO `product_prices` VALUES (4437,69593.000000,16,1,NULL,'2024-04-01 06:53:20','2024-04-01 06:53:20','2024-04-01 13:53:12'),(4438,69594.000000,16,1,NULL,'2024-04-01 06:53:26','2024-04-01 06:53:26','2024-04-01 13:53:20'),(4439,3626.000000,17,1,NULL,'2024-04-01 07:01:15','2024-04-01 07:01:15','2024-04-01 13:53:26'),(4440,3621.090000,17,1,NULL,'2024-04-01 07:01:19','2024-04-01 07:01:19','2024-04-01 14:01:15'),(4441,0.990000,18,1,NULL,'2024-04-01 07:02:30','2024-04-01 07:02:30','2024-04-01 14:01:19'),(4442,1.068800,18,1,NULL,'2024-04-01 07:02:35','2024-04-01 07:02:35','2024-04-01 14:02:30'),(4443,0.200000,19,1,NULL,'2024-04-01 07:03:01','2024-04-01 07:03:01','2024-04-01 14:02:35'),(4444,0.205832,19,1,NULL,'2024-04-01 07:03:07','2024-04-01 07:03:07','2024-04-01 14:03:01'),(4445,680.000000,20,1,NULL,'2024-04-01 07:03:41','2024-04-01 07:03:41','2024-04-01 14:03:07'),(4446,682.630000,20,1,NULL,'2024-04-01 07:03:46','2024-04-01 07:03:46','2024-04-01 14:03:41'),(4447,105.000000,21,1,NULL,'2024-04-01 07:03:57','2024-04-01 07:03:57','2024-04-01 14:03:46'),(4448,108.060000,21,1,NULL,'2024-04-01 07:04:06','2024-04-01 07:04:06','2024-04-01 14:03:57'),(4449,0.120000,22,1,NULL,'2024-04-01 07:04:23','2024-04-01 07:04:23','2024-04-01 14:04:06'),(4450,0.121501,22,1,NULL,'2024-04-01 07:04:27','2024-04-01 07:04:27','2024-04-01 14:04:23'),(4451,0.617000,23,1,NULL,'2024-04-01 07:04:42','2024-04-01 07:04:42','2024-04-01 14:04:27'),(4452,0.614390,23,1,NULL,'2024-04-01 07:04:48','2024-04-01 07:04:48','2024-04-01 14:04:42'),(4453,0.300000,24,1,NULL,'2024-04-01 07:05:21','2024-04-01 07:05:21','2024-04-01 14:04:48'),(4454,0.340000,24,1,NULL,'2024-04-01 07:05:26','2024-04-01 07:05:26','2024-04-01 14:05:21'),(4455,9.000000,25,1,NULL,'2024-04-01 07:06:22','2024-04-01 07:06:22','2024-04-01 14:05:55'),(4456,9.730000,25,1,NULL,'2024-04-01 07:06:31','2024-04-01 07:06:31','2024-04-01 14:06:22'),(4457,0.650000,26,1,NULL,'2024-04-01 07:06:46','2024-04-01 07:07:08','2024-04-01 14:06:31'),(4458,0.630000,26,1,NULL,'2024-04-01 07:07:18','2024-04-01 07:07:18','2024-04-01 14:07:08'),(4459,1.280000,27,1,NULL,'2024-04-01 07:07:37','2024-04-01 07:07:37','2024-04-01 14:07:18'),(4460,1.288500,27,1,NULL,'2024-04-01 07:07:42','2024-04-01 07:07:42','2024-04-01 14:07:37'),(4461,0.041200,28,1,NULL,'2024-04-01 07:07:55','2024-04-01 07:07:55','2024-04-01 14:07:42'),(4462,0.039465,28,1,NULL,'2024-04-01 07:08:01','2024-04-01 07:08:01','2024-04-01 14:07:55'),(4463,124.000000,29,1,NULL,'2024-04-01 07:08:19','2024-04-01 07:08:19','2024-04-01 14:08:01'),(4464,120.770000,29,1,NULL,'2024-04-01 07:08:23','2024-04-01 07:08:23','2024-04-01 14:08:19'),(4465,29.000000,31,1,NULL,'2024-04-01 07:08:38','2024-04-01 07:08:38','2024-04-01 14:08:23'),(4466,29.580000,31,1,NULL,'2024-04-01 07:08:51','2024-04-01 07:08:51','2024-04-01 14:08:38'),(4467,6970.000000,42,1,'2024-04-01 07:16:53','2024-04-01 07:10:15','2024-04-01 07:16:53','2024-04-01 14:08:51'),(4468,69760.000000,34,1,'2024-04-01 07:13:18','2024-04-01 07:10:57','2024-04-01 07:13:18','2024-04-01 14:10:15'),(4469,69760.000000,32,1,NULL,'2024-04-01 07:11:18','2024-04-01 07:11:18','2024-04-01 14:10:57'),(4470,69727.000000,32,1,NULL,'2024-04-01 07:11:35','2024-04-01 07:11:35','2024-04-01 14:11:19'),(4471,730.000000,33,1,NULL,'2024-04-01 07:12:24','2024-04-01 07:12:24','2024-04-01 14:11:35'),(4472,734.000000,33,1,NULL,'2024-04-01 07:12:33','2024-04-01 07:12:33','2024-04-01 14:12:24'),(4473,4.500000,35,1,NULL,'2024-04-01 07:13:48','2024-04-01 07:13:48','2024-04-01 14:13:31'),(4474,4.900000,35,1,NULL,'2024-04-01 07:13:56','2024-04-01 07:13:56','2024-04-01 14:13:48'),(4475,21.900000,36,1,NULL,'2024-04-01 07:14:12','2024-04-01 07:14:12','2024-04-01 14:13:57'),(4476,22.580000,36,1,NULL,'2024-04-01 07:14:20','2024-04-01 07:14:20','2024-04-01 14:14:12'),(4477,150.000000,37,1,NULL,'2024-04-01 07:14:31','2024-04-01 07:14:31','2024-04-01 14:14:20'),(4478,152.000000,37,1,NULL,'2024-04-01 07:14:37','2024-04-01 07:14:37','2024-04-01 14:14:31'),(4479,69762.000000,38,1,NULL,'2024-04-01 07:15:06','2024-04-01 07:15:06','2024-04-01 14:14:37'),(4480,69760.000000,38,1,NULL,'2024-04-01 07:15:20','2024-04-01 07:15:20','2024-04-01 14:15:06'),(4481,149.000000,39,1,NULL,'2024-04-01 07:15:31','2024-04-01 07:15:31','2024-04-01 14:15:20'),(4482,151.230000,39,1,NULL,'2024-04-01 07:15:41','2024-04-01 07:15:41','2024-04-01 14:15:31'),(4483,607.000000,40,1,NULL,'2024-04-01 07:16:04','2024-04-01 07:16:04','2024-04-01 14:15:41'),(4484,621.000000,40,1,NULL,'2024-04-01 07:16:11','2024-04-01 07:16:11','2024-04-01 14:16:04'),(4485,420.000000,41,1,NULL,'2024-04-01 07:16:24','2024-04-01 07:16:24','2024-04-01 14:16:11'),(4486,423.000000,41,1,NULL,'2024-04-01 07:16:30','2024-04-01 07:16:30','2024-04-01 14:16:24'),(4487,485.000000,42,1,NULL,'2024-04-01 07:18:26','2024-04-01 07:18:26','2024-04-01 14:18:16'),(4488,499.000000,42,1,NULL,'2024-04-01 07:18:31','2024-04-01 07:18:31','2024-04-01 14:18:26'),(4489,180.390000,43,1,NULL,'2024-04-01 07:18:44','2024-04-01 07:18:44','2024-04-01 14:18:31'),(4490,180.750000,43,1,NULL,'2024-04-01 07:18:52','2024-04-01 07:18:52','2024-04-01 14:18:44'),(4491,903.000000,44,1,NULL,'2024-04-01 07:19:08','2024-04-01 07:19:08','2024-04-01 14:18:52'),(4492,913.330000,44,1,NULL,'2024-04-01 07:19:17','2024-04-01 07:19:17','2024-04-01 14:19:08'),(4493,171.200000,45,1,NULL,'2024-04-01 07:19:30','2024-04-01 07:19:30','2024-04-01 14:19:17'),(4494,173.530000,45,1,NULL,'2024-04-01 07:19:37','2024-04-01 07:19:37','2024-04-01 14:19:30'),(4495,176.500000,46,1,NULL,'2024-04-01 07:19:50','2024-04-01 07:19:50','2024-04-01 14:19:37'),(4496,176.000000,46,1,NULL,'2024-04-01 07:20:01','2024-04-01 07:20:01','2024-04-01 14:19:50'),(4497,4.320000,34,1,NULL,'2024-04-01 07:21:51','2024-04-01 07:21:51','2024-04-01 14:20:44'),(4498,4.630000,34,1,NULL,'2024-04-01 07:21:57','2024-04-01 07:21:57','2024-04-01 14:21:51');

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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` int NOT NULL DEFAULT '0',
  `image` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `user_id` bigint unsigned DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `sector_id` bigint unsigned DEFAULT NULL,
  `current_price` double(15,6) NOT NULL DEFAULT '0.000000',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `commission_rate` double(15,6) NOT NULL DEFAULT '100.000000',
  `order` int NOT NULL,
  `embedded_graph` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_crypto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `products` VALUES (16,'BTC',NULL,0,'images/slides/1794883772532412.png',1,NULL,'2024-03-29 17:20:28','2024-04-01 06:53:26',2,69594.000000,1,10.000000,1,'#','1'),(17,'ETH','ETH',0,'images/slides/1794883903975658.png',1,NULL,'2024-03-29 17:51:06','2024-04-01 07:01:19',1,3621.090000,1,10.000000,2,'#','1'),(18,'EOS',NULL,0,'images/slides/1794884305961440.png',1,NULL,'2024-03-29 17:57:26','2024-04-01 07:02:35',2,1.068800,1,10.000000,3,'','1'),(19,'DOGE',NULL,0,'images/slides/1794884561049880.png',1,NULL,'2024-03-29 17:59:25','2024-04-01 07:03:07',2,0.205832,1,10.000000,4,'','1'),(20,'BCH',NULL,0,'images/slides/1794884736328943.png',1,NULL,'2024-03-29 18:04:34','2024-04-01 07:03:46',2,682.630000,1,10.000000,5,'','1'),(21,'LTC',NULL,0,'images/slides/1794884844815281.png',1,NULL,'2024-03-29 18:06:17','2024-04-01 07:04:06',2,108.060000,1,10.000000,6,'','1'),(22,'TRX',NULL,0,'images/slides/1794884969766116.png',1,NULL,'2024-03-29 18:08:16','2024-04-01 07:04:27',2,0.121501,1,10.000000,7,'','1'),(23,'XRP',NULL,0,'images/slides/1794885028325586.png',1,NULL,'2024-03-29 18:09:12','2024-04-01 07:04:48',2,0.614390,1,10.000000,8,'','1'),(24,'IOTA',NULL,0,'images/slides/1794885232850167.png',1,NULL,'2024-03-29 18:12:27','2024-04-01 07:05:26',2,0.340000,1,10.000000,9,'','1'),(25,'FIL',NULL,0,'images/slides/1794885348085838.png',1,NULL,'2024-03-29 18:14:17','2024-04-01 07:06:31',2,9.730000,1,10.000000,10,'','1'),(26,'ADA',NULL,0,'images/slides/1794885527458063.png',1,NULL,'2024-03-29 18:17:08','2024-04-01 07:07:18',2,0.630000,1,10.000000,11,'','1'),(27,'FLOW',NULL,0,'images/slides/1794885599409498.png',1,NULL,'2024-03-29 18:18:17','2024-04-01 07:07:42',2,1.288500,1,10.000000,12,'','1'),(28,'JST',NULL,0,'images/slides/1794885626019916.png',1,NULL,'2024-03-29 18:18:42','2024-04-01 07:08:01',2,0.039465,1,10.000000,13,'','1'),(29,'XMR',NULL,0,'images/slides/1794885664478106.png',1,NULL,'2024-03-29 18:19:19','2024-04-01 07:08:23',2,120.770000,1,10.000000,14,'','1'),(30,'MGI',NULL,0,'images/slides/1794885681228689.jpg',1,NULL,'2024-03-29 18:19:35','2024-03-29 18:25:07',2,0.000000,0,10.000000,15,'','1'),(31,'ZEC',NULL,0,'images/slides/1794885702799265.png',1,NULL,'2024-03-29 18:19:55','2024-04-01 07:08:51',2,29.580000,1,10.000000,16,'','1');

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

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `role_id` bigint 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` VALUES (1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,2),(11,2),(12,2),(13,2),(14,2),(15,2),(16,2),(17,2),(18,2),(19,2),(20,2),(21,2),(22,2),(23,2),(24,2),(25,2),(26,2),(27,2),(28,2),(29,2),(30,2),(31,2),(32,2),(33,2),(34,2),(35,2),(36,2),(37,2),(38,2),(39,2),(40,2),(41,2),(42,2),(43,2),(44,2),(1,3),(2,3),(3,3),(4,3),(5,3),(6,3),(7,3),(8,3),(9,3),(10,3),(11,3),(12,3),(13,3),(14,3),(15,3),(16,3),(17,3),(18,3),(19,3),(20,3),(21,3),(22,3),(23,3),(24,3),(25,3),(26,3),(27,3),(28,3),(29,3),(30,3),(31,3),(32,3),(33,3),(34,3),(35,3),(36,3),(37,3),(38,3),(13,4),(14,4),(15,4),(16,4),(17,4),(18,4),(19,4),(20,4);

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

CREATE TABLE `roles` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_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`),
  UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'Member','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(2,'Admin','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(3,'Supervisor','web','2023-08-30 15:51:29','2023-08-30 15:51:29'),(4,'Staff','web','2023-08-30 15:51:29','2023-08-30 15:51:29');

--
-- Table structure for table `sectors`
--

CREATE TABLE `sectors` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sectors`
--

INSERT INTO `sectors` VALUES (1,'Technologies',1,NULL,'2023-09-01 14:54:05','2023-09-01 14:57:22'),(2,'Education',0,NULL,'2023-09-01 15:15:53','2023-09-02 14:07:15'),(3,'Real Estate',0,NULL,'2023-09-01 15:15:57','2023-09-02 14:07:23');

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `site_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fav_icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `exchange_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` VALUES (1,'IPLUSVIEW','logo.png','fav.ico','THB',1,NULL,'2023-08-30 15:50:29','2024-04-23 08:26:24','images/site_logo/1797113285880153.png');

--
-- Table structure for table `slides`
--

CREATE TABLE `slides` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order` int NOT NULL DEFAULT '0',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  `user_id` bigint unsigned DEFAULT NULL,
  `is_active` int 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`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `slides`
--

INSERT INTO `slides` VALUES (22,1,'images/slides/1794880779954602.png',NULL,1,NULL,'2024-03-29 17:01:41','2024-03-29 17:01:41'),(23,2,'images/slides/1794880793747628.png',NULL,1,NULL,'2024-03-29 17:01:54','2024-03-29 17:01:54'),(24,3,'images/slides/1794880803122028.png',NULL,1,NULL,'2024-03-29 17:02:03','2024-03-29 17:02:03');

--
-- 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,
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `gender` enum('m','f') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'm',
  `is_active` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT 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,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `invitation_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_phone_unique` (`phone`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` VALUES (1,'Admin','0123456','f','1',NULL,'$2y$10$PF6Te4IG3n5dyC65cyjhhunS2.5AaD/rfUxaDdMsKot1KK7fwCQ9G',NULL,'2023-08-30 15:51:29','2023-11-09 10:12:04',NULL,NULL),(64,'','11112222','m','1',NULL,'$2y$10$BbhjgViLZeI41AA8.GfyAOiO9q0jBl4qUwkFLtSoyDz6WDE.OfMae','CJjipWlRllFxLFdpp8TxbX4rRrU75dWxYdcXZu2b3jfIM0k6RFrB6r1ElrOm','2024-03-28 17:45:38','2024-03-28 17:45:38',NULL,'001');


