-- MySQL dump 10.13  Distrib 8.0.40, for Linux (x86_64)
--
-- Host: localhost    Database: happy_paradise
-- ------------------------------------------------------
-- Server version	8.0.40-0ubuntu0.22.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `product`
--

DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_type_uid` bigint unsigned NOT NULL,
  `currency` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_point` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '兌換點數',
  `product_sale_point` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '特價點數',
  `is_store_pickup` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否超取',
  `is_delivery` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否宅配',
  `stock` int unsigned NOT NULL DEFAULT '0' COMMENT '庫存數量',
  `highlight` int unsigned NOT NULL DEFAULT '0',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '0:未上架,1:已上架,2:無庫存,3:刪除',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `cagent_uid` int unsigned NOT NULL,
  `shipping_fee_required` tinyint DEFAULT '0' COMMENT '是否需要運費',
  `on_sale` tinyint DEFAULT '0' COMMENT '是否特價',
  `delivery_fee` int DEFAULT '0' COMMENT '宅配費',
  PRIMARY KEY (`uid`),
  KEY `product_product_type_uid_foreign` (`product_type_uid`),
  KEY `product_cagent_uid_index` (`cagent_uid`),
  KEY `product_created_at_index` (`created_at`),
  KEY `product_status_index` (`status`),
  KEY `product_currency_foreign` (`currency`),
  CONSTRAINT `product_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`),
  CONSTRAINT `product_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`),
  CONSTRAINT `product_product_type_uid_foreign` FOREIGN KEY (`product_type_uid`) REFERENCES `product_type` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='市集商品';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product`
--

LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
REPLACE INTO `product` VALUES (1,3,'TWD',29900.00000000,29900.00000000,1,1,100,0,3,'2024-10-23 08:48:09','2024-10-24 07:25:35','2024-11-11 09:37:41',2,0,0,0),(2,6,'TWD',16180.00000000,16180.00000000,1,1,97,0,3,'2024-10-24 06:35:39','2024-11-11 09:03:24','2024-11-11 09:37:35',2,0,0,0),(3,7,'TWD',39900.00000000,39900.00000000,1,1,100,0,3,'2024-10-24 06:38:47','2024-10-24 06:40:41','2024-11-11 09:37:29',2,0,0,0),(4,3,'TWD',51900.00000000,51900.00000000,0,1,98,0,3,'2024-10-24 09:55:08','2024-11-11 07:26:05','2024-11-11 07:46:46',2,0,0,0),(5,3,'TWD',6000.00000000,6000.00000000,0,1,100,0,3,'2024-10-24 10:06:56',NULL,'2024-11-11 07:46:39',2,0,0,0),(6,1,'TWD',300000.00000000,300000.00000000,0,1,100,0,3,'2024-10-24 10:12:10',NULL,'2024-10-24 10:13:09',2,0,0,0),(7,1,'TWD',999999.00000000,999999.00000000,1,1,90,0,3,'2024-10-24 10:22:16','2024-11-11 07:39:20','2024-11-11 07:46:32',2,0,0,0),(8,3,'TWD',29900.00000000,29900.00000000,1,1,998,0,3,'2024-11-11 09:43:13','2024-11-12 07:09:25','2025-01-16 22:35:56',2,0,0,0),(9,3,'TWD',36900.00000000,36900.00000000,1,1,99,0,3,'2024-11-11 09:45:57','2024-11-12 07:40:06','2025-01-16 22:35:43',2,0,0,0),(10,3,'TWD',39999.00000000,39999.00000000,1,1,999,0,1,'2024-11-12 11:42:07','2025-01-16 22:35:27',NULL,2,0,0,0),(11,3,'TWD',36799.00000000,36799.00000000,1,1,100,0,1,'2024-11-12 11:45:02','2025-01-16 22:33:03',NULL,2,0,0,0),(12,3,'TWD',40599.00000000,40599.00000000,1,1,100,0,1,'2024-11-12 11:48:20','2025-01-16 22:31:30',NULL,2,0,0,0),(13,3,'TWD',49399.00000000,49399.00000000,1,1,100,0,1,'2024-11-12 11:51:01','2025-01-16 22:29:25',NULL,2,0,0,0),(14,3,'TWD',14899.00000000,14899.00000000,1,1,100,0,1,'2024-11-12 11:56:16','2025-01-16 22:26:56',NULL,2,0,0,0),(15,3,'TWD',30699.00000000,30699.00000000,1,1,100,0,1,'2024-11-12 11:58:41','2025-01-16 22:25:27',NULL,2,0,0,0),(16,3,'TWD',6599.00000000,6599.00000000,1,1,100,0,1,'2024-11-12 12:00:52','2025-01-16 22:23:35',NULL,2,0,0,0),(17,3,'TWD',8999.00000000,8999.00000000,1,1,100,0,1,'2024-11-12 12:04:42','2025-01-16 22:22:23',NULL,2,0,0,0),(18,3,'TWD',18899.00000000,18899.00000000,1,1,100,0,1,'2024-11-12 12:07:04','2025-01-16 22:16:39',NULL,2,0,0,0),(19,6,'TWD',16999.00000000,16999.00000000,1,1,100,0,1,'2024-11-12 12:12:42','2025-01-16 22:14:48',NULL,2,0,0,0),(20,6,'TWD',11099.00000000,11099.00000000,1,1,100,0,1,'2024-11-12 12:15:17','2025-01-16 22:13:34',NULL,2,0,0,0),(21,6,'TWD',18499.00000000,18499.00000000,1,1,100,0,1,'2024-11-12 12:17:26','2025-01-16 22:12:17',NULL,2,0,0,0),(22,6,'TWD',26699.00000000,26699.00000000,1,1,100,0,1,'2024-11-12 12:21:06','2025-01-16 22:09:35',NULL,2,0,0,0),(23,6,'TWD',14399.00000000,14399.00000000,1,1,100,0,1,'2024-11-12 12:22:52','2025-01-16 22:07:47',NULL,2,0,0,0),(24,6,'TWD',17299.00000000,17299.00000000,1,1,100,0,1,'2024-11-12 12:26:33','2025-01-16 22:06:05',NULL,2,0,0,0),(25,6,'TWD',165999.00000000,165999.00000000,1,1,100,0,1,'2024-11-12 12:28:46','2025-01-16 22:04:17',NULL,2,0,0,0),(26,6,'TWD',10999.00000000,10999.00000000,1,1,100,0,1,'2024-11-12 12:31:05','2025-01-16 22:00:36',NULL,2,0,0,0),(27,6,'TWD',9999.00000000,9999.00000000,1,1,100,0,1,'2024-11-12 12:33:22','2025-01-16 21:57:53',NULL,2,0,0,0),(28,6,'TWD',7799.00000000,7799.00000000,1,1,100,0,1,'2024-11-12 12:40:28','2025-01-16 21:57:30',NULL,2,0,0,0),(29,6,'TWD',7799.00000000,7799.00000000,1,1,100,0,1,'2024-11-12 12:41:50','2025-01-16 21:56:51',NULL,2,0,0,0),(30,6,'TWD',6199.00000000,6199.00000000,1,1,100,0,1,'2024-11-12 12:45:01','2025-01-16 21:56:15',NULL,2,0,0,0),(31,6,'TWD',78999.00000000,78999.00000000,1,1,100,0,1,'2024-11-12 12:50:30','2025-01-09 21:17:48',NULL,2,0,0,0),(32,6,'TWD',21599.00000000,21599.00000000,1,1,100,0,1,'2024-11-12 12:52:08','2025-01-09 21:14:26',NULL,2,0,0,0),(33,7,'TWD',47999.00000000,47999.00000000,1,1,100,0,1,'2024-11-12 12:53:44','2025-01-09 21:13:12',NULL,2,0,0,0),(34,6,'TWD',12599.00000000,12599.00000000,1,1,100,0,1,'2024-11-12 12:56:28','2025-01-09 21:11:57',NULL,2,0,0,0),(35,8,'TWD',599999.00000000,599999.00000000,1,1,100,0,1,'2024-11-12 13:00:30','2025-01-09 21:10:50',NULL,2,0,0,0),(36,8,'TWD',13999.00000000,13999.00000000,1,1,100,0,1,'2024-11-12 13:06:06','2025-01-09 21:04:33',NULL,2,0,0,0),(37,8,'TWD',15600.00000000,15600.00000000,1,1,100,0,3,'2024-11-12 13:10:29',NULL,'2024-11-12 13:12:02',2,0,0,0),(38,8,'TWD',29999.00000000,29999.00000000,1,1,100,0,1,'2024-11-12 13:15:37','2025-01-09 21:01:07',NULL,2,0,0,0),(39,8,'TWD',106599.00000000,106599.00000000,1,1,100,0,1,'2024-11-12 13:17:28','2025-01-09 20:59:21',NULL,2,0,0,0),(40,8,'TWD',30699.00000000,30699.00000000,1,1,100,0,1,'2024-11-12 13:18:32','2025-01-09 20:49:48',NULL,2,0,0,0),(41,9,'TWD',26399.00000000,26399.00000000,1,1,100,0,1,'2024-11-12 13:20:17','2025-01-09 20:47:49',NULL,2,0,0,0),(42,9,'TWD',414599.00000000,414599.00000000,1,1,100,0,1,'2024-11-12 13:21:51','2025-01-09 20:45:52',NULL,2,0,0,0),(43,9,'TWD',20999.00000000,20999.00000000,1,1,100,0,1,'2024-11-12 13:24:05','2025-01-09 20:41:53',NULL,2,0,0,0),(44,9,'TWD',96999.00000000,96999.00000000,1,1,100,0,1,'2024-11-12 13:25:47','2025-01-09 20:40:05',NULL,2,0,0,0),(45,9,'TWD',16999.00000000,16999.00000000,1,1,100,0,1,'2024-11-12 13:27:06','2025-01-09 20:36:47',NULL,2,0,0,0),(46,9,'TWD',28499.00000000,28499.00000000,1,1,100,0,1,'2024-11-12 13:28:07','2025-01-09 20:31:13',NULL,2,0,0,0),(47,5,'TWD',839.00000000,839.00000000,1,1,100,0,1,'2024-11-12 13:28:44','2025-01-09 20:29:39',NULL,2,0,0,0),(48,4,'TWD',149399.00000000,149399.00000000,1,1,100,0,1,'2024-11-12 13:30:50','2025-01-09 20:26:47',NULL,2,0,0,0),(49,4,'TWD',125399.00000000,125399.00000000,1,1,100,0,1,'2024-11-12 13:32:09','2025-01-09 20:23:27',NULL,2,0,0,0),(50,4,'TWD',128499.00000000,128499.00000000,1,1,100,0,1,'2024-11-12 13:33:03','2025-01-09 20:18:32',NULL,2,0,0,0),(51,4,'TWD',696999.00000000,696999.00000000,1,1,100,0,1,'2024-11-12 13:34:15','2025-01-09 20:15:18',NULL,2,0,0,0),(52,4,'TWD',1869999.00000000,1869999.00000000,1,1,100,0,1,'2024-11-12 13:37:01','2025-01-09 20:11:33',NULL,2,0,0,0),(53,4,'TWD',125999.00000000,125999.00000000,1,1,100,0,1,'2024-11-12 13:38:59','2025-01-09 20:09:29',NULL,2,0,0,0),(54,1,'TWD',538000.00000000,538000.00000000,1,1,100,0,3,'2024-11-12 13:40:36',NULL,'2025-01-09 20:05:37',2,0,0,0),(55,1,'TWD',260000.00000000,260000.00000000,1,1,100,0,3,'2024-11-12 13:43:00','2024-11-12 13:44:00','2025-01-09 20:05:20',2,0,0,0),(56,1,'TWD',2125000.00000000,2125000.00000000,1,1,100,0,3,'2024-11-12 13:45:28',NULL,'2025-01-09 20:05:13',2,0,0,0),(57,1,'TWD',4399.00000000,4399.00000000,1,1,100,0,1,'2024-11-12 13:48:06','2025-01-09 18:25:58',NULL,2,0,0,0),(58,10,'TWD',8999.00000000,8999.00000000,1,1,100,0,1,'2024-11-12 13:50:48','2025-01-09 18:16:21',NULL,2,0,0,0),(59,10,'TWD',999.00000000,999.00000000,1,1,100,0,1,'2024-11-12 13:55:27','2025-01-14 11:48:40',NULL,2,0,0,0),(60,10,'TWD',849.00000000,849.00000000,1,1,100,0,3,'2024-11-12 13:58:07',NULL,'2025-01-09 17:52:10',2,0,0,0),(61,10,'TWD',849.00000000,849.00000000,1,1,100,0,1,'2024-11-12 14:00:12','2025-01-09 17:51:35',NULL,2,0,0,0),(62,10,'TWD',799.00000000,799.00000000,1,1,100,0,1,'2024-11-12 14:01:03','2025-01-09 17:14:07',NULL,2,0,0,0),(63,10,'TWD',2999.00000000,2999.00000000,1,1,100,0,1,'2024-11-12 14:07:10','2025-01-09 20:32:38',NULL,2,0,0,0),(64,10,'TWD',949.00000000,949.00000000,1,1,100,0,1,'2024-11-12 14:08:25','2025-01-09 17:05:42',NULL,2,0,0,0),(65,10,'TWD',899.00000000,899.00000000,1,1,97,0,1,'2024-11-12 14:09:45','2025-01-13 05:56:41',NULL,2,0,0,0);
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-01-20 19:22:25
