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

DROP TABLE IF EXISTS `rewards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `rewards` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '獎勵名稱',
  `type` enum('multiplier','amounts','roulettes') COLLATE utf8mb4_unicode_ci NOT NULL,
  `base_value` double NOT NULL,
  `calculation_rules` json NOT NULL,
  `position` tinyint(1) NOT NULL DEFAULT '0',
  `specify_wallet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_rewards_limit` tinyint(1) NOT NULL DEFAULT '0',
  `enable_times_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否開啟次數限制',
  `limit_times` int unsigned DEFAULT NULL COMMENT '限制的次數',
  `enable_amounts_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否開啟金額限制',
  `limit_amounts` decimal(30,8) DEFAULT NULL COMMENT '限制的金額',
  `enable_wagering_limit` tinyint(1) NOT NULL DEFAULT '0',
  `include_principal` tinyint(1) NOT NULL DEFAULT '0',
  `wagering_limit_type` enum('multiplier','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wagering_limit_value` double DEFAULT NULL,
  `expiration_days` int unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `can_modify` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否可以修改',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `rewards`
--

LOCK TABLES `rewards` WRITE;
/*!40000 ALTER TABLE `rewards` DISABLE KEYS */;
REPLACE INTO `rewards` VALUES (2,'','amounts',588,'\"[]\"',0,NULL,1,1,1,0,NULL,1,1,'multiplier',2,10,'2025-01-10 10:10:28','2025-01-14 08:26:27',1),(3,'','amounts',288,'\"[]\"',0,NULL,1,1,1,1,288.00000000,1,0,'multiplier',10,100,'2025-01-10 10:21:50','2025-01-13 09:57:33',1),(4,'','multiplier',0,'\"[]\"',0,NULL,0,0,NULL,0,NULL,0,0,NULL,NULL,1,'2025-01-10 14:16:29','2025-01-14 01:56:03',1),(5,'288','amounts',288,'[]',0,NULL,1,1,1,0,NULL,1,0,'multiplier',1,7,'2025-01-16 10:14:43','2025-01-16 10:14:43',1);
/*!40000 ALTER TABLE `rewards` 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:31
