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

DROP TABLE IF EXISTS `continuous_events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `continuous_events` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `initial_title` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '標題',
  `initial_subtitle` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '副標題',
  `include_currency` json NOT NULL COMMENT '支援幣別',
  `initial_currency` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '初始幣別',
  `conditions_met` enum('continuous','independent') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '達成條件(連續:continuous,獨立:independent)',
  `cycle` enum('month','week') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活動週期',
  `start_week` tinyint DEFAULT NULL COMMENT '星期幾,當活動週期cycle是week時才作用',
  `supplementary` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可以補簽',
  `draft` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為草稿',
  `start_date` datetime DEFAULT NULL COMMENT '活動開始時間',
  `end_date` datetime DEFAULT NULL COMMENT '活動結束時間',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `vip_group` json DEFAULT NULL COMMENT '限制可以參與此活動的VIP等級，如果為空則代表不設限',
  `tags_group` json DEFAULT NULL COMMENT '限制可以參與此活動的標籤族群，如果為空則代表不設限',
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `reset_cycle` tinyint NOT NULL DEFAULT '0' COMMENT '獎勵過期時間',
  PRIMARY KEY (`uid`),
  KEY `continuous_events_initial_title_index` (`initial_title`),
  KEY `continuous_events_initial_currency_index` (`initial_currency`),
  KEY `continuous_events_start_date_end_date_index` (`start_date`,`end_date`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `continuous_events`
--

LOCK TABLES `continuous_events` WRITE;
/*!40000 ALTER TABLE `continuous_events` DISABLE KEYS */;
REPLACE INTO `continuous_events` VALUES (1,2,'快快來簽到','天天拿好禮~!','[\"TWD\"]','TWD',NULL,'week',1,0,0,'2024-11-11 00:00:00','2024-11-15 23:59:59','2024-11-12 06:21:32','2024-11-12 06:29:43','[]','[]',1,0);
/*!40000 ALTER TABLE `continuous_events` 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:24:27
