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

DROP TABLE IF EXISTS `continuous_events_attribute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `continuous_events_attribute` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `continuous_events_uid` bigint unsigned NOT NULL,
  `number` tinyint DEFAULT NULL COMMENT '排序(日、週幾、編號)',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `participating_platforms` json DEFAULT NULL COMMENT '參與平台',
  `type` enum('deposit','withdraw','wager','win','lose','others') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subtype` enum('>','>=','=','<=','<') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '達標條件',
  `value` double DEFAULT NULL COMMENT '達標條件基準值',
  `rewards_type` enum('none','multiplier','amounts','roulettes') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '獎勵類別：無(none)、倍率(multiplier)、固定金額(amounts)、輪盤(roulettes)',
  `rewards_value` double NOT NULL DEFAULT '0' COMMENT '獎勵值',
  `enable_rewards_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用獎勵限制',
  `rewards_limit_type` enum('times','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '獎勵限制為次數或是固定金額',
  `rewards_limit_value` double DEFAULT NULL COMMENT '獎勵限制的數值',
  `enable_wagering_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用洗碼凍結限制',
  `include_principal` tinyint(1) NOT NULL DEFAULT '0' COMMENT '凍結是否包含本金',
  `wagering_limit_type` enum('multiplier','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '洗碼凍結限制為倍率或是固定金額',
  `wagering_limit_value` double DEFAULT NULL COMMENT '洗碼凍結限制的數值',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL,
  `enable_currency_limit` tinyint(1) DEFAULT NULL,
  `rewards_specify_wallet` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '若rewards_position為1，則必須指定發送獎勵到哪個遊戲館',
  `rewards_position` tinyint(1) NOT NULL DEFAULT '0' COMMENT '發送獎勵到哪個部位：0:主錢包,2:輪盤',
  PRIMARY KEY (`uid`),
  KEY `continuous_events_attribute_number_index` (`number`),
  KEY `continuous_events_attribute_currency_index` (`currency`),
  KEY `continuous_events_id` (`continuous_events_uid`),
  CONSTRAINT `continuous_events_id` FOREIGN KEY (`continuous_events_uid`) REFERENCES `continuous_events` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `continuous_events_attribute`
--

LOCK TABLES `continuous_events_attribute` WRITE;
/*!40000 ALTER TABLE `continuous_events_attribute` DISABLE KEYS */;
REPLACE INTO `continuous_events_attribute` VALUES (1,1,1,'TWD',NULL,'wager','>=',0,'amounts',10,0,NULL,NULL,1,0,'multiplier',2,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(2,1,2,'TWD',NULL,'wager','>=',0,'amounts',100,0,NULL,NULL,1,0,'multiplier',2,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(3,1,3,'TWD',NULL,'deposit','>=',0,'amounts',0,0,NULL,NULL,0,0,NULL,NULL,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(4,1,4,'TWD',NULL,'lose','>=',1000,'amounts',500,0,NULL,NULL,1,0,'multiplier',2,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(5,1,5,'TWD',NULL,'deposit','>=',0,'amounts',0,0,NULL,NULL,0,0,NULL,NULL,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(6,1,6,'TWD',NULL,'deposit','>=',0,'amounts',0,0,NULL,NULL,0,0,NULL,NULL,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0),(7,1,7,'TWD',NULL,'deposit','>=',0,'amounts',0,0,NULL,NULL,0,0,NULL,NULL,'2024-11-12 06:21:32','2024-11-12 06:29:43',1,NULL,NULL,0);
/*!40000 ALTER TABLE `continuous_events_attribute` 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:44
