/*!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 */;
DROP TABLE IF EXISTS `API_KEY`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `API_KEY` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `API_key` text COLLATE utf8mb4_unicode_ci,
  `env` tinyint(1) NOT NULL DEFAULT '0',
  `is_new` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `all_platform`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `all_platform` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '前端和客戶會看到的名稱 (可以修改的平臺名稱)',
  `platform_mode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'single' COMMENT '该平台模式转账还是单一',
  `supported_currencies` json DEFAULT NULL COMMENT '该品牌支持的货币，以JSON格式存储',
  `platform_enum` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '个平台的固定常量(不可修改)',
  `game_wallet_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '加游戏必须确保相同',
  `is_under_maintenance` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否進行挂維護',
  `is_exclusive_brand` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為獨家平臺',
  `maintenance_day_of_week` tinyint(1) NOT NULL DEFAULT '0' COMMENT '維護星期',
  `maintenance_start_time` time NOT NULL DEFAULT '00:00:00' COMMENT '維護開始時間',
  `maintenance_end_time` time NOT NULL DEFAULT '00:00:00' COMMENT '維護結束時間',
  `not_supported_iframe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '該平臺是否不支援iframe',
  `status_front` tinyint(1) NOT NULL DEFAULT '0' COMMENT '前台品牌顯示1開0關',
  `status_backend` tinyint(1) NOT NULL DEFAULT '0' COMMENT '後台報表顯示1開0關',
  `is_scheduled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '扩充: 是否启用排程任务',
  `commission` double(30,8) NOT NULL DEFAULT '0.10000000' COMMENT '扩充: 原廠抽成0~1',
  `enable_buffer_wallet` tinyint(1) DEFAULT '0' COMMENT '使否啟用緩衝錢包機制，{0:關閉，1:開啟}',
  `bet_log_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '遊戲資訊，不含前綴(prefix)的表格名稱',
  `report_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '報表、詳細紀錄(用API從原廠抓取的)，不含前綴(prefix)的表格名稱',
  `primary_key` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '歷程表的唯一鍵',
  `member_info_uid_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '會員編號在該館別的欄位名稱',
  `date_time_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'date時間欄位名稱',
  `date_time_timezone` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'date時間欄位的時區範例:"+8"',
  `unix_time_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '時間戳欄位名稱',
  `report_time_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲帳務時間所使用的欄位名稱',
  `round_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲回合的欄位名稱',
  `order_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲局別的欄位名稱',
  `amount_before_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易前餘額欄位名稱',
  `amount_name` text COLLATE utf8mb4_unicode_ci COMMENT '交易金额欄位名稱',
  `amount_after_name` text COLLATE utf8mb4_unicode_ci COMMENT '交易后餘額欄位名稱',
  `win` text COLLATE utf8mb4_unicode_ci COMMENT '贏金額欄位或公式',
  `win_or_lose` text COLLATE utf8mb4_unicode_ci COMMENT '輸贏欄位或公式',
  `jack_port_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'JackPort欄位名稱',
  `game_id_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '遊戲ID欄位名稱',
  `user_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家遊戲名稱欄位',
  `transaction_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易狀態欄位或公式',
  `transaction_status_judgment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易狀態Enum',
  `oem_order_detail_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '原廠查訂單明細用ID',
  `oem_order_detail_option` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '原廠查訂單明細用，填充選項',
  `sum_bet_order` text COLLATE utf8mb4_unicode_ci COMMENT 'select計算下注額的mysql指令(不含where條件)',
  `sum_win_order` text COLLATE utf8mb4_unicode_ci COMMENT 'select計算輸贏額的mysql指令(不含where條件)',
  `excluding_cancelled` text COLLATE utf8mb4_unicode_ci COMMENT 'mysql指令中where的條件子句，排除取消單',
  `other_conditions` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '動態搜尋用的其他條件',
  `sum_valid_bet` text COLLATE utf8mb4_unicode_ci COMMENT '有效投注欄位',
  `table_style` tinyint(1) DEFAULT NULL COMMENT '表格顯示樣式(1:911模式,0:新模式)',
  `game_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '平台遊戲類別',
  `sort` int DEFAULT '0' COMMENT '平台排序',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `cagent_bet_limit_count` int NOT NULL DEFAULT '0' COMMENT '代理限紅設定最大數量',
  `temp_maintenance_start_time` datetime DEFAULT NULL COMMENT '臨時維護時間',
  `temp_maintenance_end_time` datetime DEFAULT NULL COMMENT '臨時維護時間',
  `player_id_fix` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家帳號名稱後綴',
  `bet_limit_count` int NOT NULL DEFAULT '0',
  `vendor_profit` decimal(15,2) NOT NULL DEFAULT '0.00',
  `vendor_profit_admin` decimal(15,2) NOT NULL DEFAULT '0.00',
  `vendor_share_winlose` tinyint NOT NULL DEFAULT '0',
  `oem_order_use_model` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '0=>顯示原廠url, 1=>顯示多筆下注的model',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `platform_enum_unique` (`platform_enum`),
  UNIQUE KEY `all_platform_platform_enum_unique` (`platform_enum`),
  KEY `platform_mode_idx` (`platform`,`platform_mode`),
  KEY `front_back_status_idx` (`status_front`,`status_backend`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `all_platform_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `all_platform_config` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `all_platform_uid` int unsigned NOT NULL COMMENT '平台UID',
  `is_bet_limit_required` tinyint(1) NOT NULL DEFAULT '1' COMMENT '限紅是否必填',
  `vendor_profit` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '廠商佔成比',
  `vendor_profit_admin` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '廠商佔成比_admin',
  `vendor_share_winlose` tinyint(1) NOT NULL DEFAULT '0' COMMENT '原廠是否分擔輸贏',
  `vendor_donate_profit` decimal(15,2) NOT NULL DEFAULT '50.00' COMMENT '廠商打賞佔成比',
  `create_time` datetime NOT NULL COMMENT '創建時間',
  `machine_exclusion_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '機台預設排除狀態',
  PRIMARY KEY (`uid`),
  KEY `all_platform_uid_IDX` (`all_platform_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='平台設定表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `backend_action_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `backend_action_logs` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '表的主鍵',
  `cagent_uid` bigint unsigned NOT NULL COMMENT '執行操作的用戶ID',
  `action_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '執行的操作類型',
  `original_data` text COLLATE utf8mb4_unicode_ci COMMENT '操作前的原始數據',
  `updated_data` text COLLATE utf8mb4_unicode_ci COMMENT '操作後的數據',
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '執行操作的用戶IP地址',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  `target_uid` int unsigned DEFAULT NULL COMMENT '目標UID',
  `target_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '目標類型',
  PRIMARY KEY (`uid`),
  KEY `backend_action_logs_cagent_uid_index` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `base_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_configs` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `zero_child_modify_configs` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许0级子账号修改base_configs（1: 开启, 0: 关闭）。',
  `open_registration` tinyint(1) NOT NULL DEFAULT '0' COMMENT '注册开关 1:开启 0:关闭',
  `open_store` tinyint(1) DEFAULT '0' COMMENT '是否開啟市集,1:是,0:否',
  `is_under_maintenance` tinyint(1) DEFAULT '0' COMMENT '是否正在維護,1:是,0:否',
  `open_pop_up` tinyint(1) DEFAULT '0' COMMENT '是否開啟彈跳功能',
  `roulettes_activity` tinyint(1) NOT NULL DEFAULT '0' COMMENT '轮盘活动状态1:启用0:关闭',
  `email_verification` tinyint(1) NOT NULL DEFAULT '0' COMMENT '简讯验证注册状态1:启用0:关闭',
  `bing_id_card` tinyint(1) DEFAULT '0' COMMENT '綁定身分ID,1:是,0:否',
  `check_in_activity` tinyint(1) NOT NULL DEFAULT '0' COMMENT '簽到活動1:启用0:关闭',
  `profit_ranking_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '前台排行榜狀態1:启用0:关闭',
  `app_download_open` tinyint(1) NOT NULL DEFAULT '0' COMMENT '使否開啟下載按鈕',
  `vip_open` tinyint(1) DEFAULT '0' COMMENT 'VIP的顯示開關',
  `level_limit` int NOT NULL DEFAULT '7' COMMENT '代理最低能创到几级(不能修改)',
  `web_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '网站名称',
  `default_passwd` varchar(35) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家/代理默认密码',
  `default_currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'IDR' COMMENT '網站默认幣別',
  `player_prefix` char(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '转账钱包玩家名称前缀(不能修改,一开始就决定了)',
  `special_setting` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '站台名称，有特殊设置在代码写死用的(不能修改,一开始就决定了)',
  `base_cagent_level1` int DEFAULT NULL COMMENT '创玩家的默认代理(不能修改,一开始就决定了)',
  `base_cagent_level2` int DEFAULT NULL COMMENT '创玩家的默认代理(注意:如果需把总代理玩家，指定在level2分代理，把"-"改为代理名称(默认值"-"))(不能修改,一开始就决定了)',
  `base_cagent_level` int NOT NULL DEFAULT '0' COMMENT '创玩家的默认代理的最低等级(注意:如果base_cagent_level2该栏位有设定代理，就需要改为该代理的等级 2 (默认值1(总代理)))不能修改,一开始就决定了',
  `base_cagent_uid` int NOT NULL DEFAULT '1' COMMENT '创玩家的默认代理的uid(注意:如果base_cagent_level2该栏位有设定代理，就需要改为该代理的UID(默认值2(总代理UID)))不能修改,一开始就决定了',
  `allow_domain_url` json NOT NULL COMMENT '允许网域',
  `app_download_url` json NOT NULL COMMENT 'app下载网域',
  `communication_url` json NOT NULL COMMENT '通信软体的URL(比如FB，youtube等)',
  `web_language` json NOT NULL COMMENT '支援的語言',
  `web_style` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '預設網站顏色',
  `web_style_config` json NOT NULL COMMENT '設定的顏色樣式',
  `expected_web_name` json NOT NULL COMMENT '要排除的網域名稱',
  `customer_service_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '前台客服網址',
  `pc_file_download_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '點腦檔案下載連結',
  `background_maintenance` tinyint(1) NOT NULL DEFAULT '0' COMMENT '後台維護',
  `amount_at_risk` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '轉入/出風控額度',
  `daily_create_member` int NOT NULL DEFAULT '30' COMMENT '每日創建會員數量',
  `daily_create_cagent` int NOT NULL DEFAULT '10' COMMENT '每日創建代理數量',
  PRIMARY KEY (`uid`),
  KEY `zero_child_modify_configs_idx` (`zero_child_modify_configs`),
  KEY `open_registration_idx` (`open_registration`),
  KEY `web_name_idx` (`web_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `base_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_language` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `lang_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言名稱',
  `lang_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言代碼',
  `lang_itef` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言ITEF',
  `lang_timezone` text COLLATE utf8mb4_unicode_ci COMMENT '語言時區',
  `lang_json` text COLLATE utf8mb4_unicode_ci COMMENT 'json檔案',
  `is_active` int unsigned NOT NULL COMMENT '是否啟用',
  PRIMARY KEY (`uid`),
  KEY `base_language_lang_code_index` (`lang_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `blacklist`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `blacklist` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `type` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '類別(ip, bank, country)',
  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  PRIMARY KEY (`uid`),
  KEY `type_idx` (`type`),
  KEY `blacklist_cagent_uid_foreign` (`cagent_uid`),
  CONSTRAINT `blacklist_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_uid` int unsigned NOT NULL,
  `level` tinyint DEFAULT NULL,
  `cagent_path` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cagent_game_permission_uid` int unsigned DEFAULT NULL COMMENT '代理遊戲權限的Id',
  `machine_game_permission_uid` int unsigned DEFAULT NULL COMMENT '機台用的遊戲權限UID',
  `cagent_profit_uid` int unsigned DEFAULT NULL COMMENT '代理的基本佔成Id',
  `cagent_game_profit_uid` int unsigned DEFAULT NULL COMMENT '代理遊戲佔成ID',
  `cagent_game_rebate_uid` int unsigned DEFAULT NULL COMMENT '代理遊戲返水ID',
  `cagent_page_permission_uid` int unsigned DEFAULT NULL COMMENT '代理頁面訪問權限的Id',
  `oauth_ts` int DEFAULT NULL,
  `type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cagent' COMMENT '賬號類型 admin, cagent, child , 資料類型請不要設定enum,在程式裏面實現',
  `engineer` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是不是工程帳號0:否,1:是',
  `nick_name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `login_name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `true_name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '真實姓名(選填)',
  `name_set` tinyint NOT NULL DEFAULT '0' COMMENT '已經設定loginname1是0否',
  `passwd` varchar(70) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密碼',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '參考表person_status_code',
  `create_time` datetime DEFAULT NULL COMMENT '建立時間',
  `create_ts` int DEFAULT NULL,
  `game_profit_json` json DEFAULT NULL COMMENT '額外設定遊戲返水data,就不用cagent_game_profit_uid',
  `game_permission_json` json DEFAULT NULL COMMENT 'cagent2(大股東)有額外設定遊戲的權限',
  `remove_game_permission_json` json DEFAULT NULL COMMENT 'cagent2(大股東)底下的代理排除的遊戲權限',
  `mobile` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手機號碼(選填)',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電子信箱',
  `banduid` int unsigned NOT NULL DEFAULT '0' COMMENT '綁定的Line Id',
  `member_rebate` decimal(3,3) DEFAULT '0.000',
  `hide` tinyint(1) DEFAULT '0' COMMENT '隱藏的帳號',
  `withdraw_password` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdraw_password_set` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已設提款密碼',
  `telegram_binded` tinyint(1) NOT NULL DEFAULT '0',
  `cash_register_deduction` tinyint(1) NOT NULL DEFAULT '0' COMMENT '紙鈔機入鈔是否扣款(預設關閉)(1開啟0關閉)',
  `site_type` enum('ds88','gd88','zun789') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ds88' COMMENT '站別類型(飛龍專用)',
  `profit_type` enum('profit','rebate') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分潤類型',
  `google2fa_secret` text COLLATE utf8mb4_unicode_ci,
  `google2fa_enable` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `cagent_cagent_unique` (`cagent`),
  UNIQUE KEY `cagent_login_name_unique` (`login_name`),
  KEY `parent_type_idx` (`parent_uid`,`type`),
  KEY `game_permission_idx` (`cagent_game_permission_uid`),
  KEY `game_profit_idx` (`cagent_game_profit_uid`),
  KEY `page_permission_idx` (`cagent_page_permission_uid`),
  KEY `cagent_path_idx` (`cagent_path`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_bet_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_bet_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned DEFAULT NULL,
  `game_bet_limit_uid` int unsigned DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_commission_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_commission_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `cagent_wallet_uid` int unsigned NOT NULL COMMENT '代理錢包UID',
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `commission` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '傭金',
  `commission_before` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '傭金轉前',
  `commission_after` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '傭金轉後',
  `commission_start` datetime NOT NULL COMMENT '結算起',
  `commission_end` datetime NOT NULL COMMENT '結算迄',
  `commission_month_week` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '結算年月Y-m-w',
  `log` json NOT NULL COMMENT '原始資料',
  `create_time` datetime NOT NULL COMMENT '創建時間',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `unique_cagent_commission` (`cagent_uid`,`commission_month_week`),
  KEY `cagent_commission_log_cagent_uid_index` (`cagent_uid`),
  KEY `cagent_commission_log_currency_index` (`currency`),
  CONSTRAINT `cagent_commission_log_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_game_permission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_game_permission` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '設定名稱',
  `cannot_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不能被刪除',
  `permission` json DEFAULT NULL COMMENT '遊戲權限',
  PRIMARY KEY (`uid`),
  KEY `cagent_name_idx` (`cagent_uid`,`name`),
  CONSTRAINT `cagent_game_permission_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理遊戲權限設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_game_profit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_game_profit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `type` enum('cagent','member') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '類別,代理或會員',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '設定名稱',
  `cannot_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不能被刪除',
  `profit` json DEFAULT NULL COMMENT '佔成%數設定',
  `current_profit` json DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `cagent_name_idx` (`cagent_uid`,`name`),
  CONSTRAINT `cagent_game_profit_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理佔成設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_game_rebate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_game_rebate` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '設定名稱',
  `cannot_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不能被刪除',
  `rebate` json DEFAULT NULL COMMENT '佔成%數設定',
  `current_rebate` json DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `cagent_name_idx` (`cagent_uid`,`name`),
  CONSTRAINT `cagent_game_rebate_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='遊戲返水設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_login_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `device` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '裝置',
  `country` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '國家',
  `domain` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '網址',
  `create_time` datetime DEFAULT NULL,
  `create_ts` int NOT NULL,
  `memo` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  KEY `ip_idx` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理登入日誌';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_page_permission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_page_permission` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '設定名稱(不可改)',
  `custom_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '自訂名稱',
  `page_permission` json DEFAULT NULL COMMENT '頁面權限設定',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '顯示狀態,1開0關',
  PRIMARY KEY (`uid`),
  KEY `name_idx` (`name`),
  KEY `custom_name_idx` (`custom_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理頁面權限設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_profit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_profit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '設定名稱',
  `cannot_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不能被刪除',
  `profit` json DEFAULT NULL COMMENT '佔成%數設定',
  PRIMARY KEY (`uid`),
  KEY `cagent_name_idx` (`cagent_uid`,`name`),
  CONSTRAINT `cagent_profit_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理基本佔成設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_promo_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_promo_code` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `promo_code_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '推廣碼名稱',
  `promo_code_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '推廣碼URL',
  `web_style` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '網站樣式',
  `is_active` tinyint(1) NOT NULL COMMENT '是否啟用',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_set_hash`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_set_hash` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int NOT NULL,
  `is_set` int NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='檢查是否已經設定過密碼雜湊';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_setting_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_setting_history` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `cagent` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '代理',
  `parent_uid` int unsigned NOT NULL,
  `level` tinyint DEFAULT NULL,
  `cagent_path` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cagent_profit` json NOT NULL COMMENT '代理佔成設定',
  `cagent_game_profit` json NOT NULL COMMENT '代理遊戲佔成設定',
  `cagent_game_rebate` json NOT NULL COMMENT '代理遊戲反水設定',
  `member_rebate` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '玩家反水',
  `history_date` date NOT NULL COMMENT '設定歷史日期',
  `created_at` datetime NOT NULL COMMENT '創建時間',
  `profit_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分潤類型',
  PRIMARY KEY (`uid`),
  KEY `cagent_setting_history_cagent_uid_index` (`cagent_uid`),
  KEY `cagent_setting_history_history_date_index` (`history_date`),
  KEY `cagent_setting_history_cagent_uid_history_date_index` (`cagent_uid`,`history_date`),
  CONSTRAINT `cagent_setting_history_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理訊息設定歷史封存';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_statistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_statistics` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL COMMENT '日期',
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `statistics_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '統計名稱',
  `statistics_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '當前額度',
  `created_at` datetime NOT NULL COMMENT '創建時間',
  `updated_at` datetime NOT NULL COMMENT '更新時間',
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_statistics_name_IDX` (`cagent_uid`,`statistics_name`),
  KEY `date_cagent_uid_statistics_name_IDX` (`date`,`cagent_uid`,`statistics_name`),
  KEY `date_IDX` (`date`),
  KEY `cagent_uid_IDX` (`cagent_uid`),
  KEY `statistics_name_IDX` (`statistics_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理每日統計額度控管表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_telegram_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_telegram_info` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL COMMENT 'cagent ID，每個cagent只能綁定一個',
  `telegram_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telegram_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telegram_verified_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `cagent_telegram_info_cagent_uid_unique` (`cagent_uid`),
  CONSTRAINT `cagent_telegram_info_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_wallet`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_wallet` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `wallet_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'currency-代理uid',
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `point` decimal(30,8) NOT NULL COMMENT '交易前錢包餘額',
  `commission` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '代理傭金',
  PRIMARY KEY (`uid`),
  KEY `cagent_wallet_cagent_uid_index` (`cagent_uid`),
  KEY `cagent_wallet_currency_index` (`currency`),
  CONSTRAINT `cagent_wallet_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_wallet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_wallet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `receiver_giver_uid` int unsigned NOT NULL COMMENT '接收者或施予者ID',
  `from` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payer，付款方',
  `to` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payee，收款方',
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收款方type',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `transhash` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易序號',
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱，Emun',
  `transfer_before` decimal(30,8) NOT NULL COMMENT '交易前錢包餘額',
  `transfer_point` decimal(30,8) NOT NULL COMMENT '交易額度',
  `transfer_after` decimal(30,8) NOT NULL COMMENT '交易後錢包餘額',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '備註',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `cagent_wallet_log_cagent_uid_currency_created_at_index` (`cagent_uid`,`currency`,`created_at`),
  KEY `cagent_wallet_log_currency_index` (`currency`),
  KEY `cagent_wallet_log_action_index` (`action`),
  KEY `cagent_wallet_log_from_index` (`from`),
  KEY `cagent_wallet_log_to_index` (`to`),
  KEY `cagent_wallet_log_created_at_index` (`created_at`),
  CONSTRAINT `cagent_wallet_log_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cagent_withdrawals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cagent_withdrawals` (
  `withdrawal_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '提款訂單唯一標識符, 自動遞增的整數',
  `withdrawal_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '格式化的提款訂單號',
  `withdrawal_type` enum('point','commission') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '提取申請的類型',
  `creation_date` datetime NOT NULL COMMENT '提款訂單創建日期',
  `cagent_uid` int unsigned NOT NULL COMMENT '會員賬號',
  `user_identification` json DEFAULT NULL COMMENT '用戶識別信息，比如請求時給金流商的咨詢，如手機號碼、電子郵件等，以 JSON 格式存儲',
  `withdrawal_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '提款金額',
  `callbacks_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '金流商回調金額',
  `withdrawal_fee` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '提款手續費',
  `currency_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '提款貨幣類型',
  `bank_account_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '出款至用戶的銀行賬號',
  `cagent_bank_detail` json DEFAULT NULL COMMENT '出款的銀行明細',
  `processed_date` datetime DEFAULT NULL COMMENT '提款处理日期',
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '請不要資料類型設ENUM, 提款方式，如银行转账(Bank), 電子錢包(EWallets), 第三方金流(ThirdParty)等',
  `third_party_provider_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '第三方金流提供商的UID',
  `payment_methods_id` int unsigned DEFAULT NULL,
  `provider_transaction_details` json DEFAULT NULL COMMENT '第三方金流交易回應详细信息',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '訂單狀態|0:Requested,1:Pending,2:Completed,3:Cancelled,99:Failed',
  `completion_date` datetime DEFAULT NULL COMMENT '提款完成日期',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '取消備註說明',
  PRIMARY KEY (`withdrawal_id`),
  UNIQUE KEY `cagent_withdrawals_withdrawal_number_unique` (`withdrawal_number`),
  KEY `cagent_withdrawals_cagent_uid_foreign` (`cagent_uid`),
  KEY `cagent_withdrawals_currency_code_foreign` (`currency_code`),
  KEY `creation_date_idx` (`creation_date`),
  KEY `completion_date_idx` (`completion_date`),
  KEY `payment_type_idx` (`payment_type`),
  KEY `status_idx` (`status`),
  CONSTRAINT `cagent_withdrawals_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`),
  CONSTRAINT `cagent_withdrawals_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carousels`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `carousels` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名稱',
  `is_active` tinyint NOT NULL DEFAULT '0' COMMENT '狀態',
  `start_time` datetime DEFAULT NULL COMMENT '開始日期',
  `end_time` datetime DEFAULT NULL COMMENT '結束日期',
  `carousels_highlight` tinyint DEFAULT NULL COMMENT '順序',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  `cagent_uid` int NOT NULL COMMENT '发送者的唯一标识符，引用代理信息表',
  `type` tinyint NOT NULL DEFAULT '1' COMMENT '類型 1:首頁輪播 2:市集輪播',
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carousels_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `carousels_language` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `carousels_uid` int unsigned NOT NULL,
  `lang` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言',
  `url_link` text COLLATE utf8mb4_unicode_ci COMMENT '內容連結',
  `image_pc` text COLLATE utf8mb4_unicode_ci COMMENT '輪播圖_電腦',
  `image_mobile` text COLLATE utf8mb4_unicode_ci COMMENT '輪播圖_移動裝置',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cash_register_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cash_register_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int NOT NULL,
  `machine_uid` int NOT NULL,
  `event_data` int NOT NULL,
  `origin_data` json NOT NULL,
  `create_time` datetime NOT NULL,
  `event_type` int NOT NULL COMMENT '事件類型:1入金 2 機台事件',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `company_bank_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `company_bank_accounts` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '編號',
  `cagent_uid` int unsigned NOT NULL,
  `account_number` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '銀行賬號，固定長度，不可重複',
  `account_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '賬戶名稱',
  `bank_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '銀行名稱',
  `currency_code` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '賬戶貨幣類型, 如USD、EUR、CNY等',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '賬戶狀態, 1表示啟用, 0表示關閉',
  `image_path` text COLLATE utf8mb4_unicode_ci COMMENT '賬戶圖片路徑',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `type` enum('deposit','withdraw') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'deposit' COMMENT '銀行帳用途: deposit|withdraw',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `company_bank_accounts_account_number_unique` (`account_number`),
  KEY `account_name_idx` (`account_name`),
  KEY `bank_name_idx` (`bank_name`),
  KEY `currency_status_idx` (`currency_code`,`status`),
  CONSTRAINT `company_bank_accounts_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `company_receipts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `company_receipts` (
  `transaction_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '交易唯一標識符',
  `deposit_id` int unsigned DEFAULT NULL COMMENT '关联的儲值订单标识符',
  `company_account_number` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公司收款使用的銀行賬號',
  `remittance_date` datetime DEFAULT NULL COMMENT '匯點數日期',
  `handler_cagent_uid` int unsigned DEFAULT NULL COMMENT '經手人',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '备注信息',
  PRIMARY KEY (`transaction_id`),
  KEY `company_account_number_idx` (`company_account_number`),
  KEY `handler_cagent_uid_idx` (`handler_cagent_uid`),
  KEY `deposit_id_idx` (`deposit_id`),
  KEY `remittance_date_idx` (`remittance_date`),
  CONSTRAINT `company_receipts_deposit_id_foreign` FOREIGN KEY (`deposit_id`) REFERENCES `member_deposits` (`deposit_id`),
  CONSTRAINT `company_receipts_handler_cagent_uid_foreign` FOREIGN KEY (`handler_cagent_uid`) REFERENCES `cagent` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
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 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
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 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `continuous_events_copywriting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `continuous_events_copywriting` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `continuous_events_uid` bigint unsigned NOT NULL,
  `language` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言選項，依照ISO 639-1(語言代碼)+ISO 3166-1(國家地區代碼 - 兩位字母)標準輸入(範例:en_US, zh_TW)',
  `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主標題',
  `content` longtext COLLATE utf8mb4_unicode_ci COMMENT '活動文案內文',
  `image_path` text COLLATE utf8mb4_unicode_ci COMMENT '賬戶圖片路徑',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `continuous_events_uid` (`continuous_events_uid`),
  CONSTRAINT `continuous_events_uid` FOREIGN KEY (`continuous_events_uid`) REFERENCES `continuous_events` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `crypto_wallet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `crypto_wallet_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '遊戲幣別',
  `wallet_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '錢包幣別',
  `transhash` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '2aabafbf-2057-49c2-a0d8-c8bac332b352' COMMENT '交易編號',
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱，Emun',
  `from` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payer，付款方',
  `to` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payee，收款方',
  `transfer_before` decimal(30,8) NOT NULL COMMENT '交易前錢包餘額',
  `transfer_point` decimal(30,8) NOT NULL COMMENT '交易額度',
  `transfer_after` decimal(30,8) NOT NULL COMMENT '交易後錢包餘額',
  `test` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為測試紀錄',
  `is_event` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為活動帳戶的遊戲紀錄',
  `rate` decimal(30,8) NOT NULL COMMENT '匯率',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `crypto_wallet_log_member_info_uid_currency_from_created_at_index` (`member_info_uid`,`currency`,`from`,`created_at`),
  KEY `crypto_wallet_log_member_info_uid_created_at_index` (`member_info_uid`,`created_at`),
  KEY `crypto_wallet_log_currency_from_created_at_index` (`currency`,`from`,`created_at`),
  KEY `crypto_wallet_log_wallet_currency_index` (`wallet_currency`),
  KEY `crypto_wallet_log_transhash_index` (`transhash`),
  KEY `crypto_wallet_log_currency_index` (`currency`),
  KEY `crypto_wallet_log_action_index` (`action`),
  KEY `crypto_wallet_log_from_index` (`from`),
  KEY `crypto_wallet_log_to_index` (`to`),
  KEY `crypto_wallet_log_created_at_index` (`created_at`),
  CONSTRAINT `crypto_wallet_log_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `crypto_wallet_log_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `currencies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `currencies` (
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣字母代碼, 符合ISO 4217標準',
  `currency_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣名稱',
  `exchange_rate` json NOT NULL COMMENT '相對於基準貨幣的匯率',
  `prefix` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣前綴',
  `symbol` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣符號',
  `decimal` tinyint(1) DEFAULT NULL COMMENT '小數到第幾位',
  `is_crypto` tinyint(1) NOT NULL DEFAULT '0' COMMENT '虛擬貨幣1是0否',
  `auto_withdrawal_limit` double(35,8) NOT NULL DEFAULT '0.00000000' COMMENT '自動出款閾值，當用戶申請提款低於此值時可自動進行出款處理',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '貨幣狀態, 1表示啟用, 0表示關閉',
  `status_front` tinyint(1) NOT NULL DEFAULT '0' COMMENT '前台貨幣狀態,是否可存提款或遊玩遊戲, 1表示啟用, 0表示關閉',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '最後更新時間',
  `bank` json DEFAULT NULL COMMENT '銀行名稱',
  PRIMARY KEY (`currency_code`),
  KEY `status_idx` (`status`),
  KEY `status_front_idx` (`status_front`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `data_land`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `data_land` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `hash` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `landdate` date DEFAULT NULL,
  `landdateUnix` int DEFAULT NULL,
  `gameId` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `member_info_uid` int unsigned DEFAULT NULL,
  `memId` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `isrobot` tinyint DEFAULT '0',
  `sum_bet` double(15,2) NOT NULL DEFAULT '0.00',
  `sum_bet2` double(15,2) NOT NULL DEFAULT '0.00',
  `sum_win` double(15,2) NOT NULL DEFAULT '0.00',
  `rebate` double(15,2) NOT NULL DEFAULT '0.00',
  `rebate_amount` double(15,2) NOT NULL DEFAULT '0.00',
  `cagent` int unsigned DEFAULT NULL,
  `jackpot` double(15,2) NOT NULL DEFAULT '0.00',
  `sum_jpbet` double(15,2) NOT NULL DEFAULT '0.00',
  `sum_jpwin` double(15,2) NOT NULL DEFAULT '0.00',
  `ipage` tinyint NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  KEY `data_land_cagent_foreign` (`cagent`),
  KEY `data_land_memid_foreign` (`memId`),
  KEY `data_land_hash_index` (`hash`),
  KEY `data_land_landdate_index` (`landdate`),
  KEY `data_land_landdateunix_index` (`landdateUnix`),
  KEY `data_land_gameid_index` (`gameId`),
  KEY `data_land_currency_index` (`currency`),
  KEY `data_land_member_info_uid_index` (`member_info_uid`),
  KEY `data_land_ipage_index` (`ipage`),
  CONSTRAINT `data_land_cagent_foreign` FOREIGN KEY (`cagent`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `data_land_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `data_land_memid_foreign` FOREIGN KEY (`memId`) REFERENCES `member_info` (`memId`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `data_land_half_of_day`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `data_land_half_of_day` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `hash` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `landdate` date DEFAULT NULL,
  `time_period` enum('AM','PM') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '1=>AM=>代表時間00:00:00-11:59:59, 2=>PM=>代表時間12:00:00-23:59:59',
  `gameId` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `member_info_uid` int unsigned DEFAULT NULL,
  `memId` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `isrobot` tinyint DEFAULT '0',
  `sum_bet` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sum_bet2` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sum_win` decimal(15,2) NOT NULL DEFAULT '0.00',
  `rebate` decimal(15,2) NOT NULL DEFAULT '0.00',
  `rebate_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `cagent` int unsigned DEFAULT NULL,
  `jackpot` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sum_jpbet` decimal(15,2) NOT NULL DEFAULT '0.00',
  `sum_jpwin` decimal(15,2) NOT NULL DEFAULT '0.00',
  `ipage` tinyint NOT NULL DEFAULT '0',
  `sum_donate` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '打賞總額',
  `bet_count` int unsigned NOT NULL DEFAULT '0' COMMENT '下注次數',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `data_land_half_of_day_hash_unique` (`hash`),
  KEY `data_land_half_of_day_cagent_foreign` (`cagent`),
  KEY `data_land_half_of_day_memid_foreign` (`memId`),
  KEY `data_land_half_of_day_landdate_index` (`landdate`),
  KEY `data_land_half_of_day_time_period_index` (`time_period`),
  KEY `data_land_half_of_day_gameid_index` (`gameId`),
  KEY `data_land_half_of_day_currency_index` (`currency`),
  KEY `data_land_half_of_day_member_info_uid_index` (`member_info_uid`),
  KEY `data_land_half_of_day_ipage_index` (`ipage`),
  CONSTRAINT `data_land_half_of_day_cagent_foreign` FOREIGN KEY (`cagent`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `data_land_half_of_day_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `data_land_half_of_day_memid_foreign` FOREIGN KEY (`memId`) REFERENCES `member_info` (`memId`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `dg_Action`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dg_Action` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `token` char(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ticketId` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `data` double DEFAULT NULL,
  `uid` bigint unsigned DEFAULT NULL,
  `username` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` double(20,4) DEFAULT NULL,
  `createDate` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `dg_action_data_uid_unique` (`data`,`uid`) USING BTREE,
  KEY `dg_action_ticketid_data_index` (`ticketId`,`data`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `dg_Jackpot`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dg_Jackpot` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `data` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ticketId` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jackpot` tinyint DEFAULT NULL,
  `createDate` datetime DEFAULT NULL,
  `createDateUnix` double DEFAULT NULL,
  `updateDate` datetime DEFAULT NULL,
  `updateDateUnix` int DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `data_ticketId` (`data`,`ticketId`) USING BTREE,
  KEY `dg_jackpot_jackpot_index` (`jackpot`) USING BTREE,
  KEY `dg_jackpot_ticketid_data_index` (`ticketId`,`data`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `donate_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `donate_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `game_wallet_uid` int DEFAULT NULL,
  `platform` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(20,6) DEFAULT NULL,
  `txn_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `round_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gift_time` datetime DEFAULT NULL,
  `data` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `game_wallet_uid_unix` (`game_wallet_uid`,`platform`,`txn_id`),
  KEY `donate_log_txn_id_index` (`txn_id`),
  KEY `donate_log_round_id_index` (`round_id`),
  KEY `donate_log_gift_time_index` (`gift_time`),
  KEY `donate_log_game_wallet_uid_index` (`game_wallet_uid`),
  KEY `donate_log_member_info_uid_index` (`member_info_uid`),
  KEY `platfrom` (`platform`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `engineer_action_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `engineer_action_logs` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '表的主鍵',
  `cagent_uid` bigint unsigned NOT NULL COMMENT '執行操作的用戶ID',
  `action_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '執行的操作類型',
  `original_data` text COLLATE utf8mb4_unicode_ci COMMENT '操作前的原始數據',
  `updated_data` text COLLATE utf8mb4_unicode_ci COMMENT '操作後的數據',
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '執行操作的用戶IP地址',
  `target_uid` int unsigned DEFAULT NULL COMMENT '目標UID',
  `target_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '目標類型',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `engineer_action_logs_cagent_uid_index` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工程操作紀錄';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `events_attributes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `events_attributes` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `event_uid` bigint unsigned NOT NULL,
  `attribute_id` int unsigned NOT NULL COMMENT '一個活動下的各屬性編號',
  `attribute_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '屬性幣別，未設置則使用活動預設幣別，若都為空則自動設置為USD',
  `attribute_is_rebate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否歸類為返水',
  `attribute_type` enum('deposit','withdraw','wager','win','lose','others') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'deposit' COMMENT '屬性的條件種類',
  `attribute_subtype` enum('>','>=','=','<=','<') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '>' COMMENT '屬性的條件判斷符號',
  `attribute_value` double NOT NULL DEFAULT '0' COMMENT '屬性的條件基準值',
  `attribute_value_basis` enum('single','cumulative') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cumulative' COMMENT '活動參與金額判斷是以單次或累積金額',
  `attribute_single_amount_target` enum('max','min','latest','earliest') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '單次金額目標為最大、最小、最晚或最早',
  `attribute_rewards_type` enum('multiplier','amounts','roulettes') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'amounts' COMMENT '獎勵類別：倍率(multiplier)、固定金額(amounts)、輪盤(roulettes)',
  `attribute_rewards_value` double NOT NULL DEFAULT '0' COMMENT '獎勵值',
  `attribute_rewards_position` tinyint(1) NOT NULL DEFAULT '0' COMMENT '發送獎勵到哪個部位：0:主錢包,1:bonus錢包(各遊戲館),2:輪盤',
  `attribute_rewards_specify_wallet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '若rewards_position為1，則必須指定發送獎勵到哪個遊戲館',
  `attribute_start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '屬性開始時間',
  `attribute_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '屬性結束時間',
  `attribute_is_active` tinyint(1) NOT NULL DEFAULT '1' 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,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `attribute` (`event_uid`,`attribute_id`),
  KEY `events_attributes_attribute_currency_index` (`attribute_currency`),
  KEY `condition` (`attribute_type`,`attribute_subtype`,`attribute_value`),
  KEY `events_attributes_attribute_start_time_index` (`attribute_start_time`),
  KEY `events_attributes_attribute_end_time_index` (`attribute_end_time`),
  KEY `events_attributes_attribute_is_active_index` (`attribute_is_active`),
  KEY `rewards` (`enable_rewards_limit`,`rewards_limit_type`,`rewards_limit_value`),
  KEY `wagering` (`enable_wagering_limit`,`wagering_limit_type`,`wagering_limit_value`),
  CONSTRAINT `events_attributes_attribute_currency_foreign` FOREIGN KEY (`attribute_currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `events_attributes_event_uid_foreign` FOREIGN KEY (`event_uid`) REFERENCES `events_list` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `events_copywriting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `events_copywriting` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `event_uid` bigint unsigned NOT NULL,
  `copywriting_id` int unsigned NOT NULL COMMENT '一個活動下的各屬性編號',
  `language` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言選項，依照ISO 639-1(語言代碼)+ISO 3166-1(國家地區代碼 - 兩位字母)標準輸入(範例:en_US, zh_TW)',
  `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主標題',
  `subtitle` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '副標題',
  `slogan` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活動宣傳口號、標語',
  `content` longtext COLLATE utf8mb4_unicode_ci COMMENT '活動文案內文',
  `remark` text COLLATE utf8mb4_unicode_ci COMMENT '活動備註',
  `start_time` datetime NOT NULL COMMENT '文案開始時間',
  `end_time` datetime NOT NULL COMMENT '文案結束時間',
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '文案頁面的即時狀態，若須關閉文案頁面，可關閉此狀態',
  `image_path` text COLLATE utf8mb4_unicode_ci COMMENT '賬戶圖片路徑',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `attribute` (`event_uid`,`copywriting_id`),
  KEY `events_copywriting_language_index` (`language`),
  KEY `events_copywriting_start_time_index` (`start_time`),
  KEY `events_copywriting_end_time_index` (`end_time`),
  KEY `events_copywriting_is_active_index` (`is_active`),
  CONSTRAINT `events_copywriting_event_uid_foreign` FOREIGN KEY (`event_uid`) REFERENCES `events_list` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `events_list`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `events_list` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `event_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '活動代碼',
  `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活動開始時間',
  `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活動結束時間',
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '該活動的即時狀態，若須關閉活動，則可切換此狀態',
  `is_show_carousel` tinyint(1) NOT NULL DEFAULT '0' COMMENT '該活動是否顯示在輪播畫面上',
  `is_show_pop_up` tinyint(1) DEFAULT '0' COMMENT '是否顯示在彈跳視窗',
  `participating_platforms` json DEFAULT NULL COMMENT '所有參與此活動的平台、廠商',
  `vip_group` json DEFAULT NULL COMMENT '限制可以參與此活動的VIP等級，如果為空則代表不設限',
  `tags_group` json DEFAULT NULL COMMENT '限制可以參與此活動的標籤族群，如果為空則代表不設限',
  `enable_currency_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用幣別限制，啟用後玩家一次只能參與一種幣別屬性',
  `reset_cycle` int unsigned NOT NULL DEFAULT '0' COMMENT '獎勵的重置天數，單位為"天"，設為1代表每天都可領取一次，0代表活動時間內可以無限次領取',
  `default_language` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '預設語言',
  `include_currency` json DEFAULT NULL COMMENT '預先建立的幣別種類',
  `event_show_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活動的類型：儲值、達成洗碼、等等...',
  `enable_initial_condition` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用初始化條件，啟用後子類別將會以初始幣別換匯成所有幣別。',
  `initial_currency` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `initial_type` enum('deposit','withdraw','wager','win','lose','others') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '種類',
  `initial_subtype` enum('>','>=','=','<=','<') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '判斷符號',
  `initial_value` double DEFAULT NULL COMMENT '條件基準值',
  `initial_value_basis` enum('single','cumulative') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cumulative' COMMENT '獎勵基於單次或累積金額',
  `initial_single_amount_target` enum('max','min','latest','earliest') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '單次金額目標為最大、最小、最晚或最早',
  `initial_rewards_type` enum('multiplier','amounts','roulettes') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'amounts' COMMENT '獎勵類別：倍率(multiplier)、固定金額(amounts)、輪盤(roulettes)',
  `initial_rewards_value` double NOT NULL DEFAULT '0' COMMENT '獎勵值',
  `initial_rewards_position` tinyint(1) NOT NULL DEFAULT '0' COMMENT '發送獎勵到哪個部位：0:主錢包,1:bonus錢包(各遊戲館)',
  `initial_rewards_specify_wallet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '若rewards_position為1，則必須指定發送獎勵到哪個遊戲館',
  `enable_initial_rewards_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用獎勵限制',
  `initial_rewards_limit_type` enum('times','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '獎勵限制為次數或是固定金額',
  `initial_rewards_limit_value` double DEFAULT NULL COMMENT '獎勵限制的數值',
  `enable_initial_wagering_limit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用洗碼凍結限制',
  `initial_include_principal` tinyint(1) NOT NULL DEFAULT '0' COMMENT '凍結是否包含本金',
  `initial_wagering_limit_type` enum('multiplier','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '洗碼凍結限制為倍率或是固定金額',
  `initial_wagering_limit_value` double DEFAULT NULL COMMENT '洗碼凍結限制的數值',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `events_list_event_code_unique` (`event_code`),
  KEY `events_list_start_time_index` (`start_time`),
  KEY `events_list_end_time_index` (`end_time`),
  KEY `events_list_is_active_index` (`is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext 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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_bet_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_bet_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `game_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bet_limit_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `min` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `max` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '預設限紅',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '原廠是否開放',
  PRIMARY KEY (`uid`),
  KEY `game_bet_limit_platform_index` (`platform`),
  KEY `game_bet_limit_currency_index` (`currency`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_clicks_land`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_clicks_land` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `game_list_uid` int unsigned NOT NULL,
  `member_info_uid` int unsigned NOT NULL,
  `clicks` int unsigned NOT NULL DEFAULT '0' COMMENT '點擊次數',
  `land_date` date NOT NULL COMMENT '日期Y-m-d',
  PRIMARY KEY (`id`),
  KEY `clicks_and_land_date_IDX` (`land_date`,`game_list_uid`),
  KEY `game_clicks_land_game_list_uid_IDX` (`game_list_uid`),
  KEY `game_clicks_land_member_info_uid_IDX` (`member_info_uid`),
  KEY `game_clicks_land_land_date_IDX` (`land_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='遊戲點擊次數(每日)';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_clicks_statistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_clicks_statistics` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `game_list_uid` int unsigned NOT NULL,
  `popularity_ranking` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `game_clicks_statistics_game_list_uid_unique` (`game_list_uid`),
  CONSTRAINT `game_clicks_statistics_game_list_uid_foreign` FOREIGN KEY (`game_list_uid`) REFERENCES `game_list_new` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_list_new`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_list_new` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `game_platform_uid` int unsigned NOT NULL COMMENT '游戏品牌UID 对应 all_platform 品牌的 UID',
  `game_type_uid` int unsigned NOT NULL DEFAULT '1' COMMENT '游戏类型UID 对应 game_type 游戏类型的 UID',
  `game_subtype_uid` int unsigned NOT NULL DEFAULT '1' COMMENT '游戏子类型UID 对应 game_subtype 游戏类型的 UID',
  `game_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '游戏登录代码',
  `status_front` tinyint NOT NULL DEFAULT '0' COMMENT '游戏开关 ("0" 关闭(完全不显示), "1" 开启)',
  `extension_game_group` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '扩充: (请对应钱包的子类型名称)扩充游戏群主, 使用判断是属于什么群，为了使用旧的写法，比如GR 有4个模式api',
  `have_portrait` tinyint NOT NULL DEFAULT '0' COMMENT '必须直立的游戏 1 = 必须 0=no',
  `game_name_en` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '英文 游戏名称',
  `game_name_zh` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '中文(简体) 游戏名称',
  `game_name_tw` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '中文(繁体) 游戏名称',
  `game_name_vi` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '越南 游戏名称',
  `game_highlight` int NOT NULL DEFAULT '0' COMMENT '重点介绍游戏',
  `login_lobby_mode` tinyint NOT NULL DEFAULT '0' COMMENT '是否为进入大厅的模式  (1 = 是, 0 = 不是)',
  `have_jackpot` tinyint NOT NULL DEFAULT '0' COMMENT '游戏是否有 jackpot (1 = 有, 0 = 没)',
  `set_limit_code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '扩充: 限红代号一下游戏原来产, 限红代号不一样',
  `internal_game_code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '扩充: 原厂内部游戏代码,可能在betLog 游戏代号不一样',
  `currency_code` json DEFAULT NULL COMMENT '支援的幣別',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `game_tags` json DEFAULT NULL COMMENT '遊戲標籤',
  `is_invalid_bet` int unsigned NOT NULL DEFAULT '0' COMMENT '遊戲下注是否為無效',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `game_list_game_platform_IDX` (`game_platform_uid`,`game_code`,`game_type_uid`),
  KEY `game_list_status_IDX` (`status_front`),
  KEY `game_list_new_game_type_uid_foreign` (`game_type_uid`),
  KEY `game_list_new_game_subtype_uid_foreign` (`game_subtype_uid`),
  KEY `game_list_new_is_invalid_bet_index` (`is_invalid_bet`),
  CONSTRAINT `game_list_new_game_platform_uid_foreign` FOREIGN KEY (`game_platform_uid`) REFERENCES `all_platform` (`uid`),
  CONSTRAINT `game_list_new_game_subtype_uid_foreign` FOREIGN KEY (`game_subtype_uid`) REFERENCES `game_subtype` (`uid`),
  CONSTRAINT `game_list_new_game_type_uid_foreign` FOREIGN KEY (`game_type_uid`) REFERENCES `game_type` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_play_disable`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_play_disable` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '表的主鍵',
  `cagent_uid` int unsigned NOT NULL,
  `game_list_uid` int unsigned NOT NULL COMMENT '遊戲清單UID',
  `is_disable` int unsigned NOT NULL DEFAULT '1' COMMENT '是否關閉',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  PRIMARY KEY (`uid`),
  KEY `game_play_disable_cagent_uid_index` (`cagent_uid`),
  KEY `game_play_disable_game_list_uid_index` (`game_list_uid`),
  KEY `game_play_disable_is_disable_index` (`is_disable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理遊戲關閉清單';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_subtype`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_subtype` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '这是每个游戏子类型的唯一标识符。它是一个递增的整数，为每个游戏子类型分配一个特定的编号。',
  `game_subtype` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '这个列表示各种游戏的子类型，如"Jackpot"、"Roulette"、"Slots"等。',
  `belong_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '这个列描述了每个游戏子类型属于的主要游戏类型。',
  `memo` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '这是对游戏子类型的描述或备注。',
  `status_front` tinyint NOT NULL DEFAULT '0' COMMENT '前台开关',
  `status_backend` tinyint NOT NULL DEFAULT '0' COMMENT '后台开关',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `game_subtype_id` (`game_subtype`,`belong_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_type` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '游戏类型的uid',
  `game_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'game_list 游戏类型',
  `status_front` tinyint NOT NULL DEFAULT '0' COMMENT '前台遊戲顯示1開0關',
  `status_backend` tinyint NOT NULL DEFAULT '0' COMMENT '後台報表顯示1開0關',
  `game_type_score` int NOT NULL DEFAULT '0' COMMENT '排序使用',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `game_type_game_type_unique` (`game_type`),
  KEY `game_type_status_front_status_backend_index` (`status_front`,`status_backend`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_wallet`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_wallet` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `wallet_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `member_info_uid` int unsigned NOT NULL,
  `currency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `point` double(30,8) NOT NULL DEFAULT '0.00000000',
  `version` bigint NOT NULL DEFAULT '0' COMMENT '版本控制',
  `transfer_point` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '轉帳錢包裡的錢',
  `jili` double(30,8) NOT NULL DEFAULT '0.00000000',
  `pg` double(30,8) NOT NULL DEFAULT '0.00000000',
  `dg` double(30,8) NOT NULL DEFAULT '0.00000000',
  `wm` double(30,8) NOT NULL DEFAULT '0.00000000',
  `eg` double(30,8) NOT NULL DEFAULT '0.00000000',
  `sexybcrt` double(30,8) NOT NULL DEFAULT '0.00000000',
  `salong` double(30,8) NOT NULL DEFAULT '0.00000000',
  `xg` double(30,8) NOT NULL DEFAULT '0.00000000',
  `evo` double(30,8) NOT NULL DEFAULT '0.00000000',
  `ag` double(30,8) NOT NULL DEFAULT '0.00000000',
  `imes` double(30,8) NOT NULL DEFAULT '0.00000000',
  `saba` double(30,8) NOT NULL DEFAULT '0.00000000',
  `spribe` double(30,8) NOT NULL DEFAULT '0.00000000',
  `cq9` double(30,8) NOT NULL DEFAULT '0.00000000',
  `vsl` double(30,8) NOT NULL DEFAULT '0.00000000',
  `ws168` double(30,8) NOT NULL DEFAULT '0.00000000',
  `qtech` double(30,8) NOT NULL DEFAULT '0.00000000',
  `rich88` double(30,8) NOT NULL DEFAULT '0.00000000',
  `v8` double(30,8) NOT NULL DEFAULT '0.00000000',
  `gb` double(30,8) NOT NULL DEFAULT '0.00000000',
  `ug` double(30,8) NOT NULL DEFAULT '0.00000000',
  `cmd` double(30,8) NOT NULL DEFAULT '0.00000000',
  `allbet` double(30,8) NOT NULL DEFAULT '0.00000000',
  `bigpot` double(30,8) NOT NULL DEFAULT '0.00000000',
  `c911` double(30,8) NOT NULL DEFAULT '0.00000000',
  `png` double(30,8) NOT NULL DEFAULT '0.00000000',
  PRIMARY KEY (`uid`),
  KEY `wallet_name_idx` (`wallet_name`),
  KEY `member_idx` (`member_info_uid`),
  KEY `currency_idx` (`currency`),
  CONSTRAINT `game_wallet_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE,
  CONSTRAINT `game_wallet_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `game_wallet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `game_wallet_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '遊戲幣別',
  `wallet_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '錢包幣別',
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '遊戲平台',
  `transhash` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '4effc39f-97df-4495-80f4-0dbca7faa593' COMMENT '交易編號',
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱，Emun',
  `from` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payer，付款方',
  `to` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payee，收款方',
  `transfer_before` decimal(30,8) NOT NULL COMMENT '交易前錢包餘額',
  `transfer_point` decimal(30,8) NOT NULL COMMENT '交易額度',
  `transfer_after` decimal(30,8) NOT NULL COMMENT '交易後錢包餘額',
  `test` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為測試紀錄',
  `is_event` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為活動帳戶的遊戲紀錄',
  `rate` decimal(30,8) NOT NULL COMMENT '匯率',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `game_wallet_log_member_info_uid_currency_from_created_at_index` (`member_info_uid`,`currency`,`from`,`created_at`),
  KEY `game_wallet_log_member_info_uid_created_at_index` (`member_info_uid`,`created_at`),
  KEY `game_wallet_log_currency_from_created_at_index` (`currency`,`from`,`created_at`),
  KEY `game_wallet_log_wallet_currency_index` (`wallet_currency`),
  KEY `game_wallet_log_platform_index` (`platform`),
  KEY `game_wallet_log_transhash_index` (`transhash`),
  KEY `game_wallet_log_currency_index` (`currency`),
  KEY `game_wallet_log_action_index` (`action`),
  KEY `game_wallet_log_from_index` (`from`),
  KEY `game_wallet_log_to_index` (`to`),
  KEY `game_wallet_log_created_at_index` (`created_at`),
  CONSTRAINT `game_wallet_log_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `game_wallet_log_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `internal_notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `internal_notifications` (
  `notification_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '通知唯一标识符，自动递增的整数',
  `sender_id` int unsigned NOT NULL COMMENT '发送者的唯一标识符，引用代理信息表',
  `is_to_all` tinyint(1) NOT NULL DEFAULT '0' COMMENT '标记是否发送给所有用户,1表示是,0表示否',
  `target_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '發送對象,代理:cagent,玩家:member',
  `target_group` json DEFAULT NULL COMMENT '目标用户群的标识符,用于指定特定用户或用户群接收通知,仅在is_to_all为0时适用,可以是用户ID的列表,用户群组名称或其他用于识别特定用户群的标识。',
  `vip_group` json DEFAULT NULL COMMENT '目标用户vip群,同target_group註釋',
  `tags_group` json DEFAULT NULL COMMENT '目标用户tags群,同target_group註釋',
  `is_absolute_search` tinyint(1) NOT NULL DEFAULT '0' COMMENT '判斷搜尋條件是否為絕對搜尋',
  `main_subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主旨',
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知主题',
  `notification_content` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知内容',
  `send_date` datetime NOT NULL COMMENT '通知发送日期和时间',
  `cagent_uid` int NOT NULL COMMENT '发送者的唯一标识符，引用代理信息表',
  PRIMARY KEY (`notification_id`),
  KEY `sender_idx` (`sender_id`),
  KEY `is_to_all_idx` (`is_to_all`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  CONSTRAINT `internal_notifications_sender_id_foreign` FOREIGN KEY (`sender_id`) REFERENCES `cagent` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `internal_notifications_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `internal_notifications_language` (
  `notifications_language_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '通知唯一标识符，自动递增的整数',
  `notification_id` int unsigned NOT NULL COMMENT '與主表的notification_id關聯',
  `main_subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主旨',
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知主题',
  `language` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知语言',
  `notification_content` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知内容',
  PRIMARY KEY (`notifications_language_id`),
  KEY `internal_notifications_language_notification_id_foreign` (`notification_id`),
  KEY `language_idx` (`language`),
  CONSTRAINT `internal_notifications_language_notification_id_foreign` FOREIGN KEY (`notification_id`) REFERENCES `internal_notifications` (`notification_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `jackpot`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jackpot` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jackpot` double(30,8) DEFAULT NULL COMMENT '累計',
  `response` json DEFAULT NULL COMMENT '廠商回應',
  `status` tinyint NOT NULL DEFAULT '1',
  PRIMARY KEY (`uid`),
  KEY `jackpot_platform_index` (`platform`),
  KEY `jackpot_currency_index` (`currency`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `job_batches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `live_chat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_chat` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `license_id` int unsigned DEFAULT NULL COMMENT 'licenseId',
  `expires_in` int unsigned DEFAULT NULL COMMENT 'expiresIn,過期日',
  `username` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'username',
  `token_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'tokenType,令牌類別',
  `access_token` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'accessToken,令牌',
  `entity_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'entityId,實體Id',
  `lc_cid` text COLLATE utf8mb4_unicode_ci COMMENT '__lc_cid',
  `lc_cst` text COLLATE utf8mb4_unicode_ci COMMENT '__lc_cst',
  `create_date` datetime DEFAULT NULL COMMENT 'creationDate',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `machine_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `machine_info` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned DEFAULT NULL COMMENT '代理uid',
  `area` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '機器編號',
  `mac_address` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '主機網卡位置',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '啟用狀態',
  `enable_bill_insertion` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否可以入鈔',
  `event_code` int unsigned NOT NULL DEFAULT '101' COMMENT '機台狀態代碼(101正常連線)',
  `memo` json DEFAULT NULL,
  `anydesk_add` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'anydesk位置',
  `anydesk_pwd` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'anydesk密碼',
  `app_version` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '機台登入APP版本',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `machine_info_mac_address_unique` (`mac_address`),
  KEY `machine_info_number_index` (`number`),
  KEY `machine_info_mac_address_index` (`mac_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='機台清單';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `marquee_announcements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `marquee_announcements` (
  `marquee_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '跑马灯唯一标识符，自动递增的整数',
  `subject` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '跑马灯消息内容',
  `publish_date` datetime NOT NULL COMMENT '跑马灯发布日期和时间',
  `expiry_date` datetime DEFAULT NULL COMMENT '跑马灯过期日期和时间，用于自动下架过期消息',
  `created_time` datetime DEFAULT NULL COMMENT '跑馬燈創建時間',
  `updated_time` datetime DEFAULT NULL COMMENT '跑馬燈更新時間',
  `sender_id` int unsigned NOT NULL COMMENT '发送者的唯一标识符，引用代理信息表',
  `cagent_uid` int NOT NULL COMMENT '发送者的唯一标识符，引用代理信息表',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '狀態, 1表示啟用, 0表示關閉',
  PRIMARY KEY (`marquee_id`),
  KEY `status_idx` (`status`),
  KEY `publish_date_idx` (`publish_date`),
  KEY `expiry_date_idx` (`expiry_date`),
  KEY `cagent_uid_idx` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `marquee_announcements_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `marquee_announcements_language` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '跑马灯唯一标识符，自动递增的整数',
  `marquee_id` int unsigned NOT NULL COMMENT '關聯',
  `subject` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主標題',
  `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '跑馬燈內容',
  `language` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '語言',
  PRIMARY KEY (`uid`),
  KEY `marquee_announcements_language_marquee_id_foreign` (`marquee_id`),
  CONSTRAINT `marquee_announcements_language_marquee_id_foreign` FOREIGN KEY (`marquee_id`) REFERENCES `marquee_announcements` (`marquee_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_action_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_action_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` bigint unsigned DEFAULT NULL,
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createDate` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_action_log_member_info_uid_index` (`member_info_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_bet_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_bet_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bet_limits` json DEFAULT NULL COMMENT '限制',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_commission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_commission` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `hash` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `wallet_currency` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `std` date DEFAULT NULL COMMENT '開始時間',
  `etd` date DEFAULT NULL COMMENT '結算時間',
  `self_platform` json DEFAULT NULL COMMENT '個人遊玩',
  `agent_platform` json DEFAULT NULL COMMENT '代理遊玩',
  `self_bet` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '個人投注量',
  `agent_bet` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '代理投注量',
  `rp_level` int DEFAULT NULL COMMENT 'rp等級',
  `rp_per` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT 'rp利率',
  `commission` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '返佣金額',
  `send_status` tinyint NOT NULL DEFAULT '0' COMMENT '0:未發放,1:已申請,2:已發放,99:不發放',
  `send_date` datetime DEFAULT NULL COMMENT '送出時間',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '備註',
  PRIMARY KEY (`uid`),
  KEY `member_commission_member_info_uid_foreign` (`member_info_uid`),
  KEY `hash_idx` (`hash`),
  CONSTRAINT `member_commission_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='會員自己的返佣申請表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_continuous_events_rewards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_continuous_events_rewards` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `continuous_events_uid` bigint unsigned NOT NULL COMMENT '活動編號',
  `continuous_events_attribute_uid` bigint unsigned NOT NULL COMMENT '活動的屬性編號',
  `received_amounts` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '已領取金額',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '狀態(0:取消1:領取)',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_info_uid` (`member_info_uid`),
  KEY `continuous_events_attribute_uid` (`continuous_events_attribute_uid`),
  CONSTRAINT `continuous_events_attribute_uid` FOREIGN KEY (`continuous_events_attribute_uid`) REFERENCES `continuous_events_attribute` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `member_info_uid` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_crypto_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_crypto_info` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `chain` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '鏈',
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '地址',
  PRIMARY KEY (`uid`),
  KEY `member_currency_idx` (`member_info_uid`,`currency_code`),
  KEY `member_crypto_info_currency_code_foreign` (`currency_code`),
  CONSTRAINT `member_crypto_info_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE,
  CONSTRAINT `member_crypto_info_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_deposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_deposits` (
  `deposit_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '訂單唯一標識符,自動遞增的整數',
  `deposit_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '格式化的訂單號',
  `creation_date` datetime NOT NULL COMMENT '訂單創建日期',
  `completion_date` datetime DEFAULT NULL COMMENT '完成入款日期',
  `member_info_uid` int unsigned NOT NULL COMMENT '會員賬號',
  `deposit_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '存款金額',
  `callbacks_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '金流商回調金額',
  `deposit_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '請不要資料類型設ENUM, 存款類型, 如銀行轉賬(Bank), 電子錢包(EWallets), 第三方金流(ThirdParty)等',
  `currency_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '存款貨幣類型',
  `bank_account_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用戶存款時使用的銀行賬號(一般只有在公司入款時才會有)',
  `third_party_provider_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '使用第三方金流提供商的UID',
  `payment_methods_id` int unsigned DEFAULT NULL,
  `provider_transaction_details` json DEFAULT NULL COMMENT '第三方金流交易詳細信息',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '訂單狀態|0:Requested,1:Pending,2:Completed,3:Cancelled,99:Failed',
  PRIMARY KEY (`deposit_id`),
  UNIQUE KEY `member_deposits_deposit_number_unique` (`deposit_number`),
  KEY `creation_date_idx` (`creation_date`),
  KEY `completion_date_idx` (`completion_date`),
  KEY `deposit_type_idx` (`deposit_type`),
  KEY `status_idx` (`status`),
  KEY `creation_date_status_idx` (`creation_date`,`status`),
  KEY `deposit_number_idx` (`deposit_number`),
  KEY `currency_deposit_idx` (`currency_code`,`deposit_amount`),
  KEY `member_info_uid_idx` (`member_info_uid`),
  CONSTRAINT `member_deposits_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`),
  CONSTRAINT `member_deposits_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_event_rewards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_event_rewards` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `event_uid` bigint unsigned NOT NULL COMMENT '活動編號',
  `attribute_id` int unsigned NOT NULL COMMENT '活動的屬性編號',
  `received_times` int unsigned NOT NULL COMMENT '已領取次數',
  `received_amounts` decimal(8,2) NOT NULL COMMENT '已領取金額',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_event_rewards_event_uid_attribute_id_foreign` (`event_uid`,`attribute_id`),
  KEY `member_event_rewards_member_info_uid_index` (`member_info_uid`),
  KEY `member_event_rewards_event_uid_index` (`event_uid`),
  CONSTRAINT `member_event_rewards_event_uid_attribute_id_foreign` FOREIGN KEY (`event_uid`, `attribute_id`) REFERENCES `events_attributes` (`event_uid`, `attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `member_event_rewards_event_uid_foreign` FOREIGN KEY (`event_uid`) REFERENCES `events_list` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `member_event_rewards_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='已領獎的活動(event_uid)及其屬性(attributes_id)，屬性:{times:次數, amounts:金額}';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_event_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_event_status` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `event_status` json DEFAULT NULL COMMENT '可參與的活動(event_uid)及其狀態(code)，狀態碼:{0:尚未達標, 1:達標可領取/使用, 2:不可再領取/使用}，範例:{1:1, 2:2, 3:0}',
  `event_restricted` json DEFAULT NULL COMMENT '被限制的活動(event_uid)及其狀態(code)，狀態碼:{0:無法參與, 1:無法領取/使用}，範例:{1:1, 2:2}',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `member_event_status_member_info_uid_unique` (`member_info_uid`),
  CONSTRAINT `member_event_status_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_game_rebate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_game_rebate` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `member_info_uid` int unsigned NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '設定名稱',
  `cannot_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不能被刪除',
  `rebate` json DEFAULT NULL COMMENT '反水%數設定',
  PRIMARY KEY (`uid`),
  KEY `member_info_name_idx` (`member_info_uid`,`name`),
  CONSTRAINT `member_game_rebate_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家遊戲反水設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_game_table_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_game_table_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `all_platform_uid` int unsigned NOT NULL COMMENT '遊戲平台的UID',
  `min_limit` int NOT NULL DEFAULT '0' COMMENT '最小投注限制',
  `max_limit` int NOT NULL DEFAULT '0' COMMENT '最大投注限制',
  `max_win_limit` int NOT NULL DEFAULT '0' COMMENT '最大贏錢限額',
  PRIMARY KEY (`uid`),
  KEY `member_game_table_limit_all_platform_uid_foreign` (`all_platform_uid`),
  KEY `member_game_table_limit_currency_code_foreign` (`currency_code`),
  KEY `member_currency_platform_idx` (`member_info_uid`,`currency_code`,`all_platform_uid`),
  CONSTRAINT `member_game_table_limit_all_platform_uid_foreign` FOREIGN KEY (`all_platform_uid`) REFERENCES `all_platform` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `member_game_table_limit_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE,
  CONSTRAINT `member_game_table_limit_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家個別遊戲限紅設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_info` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `vip_level` int unsigned DEFAULT NULL COMMENT 'vip > level 等級',
  `cagent_uid` int unsigned NOT NULL COMMENT '代理UID',
  `main_cagent_uid` int unsigned NOT NULL COMMENT '主要代理,站的設定都跟著他',
  `cagent_game_profit_uid` int unsigned NOT NULL COMMENT '代理遊戲返水的Id',
  `memId` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `passwd` varchar(70) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `true_name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdraw_password` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdraw_password_set` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已設提款密碼',
  `token` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帳號識別唯一值',
  `create_time` datetime DEFAULT NULL,
  `create_ts` int DEFAULT NULL,
  `mobile` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_country` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_lock` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1可改手機0不可',
  `birthday` date DEFAULT NULL,
  `email` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint DEFAULT NULL COMMENT '參考表person_status_code',
  `auto_withdraw` tinyint(1) NOT NULL DEFAULT '1' COMMENT '自動代付1開0關',
  `bet_limit_json` json DEFAULT NULL COMMENT '遊戲限紅',
  `tags` json DEFAULT NULL COMMENT '玩家設定標籤,以Json儲存',
  `can_company_deposit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可以公司入帳',
  `register_type` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '註冊來源',
  `hide_zero` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '隱藏餘額',
  `shorturl` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '短網址',
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `passwderrtimes` int DEFAULT '0',
  `is_verify` int DEFAULT '0' COMMENT '是否驗證email',
  `test` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是測試帳號',
  `rebate` double(20,8) NOT NULL DEFAULT '0.00000000' COMMENT '會員返水',
  `machine_number` text COLLATE utf8mb4_unicode_ci COMMENT '機台編號',
  `is_machine` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為機台帳號',
  `hide` tinyint(1) NOT NULL DEFAULT '0' COMMENT '隱藏會員',
  `settlement_model` enum('credit','cash') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '結算模式(只有cash會員能進行棄分)',
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  KEY `memid_mobile_idx` (`memId`,`mobile`),
  KEY `currency_idx` (`currency_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_info_bank`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_info_bank` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '銀行名稱',
  `bank_account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '戶名',
  `bank_branch_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '開戶分行',
  `bank_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '開戶銀行代碼',
  `bank_account` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '銀行帳號',
  `bank_card_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '銀行卡號',
  `id_pic` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '身分證圖片',
  `id_card` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '身分證號',
  `currency_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `create_date_unix` int DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_info_bank_member_info_uid_index` (`member_info_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_login_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT '會員信息UID',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `device` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '裝置',
  `country` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '國家',
  `domain` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '網址',
  `create_time` datetime DEFAULT NULL,
  `create_ts` int NOT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_info_uid_idx` (`member_info_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_lose_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_lose_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lose_limit` double(15,8) NOT NULL DEFAULT '0.00000000',
  `lock` int NOT NULL DEFAULT '0',
  `status` int NOT NULL DEFAULT '1',
  `unlock_time` datetime DEFAULT NULL,
  `set_time` datetime DEFAULT NULL,
  `lock_time` datetime DEFAULT NULL,
  `initial_lose_limit` double(15,8) NOT NULL DEFAULT '0.00000000' COMMENT '初始輸分限制值',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_lose_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_lose_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int NOT NULL DEFAULT '0',
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `win_lose_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `before_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `after_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_point_transfer_temp`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_point_transfer_temp` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT '玩家uid',
  `to_member_info_uid` int unsigned DEFAULT NULL COMMENT 'to玩家uid',
  `point` decimal(30,8) NOT NULL COMMENT '金額',
  `currency` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '移轉代碼',
  `status` int unsigned NOT NULL COMMENT '狀態(0:已用掉,1:未用掉)',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `member_point_transfer_temp_member_info_uid_index` (`member_info_uid`),
  KEY `member_point_transfer_temp_code_index` (`code`),
  KEY `member_point_transfer_temp_status_index` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_product_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_product_order` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_number` varchar(35) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '訂單編號',
  `cagent_uid` int unsigned NOT NULL,
  `member_info_uid` int unsigned NOT NULL,
  `product_uid` bigint unsigned NOT NULL,
  `numbers` int unsigned NOT NULL COMMENT '兌換數量',
  `product_point` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '兌換點數(防止價格變動)',
  `shipping_fee` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '運費(防止價格變動)',
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '商品地址',
  `shipment_type` enum('store','delivery') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'store' COMMENT '貨運類別: store超商,delivery宅配',
  `shipment_company` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '貨運公司',
  `freight_order` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '貨運訂單',
  `store_type` enum('FAMI','UNIMART','UNIMARTFREEZE','HILIFE') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '超取類型:(全家,7-11超商,7-11冷凍,萊爾富)',
  `store_code` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '超取代碼',
  `store_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '超取門市',
  `member_memo` text COLLATE utf8mb4_unicode_ci COMMENT '會員備註',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `recipient` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收件人',
  `phone` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '電話號碼',
  `email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'mail',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '0:待確認,1:訂單確認, 2:運送中,3:已完成,4:已取消',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_product_order_member_info_uid_index` (`member_info_uid`),
  KEY `member_product_order_cagent_uid_index` (`cagent_uid`),
  KEY `member_product_order_status_index` (`status`),
  KEY `member_product_order_created_at_index` (`created_at`),
  KEY `member_product_order_product_uid_foreign` (`product_uid`),
  CONSTRAINT `member_product_order_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`),
  CONSTRAINT `member_product_order_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`),
  CONSTRAINT `member_product_order_product_uid_foreign` FOREIGN KEY (`product_uid`) REFERENCES `product` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='會員兌換商品訂單';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_profit_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_profit_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `net_profit_before` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `net_profit_today` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `max_limit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `lock` tinyint NOT NULL DEFAULT '0',
  `unlock_time` datetime DEFAULT NULL,
  `set_time` datetime DEFAULT NULL,
  `game_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'SLOT',
  PRIMARY KEY (`uid`),
  KEY `member_profit_limit_member_info_uid_index` (`member_info_uid`),
  KEY `member_profit_limit_currency_index` (`currency`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_rebate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_rebate` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `cagent_uid` int DEFAULT NULL,
  `hash` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `bet_std` datetime DEFAULT NULL COMMENT '開始時間',
  `bet_etd` datetime DEFAULT NULL COMMENT '結算時間',
  `vip` tinyint DEFAULT NULL COMMENT 'vip等級',
  `rate` double(5,2) NOT NULL DEFAULT '0.00' COMMENT '返水利率',
  `bet` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '投注量',
  `rebate` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '返水金額',
  `send_status` tinyint NOT NULL DEFAULT '0' COMMENT '0:未發放,1:已申請,2:已發放,99:不發放',
  `send_date` datetime DEFAULT NULL COMMENT '送出時間',
  `detail` json DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_rebate_member_info_uid_foreign` (`member_info_uid`),
  KEY `hash_idx` (`hash`),
  CONSTRAINT `member_rebate_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='會員自己的返水申請表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_risk_watchlist`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_risk_watchlist` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `hash` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '唯一標識',
  `member_info_uid` int unsigned NOT NULL COMMENT '玩家UID',
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '平台',
  `action` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱',
  `risk_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '設定風險金額',
  `amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '當前風險金額',
  `action_log` json DEFAULT NULL COMMENT '操作記錄',
  `is_check` tinyint NOT NULL DEFAULT '0' COMMENT '是否查看',
  `operator_uid` int unsigned DEFAULT NULL COMMENT '操作人UID',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL COMMENT '創建時間',
  `updated_at` datetime NOT NULL COMMENT '更新時間',
  PRIMARY KEY (`uid`),
  KEY `hash_IDX` (`hash`),
  KEY `member_info_uid_IDX` (`member_info_uid`),
  KEY `platform_IDX` (`platform`),
  KEY `action_IDX` (`action`),
  KEY `is_check_IDX` (`is_check`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='風險控管名單';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_roulettes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_roulettes` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'member uid',
  `roulettes_uid` int unsigned NOT NULL COMMENT 'roulettes uid',
  `roulettes_attribute_uid` int unsigned NOT NULL COMMENT 'roulettes屬性uid',
  `count` int unsigned NOT NULL COMMENT '可遊玩次數',
  `complete_bonus` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '總獲得獎勵',
  `complete_times` int unsigned NOT NULL COMMENT '遊玩次數',
  `start_time` datetime DEFAULT NULL COMMENT '開始日期',
  `end_time` datetime DEFAULT NULL COMMENT '結束日期',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  `is_active` int unsigned NOT NULL COMMENT '是否啟用',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_setting_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_setting_history` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `member_info_uid` bigint unsigned DEFAULT NULL,
  `cagent_uid` bigint unsigned DEFAULT NULL,
  `main_cagent_uid` bigint unsigned DEFAULT NULL,
  `member_game_rebate` json DEFAULT NULL,
  `history_date` date DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_settlement_report`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_settlement_report` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `wallet_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '使用錢包幣別',
  `wagering` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '投注量',
  `net_profit` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '輸贏淨利',
  `rebate_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '返水金額',
  `rebate` tinyint NOT NULL DEFAULT '0' COMMENT '玩家返水率',
  `bet_date` datetime DEFAULT NULL COMMENT '投注日期',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_settlement_report_member_info_uid_index` (`member_info_uid`),
  KEY `member_settlement_report_wallet_currency_index` (`wallet_currency`),
  KEY `member_settlement_report_bet_date_index` (`bet_date`),
  CONSTRAINT `member_settlement_report_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `member_settlement_report_wallet_currency_foreign` FOREIGN KEY (`wallet_currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='會員結算報表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_vip_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_vip_info` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned DEFAULT NULL COMMENT 'member_info_uid',
  `vip_level` int DEFAULT '0' COMMENT 'vip_level',
  `last_promotion_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最後晉升時間',
  `last_downgraded_time` timestamp NULL DEFAULT NULL COMMENT '最後降級時間',
  `vip_promotion_criteria` json DEFAULT NULL COMMENT '下階vip晉升的標準，使用json記錄下一階段所有幣別的Vip晉升標準的uid',
  `promotion_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否抵達晉升條件',
  PRIMARY KEY (`uid`),
  KEY `member_vip_info_member_info_uid_index` (`member_info_uid`),
  KEY `member_vip_info_vip_level_index` (`vip_level`),
  CONSTRAINT `member_vip_info_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家vip資訊';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_wallet_transfers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_wallet_transfers` (
  `uid` int NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `platform` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(20,6) DEFAULT NULL,
  `request_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_404_count` int DEFAULT '0',
  `status_999_count` int DEFAULT '0',
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `request_id_unix` (`request_id`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `request_id` (`request_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `member_withdrawals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_withdrawals` (
  `withdrawal_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '提款訂單唯一標識符, 自動遞增的整數',
  `withdrawal_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '格式化的提款訂單號',
  `creation_date` datetime NOT NULL COMMENT '提款訂單創建日期',
  `member_info_uid` int unsigned NOT NULL COMMENT '會員賬號',
  `user_identification` json DEFAULT NULL COMMENT '用戶識別信息，比如請求時給金流商的咨詢，如手機號碼、電子郵件等，以 JSON 格式存儲',
  `withdrawal_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '提款金額',
  `callbacks_amount` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '金流商回調金額',
  `withdrawal_fee` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '提款手續費',
  `currency_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '提款貨幣類型',
  `bank_account_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '出款至用戶的銀行賬號',
  `member_bank_detail` json DEFAULT NULL COMMENT '玩家出款的銀行明細',
  `processed_date` datetime DEFAULT NULL COMMENT '提款处理日期',
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '請不要資料類型設ENUM, 提款方式，如银行转账(Bank), 電子錢包(EWallets), 第三方金流(ThirdParty)等',
  `third_party_provider_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '第三方金流提供商的UID',
  `payment_methods_id` int unsigned DEFAULT NULL,
  `provider_transaction_details` json DEFAULT NULL COMMENT '第三方金流交易回應详细信息',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '訂單狀態|0:Requested,1:Pending,2:Completed,3:Cancelled,99:Failed',
  `completion_date` datetime DEFAULT NULL COMMENT '提款完成日期',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '取消備註說明',
  PRIMARY KEY (`withdrawal_id`),
  UNIQUE KEY `member_withdrawals_withdrawal_number_unique` (`withdrawal_number`),
  KEY `member_withdrawals_member_info_uid_foreign` (`member_info_uid`),
  KEY `member_withdrawals_currency_code_foreign` (`currency_code`),
  KEY `creation_date_idx` (`creation_date`),
  KEY `completion_date_idx` (`completion_date`),
  KEY `payment_type_idx` (`payment_type`),
  KEY `status_idx` (`status`),
  CONSTRAINT `member_withdrawals_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`),
  CONSTRAINT `member_withdrawals_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `news`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `news` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '類別(參照Enums)',
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公告名稱',
  `url_link` text COLLATE utf8mb4_unicode_ci COMMENT '內容連結',
  `route_link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '轉帳錢包裡的錢',
  `is_active` tinyint NOT NULL DEFAULT '0' COMMENT '公告狀態',
  `start_time` datetime DEFAULT NULL COMMENT '開始日期',
  `end_time` datetime DEFAULT NULL COMMENT '結束日期',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `type_idx` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `news_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `news_language` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `news_uid` int unsigned DEFAULT NULL COMMENT 'news_uid關聯',
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公告內容名稱',
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公告内容',
  `image` text COLLATE utf8mb4_unicode_ci COMMENT '圖片',
  `language` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  PRIMARY KEY (`uid`),
  KEY `news_language_news_uid_index` (`news_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `notification_read_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notification_read_status` (
  `status_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '閱讀狀態唯一標識符，自動遞增的整數',
  `notification_id` int unsigned NOT NULL COMMENT '關聯的通知標識符',
  `member_info_uid` int unsigned NOT NULL COMMENT '接收者的唯一標識符，引用用戶信息表',
  `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Unread' COMMENT '公告状态，默認為Unread, 并且Read為已讀',
  `read_date` datetime DEFAULT NULL COMMENT '閱讀日期和時間',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '玩家操作刪除通知，若為1則不顯示給玩家',
  `is_for_cagent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為代理站內信',
  PRIMARY KEY (`status_id`),
  KEY `notification_id_idx` (`notification_id`),
  KEY `member_info_uid_idx` (`member_info_uid`),
  KEY `read_status_idx` (`status`),
  CONSTRAINT `notification_read_status_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `notification_read_status_notification_id_foreign` FOREIGN KEY (`notification_id`) REFERENCES `internal_notifications` (`notification_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `page`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `page` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `page_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '页面名称',
  `front_page_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '前端名稱,編輯前綴:edit_,檢視前綴:view_',
  `page_nested_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '前端嵌套路徑',
  `comment` text COLLATE utf8mb4_unicode_ci COMMENT '解說',
  `is_main` tinyint NOT NULL DEFAULT '0' COMMENT '是否為群組main',
  `page_group` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '群組',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '狀態(0關1開)',
  `hide_page` tinyint(1) NOT NULL DEFAULT '0' COMMENT '隱藏狀態(0關1開),當開啟會大於status',
  PRIMARY KEY (`uid`),
  KEY `page_status_index` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_recovery_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_recovery_token` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_uid` int unsigned NOT NULL COMMENT '使用者uid',
  `user_name` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '場域',
  `user_type` enum('cagent','member') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '使用者類型',
  `token` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'token',
  `create_time` datetime DEFAULT NULL,
  `expire_time` datetime DEFAULT NULL,
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '使用狀態',
  PRIMARY KEY (`uid`),
  KEY `password_recovery_token_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='忘記密碼重置信';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payment_methods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `payment_methods` (
  `method_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '支付方式的唯一標識符',
  `method_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付方式名稱的ENUM，如 PayMaya, Gcash',
  `method_type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付方式類型的ENUM，如 phcode => 掃碼, phlink=>直連, phgateway=>網關',
  `currency_code` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支持的貨幣代碼',
  PRIMARY KEY (`method_id`),
  KEY `payment_methods_currency_code_foreign` (`currency_code`),
  CONSTRAINT `payment_methods_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='金流商支付類型資料表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `personal_access_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `platform_maintenance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `platform_maintenance` (
  `all_platform_uid` int unsigned NOT NULL,
  `maintenance_day_of_week` tinyint DEFAULT NULL COMMENT '平台周几固定维护 其中 1 表示周一，2 表示周二，以此类推，直到 7 表示周日。',
  `maintenance_start_time` time DEFAULT NULL COMMENT '请填写台湾时间: 维护开始的时间 格式:HH:MM:SS',
  `maintenance_end_time` time DEFAULT NULL COMMENT '请填写台湾时间: 维护结束的时间 格式:HH:MM:SS',
  UNIQUE KEY `platform_maintenance_unique_idx` (`all_platform_uid`,`maintenance_day_of_week`,`maintenance_start_time`,`maintenance_end_time`),
  KEY `platform_maintenance_uid_day_idx` (`all_platform_uid`,`maintenance_day_of_week`),
  KEY `maintenance_day_start_idx` (`maintenance_day_of_week`,`maintenance_start_time`),
  KEY `platform_maintenance_time_idx` (`all_platform_uid`,`maintenance_start_time`,`maintenance_end_time`),
  CONSTRAINT `platform_maintenance_all_platform_uid_foreign` FOREIGN KEY (`all_platform_uid`) REFERENCES `all_platform` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
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,
  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 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='市集商品';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `product_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_image` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_uid` bigint unsigned NOT NULL,
  `image_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`uid`),
  KEY `product_image_product_uid_foreign` (`product_uid`),
  CONSTRAINT `product_image_product_uid_foreign` FOREIGN KEY (`product_uid`) REFERENCES `product` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='市集商品圖片';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `product_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_language` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_uid` bigint unsigned NOT NULL,
  `language` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '語言選項，依照ISO 639-1(標準輸入(範例:en_US, zh_TW)',
  `product_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品名稱',
  `short_introduction` text COLLATE utf8mb4_unicode_ci COMMENT '短介紹',
  `introduction` text COLLATE utf8mb4_unicode_ci COMMENT '商品介紹',
  PRIMARY KEY (`uid`),
  KEY `product_language_product_uid_index` (`product_uid`),
  KEY `product_language_product_name_index` (`product_name`),
  CONSTRAINT `product_language_product_uid_foreign` FOREIGN KEY (`product_uid`) REFERENCES `product` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='市集商品名稱語言';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `product_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_type` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_type_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品類別名稱',
  `status_backend` tinyint NOT NULL DEFAULT '0' COMMENT '後台開關 ("0" 关闭(完全不显示), "1" 开启)',
  `status_front` tinyint NOT NULL DEFAULT '0' COMMENT '前台開關 ("0" 关闭(完全不显示), "1" 开启)',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `product_type_product_type_name_unique` (`product_type_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='市集商品類型';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `provider_payment_methods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `provider_payment_methods` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自動遞增的整數',
  `provider_id` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '第三方金流提供商的唯一標識符',
  `method_id` int unsigned NOT NULL COMMENT '支付方式的唯一標識符',
  `is_payment_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付金流功能是否启用',
  `is_withdrawal_enabled` tinyint(1) DEFAULT '0' COMMENT '提款功能開啟',
  `min_deposit` double(30,8) NOT NULL COMMENT '此支付方式的最小存款限額',
  `max_deposit` double(30,8) NOT NULL COMMENT '此支付方式的最大存款限額',
  `priority` int NOT NULL COMMENT '支付方式的优先级，1为最优先',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '备注信息',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `provider_method_unique` (`provider_id`,`method_id`),
  UNIQUE KEY `method_priority_unique` (`method_id`,`priority`),
  CONSTRAINT `provider_payment_methods_method_id_foreign` FOREIGN KEY (`method_id`) REFERENCES `payment_methods` (`method_id`) ON DELETE CASCADE,
  CONSTRAINT `provider_payment_methods_provider_id_foreign` FOREIGN KEY (`provider_id`) REFERENCES `third_party_providers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='金流商支付設定資料表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `push_notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `push_notifications` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `subscriptions` json NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `push_notifications_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `push_notifications_history` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_time` datetime NOT NULL,
  `cagent` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `queue_error`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `queue_error` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `queue_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `message` json DEFAULT NULL,
  `error` json DEFAULT NULL,
  `status` tinyint DEFAULT '0',
  `create_date` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roulettes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roulettes` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '活動名稱',
  `count_limit` int unsigned NOT NULL COMMENT '可累計最大次數',
  `is_wagering` int unsigned NOT NULL COMMENT '是否鎖洗碼',
  `wagering_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '洗碼類型',
  `wagering_value` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '金額/倍率',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `start_time` datetime DEFAULT NULL COMMENT '開始日期',
  `end_time` datetime DEFAULT NULL COMMENT '結束日期',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  `is_active` int unsigned NOT NULL COMMENT '是否啟用',
  `cagent_uid` int unsigned NOT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roulettes_attribute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roulettes_attribute` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `roulettes_uid` int unsigned NOT NULL COMMENT '輪盤uid',
  `currency` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '輪盤幣別',
  `award_detail` text COLLATE utf8mb4_unicode_ci COMMENT '獎勵內容加密',
  `complete_times` int unsigned NOT NULL COMMENT '總遊玩次數',
  `complete_bonus` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '總送出獎勵',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `roulettes_attribute_roulettes_uid_index` (`roulettes_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roulettes_copywriting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roulettes_copywriting` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `roulettes_uid` int unsigned NOT NULL COMMENT '輪盤uid',
  `roulettes_attribute_uid` int unsigned NOT NULL COMMENT '輪盤屬性uid',
  `sub_title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '輪盤名稱',
  `language` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '輪盤語言',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT '輪盤說明',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `roulettes_copywriting_roulettes_uid_index` (`roulettes_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roulettes_rewards_statistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roulettes_rewards_statistics` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `roulettes_attribute_uid` int unsigned NOT NULL COMMENT '連接輪盤屬性獎勵',
  `roulette_title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '獎勵的標題，代表獎勵內容',
  `rewards_cumulative_times` bigint NOT NULL COMMENT '該類別獎勵總發放次數',
  `rewards_cumulative_amount` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '該類別獎勵總發放金額',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '狀態(0:不開放抽到1:可抽到)',
  `member_info_uid` int unsigned DEFAULT NULL COMMENT '最後一個抽中該獎勵的會員',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='其實可以直接把輪盤獎勵存到這張表中，以後想改可以改，不要再用base64去存整個資料。';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `site_announcements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `site_announcements` (
  `announcement_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '公告唯一标识符，自动递增的整数',
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公告标题',
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '公告内容',
  `publish_date` datetime NOT NULL COMMENT '公告发布日期和时间',
  `expiry_date` datetime DEFAULT NULL COMMENT '公告过期日期和时间，用于自动下架过期公告',
  `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active' COMMENT '公告状态，默認為Active, 并且Inactive為停用',
  PRIMARY KEY (`announcement_id`),
  KEY `status_idx` (`status`),
  KEY `publish_date_idx` (`publish_date`),
  KEY `expiry_date_idx` (`expiry_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sql_event_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sql_event_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `event_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `error_message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `error_time` datetime NOT NULL,
  `details` json DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='紀錄mysql執行event的結果';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `tags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tags` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `tagName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '身分名稱',
  `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '身分顏色',
  `count` int NOT NULL DEFAULT '0' COMMENT '總標籤人數',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '註解',
  PRIMARY KEY (`uid`),
  KEY `tags_cagent_uid_foreign` (`cagent_uid`),
  CONSTRAINT `tags_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家標籤';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `third_party_providers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `third_party_providers` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自動遞增的整數',
  `id` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '第三方金流提供商的唯一標識符',
  `provider_file_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '提供商名稱',
  `provider_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '提供商名稱',
  `currency_code` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支持的貨幣代碼',
  `max_deposit_limit` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '此貨幣的縂存款限額',
  `max_withdrawal_limit` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '此貨幣的縂出款限額',
  `is_withdrawal_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '代付金流功能是否启用',
  `is_auto_withdrawal_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '自动代付功能是否启用',
  `is_cagent_auto_withdrawal_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '代理自动代付功能是否启用',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '备注信息',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `id_currency_code_unique` (`id`,`currency_code`),
  KEY `provider_status_idx` (`provider_name`,`is_withdrawal_enabled`,`is_auto_withdrawal_enabled`,`is_cagent_auto_withdrawal_enabled`),
  KEY `provider_name_idx` (`provider_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商資料表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `transfer_api_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `transfer_api_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `game_wallet_uid` bigint unsigned DEFAULT NULL,
  `platform` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `action` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `body_data` json DEFAULT NULL,
  `res_data` json DEFAULT NULL,
  `request_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint DEFAULT '0',
  `message` text COLLATE utf8mb4_unicode_ci,
  `create_date` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `transfer_api_log_game_wallet_uid_index` (`game_wallet_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `transfer_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `transfer_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned DEFAULT NULL,
  `game_wallet_uid` int unsigned DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `game_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `platform_enum` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `bet_time` datetime DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `status` tinyint DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT NULL,
  `lost_amount` decimal(20,6) DEFAULT NULL,
  `transfer_amount` decimal(20,6) DEFAULT NULL,
  `error_msg` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `transfer_log_member_info_uid_index` (`member_info_uid`),
  KEY `transfer_log_platform_enum_index` (`platform_enum`),
  KEY `transfer_log_status_index` (`status`),
  KEY `transfer_log_create_date_index` (`create_date`),
  KEY `transfer_log_wallet_currency_index` (`wallet_currency`),
  KEY `transfer_log_game_currency_index` (`game_currency`),
  KEY `transfer_log_game_wallet_uid_index` (`game_wallet_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `transfer_wallet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `transfer_wallet_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `action` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `member_info_uid` bigint unsigned DEFAULT NULL,
  `platform_enum` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `game_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `from` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `to` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `transfer_before` decimal(20,6) DEFAULT NULL,
  `transfer_amount` decimal(20,6) DEFAULT NULL,
  `transfer_after` decimal(20,6) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `request_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `transfer_wallet_log_member_info_uid_index` (`member_info_uid`),
  KEY `transfer_wallet_log_platform_enum_index` (`platform_enum`),
  KEY `transfer_wallet_log_wallet_currency_index` (`wallet_currency`),
  KEY `transfer_wallet_log_game_currency_index` (`game_currency`),
  KEY `transfer_wallet_log_create_date_index` (`create_date`),
  KEY `transfer_wallet_log_action_index` (`action`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_atg_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_atg_bet_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `game_wallet_uid` int DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `round_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `gamecode` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `bet_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `bet_time_unix` int DEFAULT NULL,
  `update_time_unix` int DEFAULT NULL,
  `bet_amount` decimal(20,6) DEFAULT NULL,
  `valid_bet_amount` decimal(20,6) DEFAULT NULL,
  `win_lose_amount` decimal(20,6) DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `action` tinyint DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `txn_id_1` (`txn_id`,`member_info_uid`,`round_id`) USING BTREE,
  KEY `bet_time_unix` (`bet_time_unix`) USING BTREE,
  KEY `game_wallet_uid` (`game_wallet_uid`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `txn_id` (`txn_id`) USING BTREE,
  KEY `update_time_unix` (`update_time_unix`) USING BTREE,
  KEY `wallet_currency` (`wallet_currency`) USING BTREE,
  KEY `round_id` (`round_id`) USING BTREE,
  KEY `game_code_search` (`member_info_uid`,`bet_time_unix` DESC,`gamecode`) USING BTREE,
  KEY `idx_update_time_amount` (`update_time_unix`,`win_lose_amount`) USING BTREE,
  KEY `idx_bet_time_amount` (`bet_time_unix`,`win_lose_amount`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_bng2_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_bng2_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL COMMENT '1=>下注, 2=>派彩, 3=>退款, 5=>額外獎金(不使用)',
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `bet` decimal(26,16) DEFAULT NULL,
  `valid_bet` decimal(26,16) DEFAULT NULL,
  `win` decimal(26,16) DEFAULT NULL,
  `win_lose` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `game_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tran_id` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '請求ID唯一值',
  `transfer_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'start=>下注, end=>派彩, refund=>退款, reward=>額外獎金(不使用)',
  `trans_details` json DEFAULT NULL COMMENT '交易明細',
  `betform_details` json DEFAULT NULL COMMENT '派彩和額外獎金會有下注明細',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `tran_id` (`tran_id`) USING BTREE,
  KEY `twd_bng_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `twd_bng_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `twd_bng_bet_log_action_index` (`action`) USING BTREE,
  KEY `twd_bng_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `twd_bng_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `twd_bng_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `twd_bng_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE,
  KEY `twd_bng_bet_log_event_status_index` (`event_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_bng3_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_bng3_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bet_txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `bet` decimal(26,16) DEFAULT NULL,
  `win` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `game_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `round_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'START=>開始游戲回合,END=>結束游戲回合',
  `bonus` json DEFAULT NULL COMMENT '免費游戲細節',
  `player` json DEFAULT NULL COMMENT '玩家細節',
  `c_at` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '指令生成時間',
  `sent_at` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '指令發送時間',
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `php_ds88_bet_log_action_index` (`action`) USING BTREE,
  KEY `php_ds88_bet_log_event_status_index` (`event_status`) USING BTREE,
  KEY `php_ds88_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `php_ds88_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `php_ds88_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `php_ds88_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_bng3_token_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_bng3_token_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `token` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `session` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `update_date` datetime DEFAULT NULL,
  `logout_reason` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '登出原因\r\nPLAYER_DISCONNECTED => 玩家已中斷連綫\r\nGAME_REOPENED => 具有相同貨幣的游戲開啓在新窗口或標籤頁\r\nSESSION_CLOSED => 接收到運營商 SESSION_CLOSED 的錯誤代碼，玩家會斷開連綫',
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `token` (`token`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_db_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_db_bet_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `game_wallet_uid` int DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `round_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `gamecode` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `bet_time` datetime DEFAULT NULL,
  `bet_time_unix` int DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_time_unix` int DEFAULT NULL,
  `bet_amount` decimal(20,6) DEFAULT NULL,
  `valid_bet_amount` decimal(20,6) DEFAULT NULL,
  `win_lose_amount` decimal(20,6) DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `action` tinyint DEFAULT NULL,
  `origin_data` json DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `txn_id_1` (`txn_id`,`member_info_uid`,`round_id`) USING BTREE,
  KEY `game_wallet_uid` (`game_wallet_uid`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `txn_id` (`txn_id`) USING BTREE,
  KEY `wallet_currency` (`wallet_currency`) USING BTREE,
  KEY `round_id` (`round_id`) USING BTREE,
  KEY `idx_update_time_amount` (`win_lose_amount`) USING BTREE,
  KEY `bet_time_unix` (`bet_time_unix`) USING BTREE,
  KEY `idx_bet_time_amount` (`bet_time_unix`,`win_lose_amount`) USING BTREE,
  KEY `game_code_search` (`member_info_uid`,`bet_time_unix`,`gamecode`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_dg_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_dg_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL COMMENT '1=>下注，2=>結算，3=>退款，4=>調整注單，5=>紅包，6=>小費，12=>重結算，15=>重紅包，16=>重小費',
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_bet_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '退款的下注單號',
  `amount` decimal(26,16) DEFAULT NULL,
  `valid_bet` decimal(26,16) DEFAULT NULL,
  `win` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `game_type` int DEFAULT NULL COMMENT '1=>注單，2=>紅包小費',
  `is_revocation` int DEFAULT NULL COMMENT '0=>未結算，2=>已結算，3=>已撤銷，4=>凍結',
  `bet_detail` json DEFAULT NULL COMMENT '下注明細',
  `transfers` json DEFAULT NULL COMMENT '扣款序列號',
  `ext` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '游戲唯一侷號',
  `bet_time` datetime DEFAULT NULL COMMENT '原廠的下注時間',
  `cal_time` datetime DEFAULT NULL COMMENT '原廠的結算時間',
  `detail` json DEFAULT NULL COMMENT '交易明細',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `txn_id_1` (`txn_id`,`game_round_id`,`member_info_uid`,`action`) USING BTREE,
  KEY `twd_dg_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `twd_dg_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `twd_dg_bet_log_action_index` (`action`) USING BTREE,
  KEY `twd_dg_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `twd_dg_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `twd_dg_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `twd_dg_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE,
  KEY `twd_dg_bet_log_event_status_index` (`event_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_dg_bet_log.off`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_dg_bet_log.off` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `wallet_currency` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '錢包幣別',
  `event_status` tinyint(1) NOT NULL COMMENT '是否為活動遊戲紀錄',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uid` bigint unsigned NOT NULL,
  `createDate` datetime DEFAULT NULL,
  `updateDate` datetime DEFAULT NULL COMMENT '回滾時間',
  `iaction` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '1:下注, 2:已結算, 3:下注取消已回補',
  `ticketId` decimal(20,0) DEFAULT NULL COMMENT '注單ID(或局號)',
  `data` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '轉帳流水號(每注)',
  `begin` double(15,4) DEFAULT '0.0000',
  `amount` double(15,4) DEFAULT '0.0000',
  `balance` double(15,4) DEFAULT '0.0000',
  `ts` int DEFAULT NULL,
  `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `availableBet` decimal(20,6) DEFAULT '0.000000',
  `winOrLoss` decimal(20,6) DEFAULT '0.000000',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `twd_dg_bet_log_data_uid_unique` (`data`,`uid`) USING BTREE,
  KEY `twd_dg_bet_log_ticketid_index` (`ticketId`) USING BTREE,
  KEY `twd_dg_bet_log_uid_index` (`uid`) USING BTREE,
  KEY `twd_dg_bet_log_ts_index` (`ts`) USING BTREE,
  KEY `twd_dg_bet_log_uid_iaction_ts_index` (`uid`,`iaction`,`ts`) USING BTREE,
  KEY `twd_dg_bet_log_iaction_ts_index` (`iaction`,`ts`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_fxg_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_fxg_bet_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `txn_id` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `subTxID` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `swrr_id` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gameID` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `takeWin` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `isEvent` int DEFAULT '0',
  `win` decimal(20,6) DEFAULT NULL,
  `bet` decimal(20,6) DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `txn_id` (`txn_id`) USING BTREE,
  KEY `game_round_id` (`game_round_id`) USING BTREE,
  KEY `action` (`action`) USING BTREE,
  KEY `txn_date_unix` (`txn_date_unix`) USING BTREE,
  KEY `txn_date` (`txn_date`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `wallet_currency` (`wallet_currency`) USING BTREE,
  KEY `event_status` (`event_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_fxg_token_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_fxg_token_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `token` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `token` (`token`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_mt_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_mt_bet_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `currency` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `action` tinyint DEFAULT NULL,
  `game_round_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `txn_date` datetime DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `amount` decimal(20,6) DEFAULT NULL,
  `valid_money` decimal(20,6) DEFAULT NULL,
  `data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci COMMENT 'gz壓縮後base64編碼的json資料',
  `event_status` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `twd_mt_bet_log_PK` (`txn_id`,`game_round_id`,`action`),
  KEY `bet_time_unix` (`txn_date_unix`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `round_id` (`game_round_id`) USING BTREE,
  KEY `twd_mt_bet_log_txn_date_IDX` (`txn_date`) USING BTREE,
  KEY `txn_id` (`txn_id`) USING BTREE,
  KEY `wallet_currency` (`wallet_currency`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_mt_token_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_mt_token_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `token` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `expire_time` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `game_wallet_uid` (`member_info_uid`) USING BTREE,
  KEY `twd_bng_token_log_expire_time_index` (`expire_time`) USING BTREE,
  KEY `twd_bng_token_log_token_index` (`token`) USING BTREE,
  KEY `userId` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_qtech_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_qtech_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '游戲類別',
  `txn_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易類型-(DEBIT=BET, CREDIT=SETTLE)',
  `created` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '原廠的交易時間',
  `completed` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '游戲是否完成-(True, False)',
  `player_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家游戲id',
  `bet_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'QT Platform生成的相关投注（提款）交易ID',
  `table_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '真人视讯游戏中每个tableID的唯一key',
  `bonus_bet_amount` decimal(26,16) DEFAULT NULL COMMENT '獎金投注額',
  `bonus_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'FREE_ROUND,FRETURE_TRIGGER',
  `bonus_promo_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '獎金游戲追蹤碼',
  `jp_contributions` json DEFAULT NULL COMMENT '每個獎池的獎金貢獻',
  `jp_payout` decimal(26,16) DEFAULT NULL COMMENT '奖池奖励的金额',
  `conversion_rate` json DEFAULT NULL COMMENT '本游戏局使用的汇率',
  `device` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '游玩設備',
  `client_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'HTML,FLASH',
  `client_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '在游戏客户端投注历史中给出的游戏局ID',
  `reward_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '競賽或活動類型',
  `reward_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '競賽或活動名稱',
  `before_balance` decimal(26,16) DEFAULT NULL COMMENT '扣款前餘額',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `txn_id_1` (`txn_id`,`game_round_id`,`member_info_uid`,`action`) USING BTREE,
  KEY `twd_qtech_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `twd_qtech_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `twd_qtech_bet_log_action_index` (`action`) USING BTREE,
  KEY `twd_qtech_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `twd_qtech_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `twd_qtech_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `twd_qtech_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE,
  KEY `twd_qtech_bet_log_event_status_index` (`event_status`) USING BTREE,
  KEY `twd_qtech_bet_log_bet_id` (`bet_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_qtech_bet_log.off`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_qtech_bet_log.off` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `wallet_currency` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '錢包幣別',
  `event_status` tinyint NOT NULL COMMENT '是否為活動遊戲紀錄',
  `txnType` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `referenceId` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '我方的uuid，必要參數',
  `txnId` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '注單號',
  `betId` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '對應的原始注單號',
  `roundId` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `completed` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `currency` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `uid` bigint unsigned DEFAULT NULL,
  `playerId` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `created` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `createdUnix` int DEFAULT NULL,
  `gameId` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `amount` decimal(30,8) DEFAULT NULL,
  `bonusBetAmount` decimal(30,8) DEFAULT NULL,
  `bonusType` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `bonusPromoCode` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `jpContributions_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `jpContributions_amount` decimal(30,8) DEFAULT NULL,
  `jpContributions_balance` decimal(30,8) DEFAULT NULL,
  `conversionRate_pair` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `conversionRate_rate` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `device` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `clientType` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `clientRoundId` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `category` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `tableId` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `rewardType` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rewardTitle` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `php_qtech_bet_log_referenceid_unique` (`referenceId`) USING BTREE,
  KEY `php_qtech_bet_log_txnid_index` (`txnId`) USING BTREE,
  KEY `php_qtech_bet_log_betid_index` (`betId`) USING BTREE,
  KEY `php_qtech_bet_log_gameid_index` (`gameId`) USING BTREE,
  KEY `php_qtech_bet_log_completed_index` (`completed`) USING BTREE,
  KEY `php_qtech_bet_log_playerid_index` (`playerId`) USING BTREE,
  KEY `php_qtech_bet_log_roundid_index` (`roundId`) USING BTREE,
  KEY `php_qtech_bet_log_uid_index` (`uid`) USING BTREE,
  KEY `php_qtech_bet_log_createdunix_index` (`createdUnix`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_t9_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_t9_bet_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action` tinyint DEFAULT NULL,
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `OrderNumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `txn_date` datetime DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `amount` decimal(20,6) DEFAULT NULL,
  `valid_money` decimal(20,6) DEFAULT '0.000000',
  `bet` decimal(20,6) DEFAULT '0.000000',
  `win` decimal(20,6) DEFAULT '0.000000',
  `data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'gz壓縮後base64編碼的json資料',
  `event_status` tinyint(1) DEFAULT NULL,
  `OrderStatus` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agentId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `requestTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sign` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tableId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `roomId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gameType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `device` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `iP` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gamePlay` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gameResult` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `txn_id_unix` (`txn_id`,`game_round_id`,`action`),
  KEY `OrderNumber` (`OrderNumber`) USING BTREE,
  KEY `bet_time_unix` (`txn_date_unix`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE,
  KEY `round_id` (`game_round_id`) USING BTREE,
  KEY `twd_t9_bet_log_txn_date_IDX` (`txn_date`) USING BTREE,
  KEY `txn_id` (`txn_id`) USING BTREE,
  KEY `wallet_currency` (`wallet_currency`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_tag_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_tag_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `debit_amount` decimal(26,16) DEFAULT NULL,
  `credit_amount` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `detail` json DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `txn_id_1` (`txn_id`,`game_round_id`,`member_info_uid`,`action`) USING BTREE,
  KEY `twd_tag_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `twd_tag_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `twd_tag_bet_log_action_index` (`action`) USING BTREE,
  KEY `twd_tag_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `twd_tag_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `twd_tag_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `twd_tag_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE,
  KEY `twd_tag_bet_log_event_status_index` (`event_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_zg_bet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_zg_bet_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `valid_bet` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bet_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `feature_buy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'FG=>FREEGAME.BG+>BONUSGAME',
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `php_ds88_bet_log_action_index` (`action`) USING BTREE,
  KEY `php_ds88_bet_log_event_status_index` (`event_status`) USING BTREE,
  KEY `php_ds88_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `php_ds88_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `php_ds88_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `php_ds88_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_zg_bet_log.off`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_zg_bet_log.off` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `action` int DEFAULT NULL,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet_currency` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event_status` tinyint DEFAULT '0',
  `game_round_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(26,16) DEFAULT NULL,
  `txn_date_unix` int DEFAULT NULL,
  `txn_date` datetime DEFAULT NULL,
  `game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `php_ds88_bet_log_action_index` (`action`) USING BTREE,
  KEY `php_ds88_bet_log_event_status_index` (`event_status`) USING BTREE,
  KEY `php_ds88_bet_log_game_round_id_index` (`game_round_id`) USING BTREE,
  KEY `php_ds88_bet_log_member_info_uid_index` (`member_info_uid`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_index` (`txn_date`) USING BTREE,
  KEY `php_ds88_bet_log_txn_date_unix_index` (`txn_date_unix`) USING BTREE,
  KEY `php_ds88_bet_log_txn_id_index` (`txn_id`) USING BTREE,
  KEY `php_ds88_bet_log_wallet_currency_index` (`wallet_currency`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_zg_test_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_zg_test_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `params1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `response1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `response2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `twd_zg_token_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `twd_zg_token_log` (
  `uid` bigint NOT NULL AUTO_INCREMENT,
  `member_info_uid` int DEFAULT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `token` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `token` (`token`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `member_info_uid` (`member_info_uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `unlimit_settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `unlimit_settings` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `currency` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `min` decimal(16,10) DEFAULT NULL,
  `max` decimal(16,10) DEFAULT NULL,
  `level` int DEFAULT NULL,
  `per` double DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `unlimit_settings_currency_index` (`currency`),
  KEY `unlimit_settings_min_index` (`min`),
  KEY `unlimit_settings_max_index` (`max`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `unlimit_tree`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `unlimit_tree` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned DEFAULT NULL,
  `level` int DEFAULT NULL,
  `src` bigint unsigned DEFAULT NULL,
  `lft` int DEFAULT NULL,
  `rgt` int DEFAULT NULL,
  `createDate` datetime DEFAULT NULL,
  `testn` bigint unsigned DEFAULT NULL,
  `manual` tinyint NOT NULL DEFAULT '0' COMMENT '手動加上',
  `invited_json` json DEFAULT NULL COMMENT '邀請了誰',
  `invited_count` int DEFAULT NULL COMMENT '邀請了幾個',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `unlimit_tree_member_info_uid_unique` (`member_info_uid`),
  KEY `p2cSearch` (`uid`,`level`,`src`),
  KEY `c2pSearch` (`uid`,`level`,`member_info_uid`),
  KEY `lfrgSearch` (`uid`,`lft`,`rgt`),
  KEY `unlimit_tree_invited_count_index` (`invited_count`),
  CONSTRAINT `unlimit_tree_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user_favorite_games`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_favorite_games` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `user_uid` int unsigned NOT NULL COMMENT '用户的唯一标识符，外键，关联到用户表的用户ID。',
  `game_list_uid` int unsigned NOT NULL COMMENT '游戏的唯一标识符，外键，关联到 game_list 表的游戏ID。',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '0 代表已经关闭这个最爱，1 代表打开着最爱',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `user_uid` (`game_list_uid`,`user_uid`),
  KEY `game_list_uid` (`game_list_uid`),
  CONSTRAINT `user_favorite_games_game_list_uid_foreign` FOREIGN KEY (`game_list_uid`) REFERENCES `game_list_new` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user_game_clicks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_game_clicks` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `user_uid` int unsigned NOT NULL COMMENT '用户的唯一标识符，外键，关联到用户表的用户ID。',
  `game_list_uid` int unsigned NOT NULL COMMENT '游戏的唯一标识符，外键，关联到 game_list 表的游戏ID。',
  `click_count` int NOT NULL DEFAULT '1' COMMENT '点击次数',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `user_game_clicks_user_uid_game_list_uid_unique` (`user_uid`,`game_list_uid`),
  KEY `user_game_clicks_game_list_uid_index` (`game_list_uid`),
  CONSTRAINT `user_game_clicks_game_list_uid_foreign` FOREIGN KEY (`game_list_uid`) REFERENCES `game_list_new` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `verify_codes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `verify_codes` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `contact` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `expired_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `verify_codes_code_index` (`code`),
  KEY `verify_codes_contact_index` (`contact`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `level` int unsigned NOT NULL COMMENT '等級',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名稱',
  `comment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '解說',
  `rebate_days` tinyint NOT NULL DEFAULT '0' COMMENT '返水天數',
  `last_rebate_time` datetime DEFAULT NULL COMMENT '上一次返水時間',
  `last_rebate_ts` timestamp NULL DEFAULT NULL COMMENT '上一次返水unix',
  PRIMARY KEY (`uid`),
  KEY `vip_level_idx` (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家等級';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip_criteria` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `vip_uid` int unsigned DEFAULT NULL COMMENT 'vip_uid',
  `vip_level` int unsigned DEFAULT NULL COMMENT 'vip_level',
  `currency_code` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `criteria_amount` decimal(30,8) DEFAULT NULL COMMENT '洗碼量標準',
  PRIMARY KEY (`uid`),
  KEY `vip_criteria_vip_uid_index` (`vip_uid`),
  KEY `vip_criteria_vip_level_index` (`vip_level`),
  KEY `vip_criteria_currency_code_index` (`currency_code`),
  CONSTRAINT `vip_criteria_vip_uid_foreign` FOREIGN KEY (`vip_uid`) REFERENCES `vip` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='vip晉升洗碼量條件';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip_game_rebate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip_game_rebate` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `vip_uid` int unsigned NOT NULL COMMENT 'vip_uid',
  `vip_level` int unsigned NOT NULL COMMENT 'vip_level',
  `all_platform_uid` int unsigned DEFAULT NULL COMMENT '遊戲平台的UID',
  `rebate` double(5,2) NOT NULL DEFAULT '0.00' COMMENT '返水%數',
  `rebate_range` json DEFAULT NULL COMMENT '依據投注量取得返水%數',
  PRIMARY KEY (`uid`),
  KEY `vip_game_rebate_all_platform_uid_foreign` (`all_platform_uid`),
  KEY `vip_currency_platform_idx` (`vip_uid`,`all_platform_uid`),
  CONSTRAINT `vip_game_rebate_all_platform_uid_foreign` FOREIGN KEY (`all_platform_uid`) REFERENCES `all_platform` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `vip_game_rebate_vip_uid_foreign` FOREIGN KEY (`vip_uid`) REFERENCES `vip` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='VIP遊戲返水%數設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip_game_table_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip_game_table_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `vip_uid` int unsigned NOT NULL COMMENT 'VIP等級UID',
  `vip_level` int unsigned NOT NULL COMMENT 'VIP等級level',
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `all_platform_uid` int unsigned NOT NULL COMMENT '遊戲平台的UID',
  `min_limit` int NOT NULL DEFAULT '0' COMMENT '最小投注限制',
  `max_limit` int NOT NULL DEFAULT '0' COMMENT '最大投注限制',
  `max_win_limit` int NOT NULL DEFAULT '0' COMMENT '最大贏錢限額',
  PRIMARY KEY (`uid`),
  KEY `vip_game_table_limit_all_platform_uid_foreign` (`all_platform_uid`),
  KEY `vip_game_table_limit_currency_code_foreign` (`currency_code`),
  KEY `vip_currency_platform_idx` (`vip_uid`,`currency_code`,`all_platform_uid`),
  CONSTRAINT `vip_game_table_limit_all_platform_uid_foreign` FOREIGN KEY (`all_platform_uid`) REFERENCES `all_platform` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `vip_game_table_limit_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `vip_game_table_limit_vip_uid_foreign` FOREIGN KEY (`vip_uid`) REFERENCES `vip` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='VIP遊戲限紅設定';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip_payment_tags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip_payment_tags` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `vip_uid` int unsigned NOT NULL COMMENT 'vip_uid',
  `vip_level` int unsigned NOT NULL COMMENT 'vip_level',
  `currency_code` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `withdrawTimes` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '提款次數',
  `withdrawMini` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '提領最小值',
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`uid`),
  KEY `vip_payment_tags_currency_code_foreign` (`currency_code`),
  KEY `vip_currency_idx` (`vip_uid`,`currency_code`),
  CONSTRAINT `vip_payment_tags_currency_code_foreign` FOREIGN KEY (`currency_code`) REFERENCES `currencies` (`currency_code`),
  CONSTRAINT `vip_payment_tags_vip_uid_foreign` FOREIGN KEY (`vip_uid`) REFERENCES `vip` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='存提限制設定(原b69.tags)';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vip_withdrawal_rate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vip_withdrawal_rate` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `vip_uid` int unsigned NOT NULL COMMENT 'vip uid',
  `vip_level` int unsigned NOT NULL COMMENT 'vip level',
  `number` tinyint NOT NULL DEFAULT '0' COMMENT '提領次數',
  `rate` double NOT NULL COMMENT '提領費率',
  PRIMARY KEY (`uid`),
  KEY `vip_withdrawal_rate_vip_uid_foreign` (`vip_uid`),
  CONSTRAINT `vip_withdrawal_rate_vip_uid_foreign` FOREIGN KEY (`vip_uid`) REFERENCES `vip` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `wagering_restricted_list`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `wagering_restricted_list` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `operator` int unsigned NOT NULL COMMENT '操作人員,代理',
  `restricted_event` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '被限制洗碼的事件，範例:"cash_deposit: 100 USD.", "giftPackage of event 12: 100000 VND"',
  `restricted_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '被限制洗碼的幣別',
  `restricted_wallet` tinyint(1) NOT NULL DEFAULT '0' COMMENT '被限制洗碼的錢包:{0:主錢包,1:活動錢包}',
  `restricted_platform` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '被限制洗碼的錢包活動館別',
  `restricted_source_amount` decimal(30,8) DEFAULT NULL COMMENT '被凍結的動作金額',
  `restricted_amount` decimal(30,8) NOT NULL COMMENT '解凍所需的洗碼量',
  `restricted_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '解凍狀態:{0:未解凍, 1:已解凍}',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `wagering_restricted_list_member_info_uid_index` (`member_info_uid`),
  KEY `wagering_restricted_list_restricted_currency_index` (`restricted_currency`),
  KEY `wagering_restricted_list_restricted_status_index` (`restricted_status`),
  CONSTRAINT `wagering_restricted_list_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `wagering_restricted_list_restricted_currency_foreign` FOREIGN KEY (`restricted_currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `wallet_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `wallet_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `cagent_uid` int NOT NULL COMMENT '操作cagent代理編號',
  `currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別',
  `transhash` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '871884e4-1c84-40be-bf04-18d229288528' COMMENT '交易編號',
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱，暫無統一規範',
  `from` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payer，付款方',
  `to` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'payee，收款方',
  `transfer_before` decimal(30,8) NOT NULL COMMENT '交易前錢包餘額',
  `transfer_point` decimal(30,8) NOT NULL COMMENT '交易額度',
  `transfer_after` decimal(30,8) NOT NULL COMMENT '交易後錢包餘額',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `memo2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `memo3` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `wallet_log_member_info_uid_currency_from_to_index` (`member_info_uid`,`currency`,`from`,`to`),
  KEY `wallet_log_member_info_uid_created_at_index` (`member_info_uid`,`created_at`),
  KEY `wallet_log_member_info_uid_action_index` (`member_info_uid`,`action`),
  KEY `wallet_log_cagent_uid_index` (`cagent_uid`),
  KEY `wallet_log_transhash_index` (`transhash`),
  KEY `wallet_log_currency_index` (`currency`),
  KEY `wallet_log_action_index` (`action`),
  KEY `wallet_log_from_index` (`from`),
  KEY `wallet_log_to_index` (`to`),
  KEY `wallet_log_created_at_index` (`created_at`),
  CONSTRAINT `wallet_log_currency_foreign` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `weekly_wallet_settle_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weekly_wallet_settle_logs` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` bigint unsigned NOT NULL COMMENT '會員 UID',
  `game_wallet_uid` bigint unsigned NOT NULL,
  `platform_enum` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '平台代碼，如 JILI、PG',
  `balance` decimal(18,2) NOT NULL COMMENT '第三餘額',
  `status` enum('pending','success','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending' COMMENT '轉帳狀態',
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '錯誤訊息（若有）',
  `sus_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `settle_std` datetime DEFAULT NULL COMMENT '結帳週期（本週結帳日）',
  `settle_etd` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT (now()),
  `updated_at` timestamp NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `member_info_uid_2` (`member_info_uid`,`platform_enum`,`settle_std`,`settle_etd`) USING BTREE,
  KEY `idx_member_platform` (`member_info_uid`,`platform_enum`) USING BTREE,
  KEY `idx_settle_week` (`settle_std`) USING BTREE,
  KEY `settle_etd` (`settle_etd`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `game_wallet_uid` (`game_wallet_uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `whitelist`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `whitelist` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `type` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '類別(ip, bank, country)',
  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  PRIMARY KEY (`uid`),
  KEY `whitelist_type_idx` (`type`),
  KEY `whitelist_cagent_uid_foreign` (`cagent_uid`),
  CONSTRAINT `whitelist_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `winlose_dataland_cagent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `winlose_dataland_cagent` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `hash` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '資料用唯一值hash',
  `cagent_uid` int DEFAULT NULL,
  `sub_cagent_uid` int DEFAULT NULL,
  `platform` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `landdate` date DEFAULT NULL,
  `is_total` tinyint(1) NOT NULL COMMENT '是否為total',
  `created_at` datetime DEFAULT NULL,
  `total_bet` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `raw_total_bet` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `winorlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `cagent_winlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `up_paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `recive_paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `member_balance` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `up_paycom_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `main_burden_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_winlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_game_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_game_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pay_vendor_com_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pay_vendor` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_com` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_total` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `donate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `donate_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_donate_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  PRIMARY KEY (`uid`),
  KEY `winlose_dataland_cagent_hash_IDX` (`hash`),
  KEY `winlose_sattle_cagent_platform_IDX` (`platform`),
  KEY `winlose_sattle_cagent_main_cagent_uid_IDX` (`cagent_uid`,`sub_cagent_uid`),
  KEY `winlose_dataland_cagent_landdate_IDX` (`landdate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `winlose_dataland_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `winlose_dataland_member` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `hash` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '資料用唯一值hash',
  `cagent_uid` int NOT NULL,
  `member_info_uid` int NOT NULL,
  `platform` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `landdate` date NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `total_bet` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `raw_total_bet` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `winorlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `cagent_winlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `up_paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `recive_paycom` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `member_balance` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `up_paycom_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `main_burden_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_winlose` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_game_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_cagent_game_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pay_vendor_com_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pay_vendor` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_rebate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_com` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `pay_vendor_total` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `donate` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `donate_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  `main_donate_profit` decimal(20,6) NOT NULL DEFAULT '0.000000',
  PRIMARY KEY (`uid`),
  KEY `winlose_dataland_member_hash_IDX` (`hash`),
  KEY `winlose_sattle_member_platform_IDX` (`platform`),
  KEY `winlose_sattle_member_platform_cagent_uid_IDX` (`cagent_uid`),
  KEY `winlose_sattle_member_platform_member_info_uid_IDX` (`member_info_uid`),
  KEY `winlose_sattle_member_cagent_member_IDX` (`cagent_uid`,`member_info_uid`),
  KEY `winlose_dataland_member_landdate_IDX` (`landdate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_000000_create_users_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_100000_create_password_reset_tokens_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_08_19_000000_create_failed_jobs_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2019_12_14_000001_create_personal_access_tokens_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2023_11_28_022522_create_all_platform_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2023_11_28_110000_create_currencies_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2023_11_29_071123_create_platform_maintenance_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2023_11_29_172301_create_page_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2023_11_29_172639_create_cagent_page_permission_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2023_11_29_173926_create_cagent_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2023_11_29_173927_create_cagent_game_profit_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2023_11_29_173928_create_cagent_game_permission_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2023_11_29_173929_create_vip_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2023_11_29_174352_create_api_key_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2023_11_29_174352_create_member_info_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2023_11_29_182032_create_member_game_table_limit_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2023_11_29_182032_create_vip_game_table_limit_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2023_11_29_182614_create_vip_game_rebate_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2023_11_29_184349_create_vip_payment_tags_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2023_11_29_184350_create_tags_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2023_11_29_190222_create_member_login_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2023_11_30_102841_create_game_wallet_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2023_11_30_104053_create_blacklist_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2023_11_30_104517_create_base_configs_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2023_11_30_110524_create_internal_notifications_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2023_11_30_111119_create_notification_read_status_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2023_11_30_111320_create_site_announcements_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2023_11_30_111501_create_marquee_announcements_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2023_11_30_113102_create_company_bank_accounts_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2023_11_30_113454_create_third_party_providers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2023_11_30_113857_create_member_deposits_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2023_11_30_113860_create_company_receipts_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2023_11_30_114702_create_member_withdrawals_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2023_12_08_164244_create_backend_action_logs_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2023_12_12_113121_create_game_type_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2023_12_12_113655_create_game_subtype_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2023_12_12_113944_create_game_list_new_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2023_12_13_153904_create_member_rebate_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2023_12_14_131655_create_payment_methods',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2023_12_14_131703_create_provider_payment_methods',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2023_12_14_164334_create_events_list',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2023_12_14_180036_create_events_attributes',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2023_12_15_140906_create_internal_notification_language_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2023_12_18_173851_create_events_copywriting',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2023_12_20_175508_create_unlimit_tree_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2024_01_03_175508_create_user_favorite_games',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2024_01_03_175509_create_user_game_clicks',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2024_01_03_175510_create_game_clicks_statistics',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2024_01_03_175510_create_member_info_bank',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2024_01_08_142912_create_wagering_restricted_list_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2024_01_08_143403_create_member_event_status_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2024_01_08_165839_create_member_event_rewards_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2024_01_09_193835_create_game_wallet_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2024_01_10_121101_create_wallet_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2024_01_11_150912_create_marquee_announcements_language',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2024_01_15_171832_create_action_type_list_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2024_01_16_193835_create_member_info_action_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2024_01_17_093721_create_cagent_wallet',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2024_01_17_093725_create_cagent_wallet_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2024_01_26_171956_create_vip_withdrawal_rate',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2024_02_02_090514_create_member_crypto_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2024_02_02_133555_cteate_data_land',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2024_02_06_174713_cteate_cagent_profit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2024_02_15_153446_create_buffer_wallet_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2024_02_16_153446_create_crypto_wallet_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2024_02_16_153446_create_queue_error_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2024_02_21_103832_create_member_commission',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2024_02_21_103832_create_verify_code',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2024_02_22_144025_create_vip_criteria',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2024_02_23_104099_create_news_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2024_02_23_144812_create_member_vip_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2024_02_26_104100_create_news_language_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2024_02_26_104100_create_unlimit_settings_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2024_03_21_155329_create_carousels_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2024_03_22_091341_create_carousels_language_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2024_03_28_152011_create_base_language_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2024_04_08_155950_create_roulettes_attribute',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2024_04_08_155951_create_roulettes',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (79,'2024_04_08_155951_create_roulettes_copywriting',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (80,'2024_04_08_161124_create_live_chat_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (81,'2024_04_09_105245_create_member_roulettes_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (82,'2024_04_25_102254_create_member_settlement_report',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (83,'2024_05_08_115701_create_transfer_api_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (84,'2024_05_08_115836_create_transfer_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2024_05_08_120003_create_transfer_wallet_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2024_05_24_164127_create_member_bet_limit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (87,'2024_05_31_163312_cagent_promo_code',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (88,'2024_06_05_114715_create_game_bet_limit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (89,'2024_07_08_114821_create_sql_event_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (90,'2024_07_09_112113_create_member_profit_limit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (91,'2024_07_09_112331_create_jackpot',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (92,'2024_07_29_153243_create_continuous_events',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (93,'2024_07_29_153303_create_continuous_events_attribute',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (94,'2024_07_29_153315_create_continuous_events_copywriting',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (95,'2024_07_29_153401_create_member_continuous_events_rewards',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2024_07_31_185014_create_roulettes_rewards_statistics',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2024_08_15_170449_update_game_list_new',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (98,'2024_08_19_094828_update_cagent_wallet_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (99,'2024_08_28_134414_update_all_platform',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (100,'2024_08_29_104943_add_game_wallet_column_transfer_point',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (101,'2024_08_29_113804_add_news_column_route_link',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (102,'2024_08_29_134414_update_game_wallet',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2024_08_29_134414_update_member_rebate',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (104,'2024_08_29_145253_add_game_list_new_column_deleted_at',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (105,'2024_08_30_103515_add_base_configs_vip_open',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (106,'2024_09_02_114546_add_member_vip_info_last_downgraded_time',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (107,'2024_09_09_114702_create_cagent_withdrawals_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (108,'2024_09_09_115128_update_cagent_wallet',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (109,'2024_09_09_119372_create_cagent_commission_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (110,'2024_09_09_119381_update_company_bank_accounts',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (111,'2024_09_09_133513_add_base_configs_bing_id_card',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (112,'2024_09_09_133513_add_member_rebate',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (113,'2024_09_11_103817_add_member_deposits_payment_methods_id',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (114,'2024_09_11_104103_add_member_withdrawals_payment_methods_id',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (115,'2024_09_11_119381_update_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (116,'2024_09_12_120116_add_cagent_withdrawals_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (117,'2024_09_12_150308_add_cagent_wallet_log_transhash',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (118,'2024_09_13_145011_add_provider_payment_methods_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (119,'2024_09_26_132814_add_event_list_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (120,'2024_09_26_140956_add_base_configs_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (121,'2024_09_30_174826_add_base_configs_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (122,'2024_10_17_09212_create_product_type_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (123,'2024_10_17_092648_create_product_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (124,'2024_10_17_092755_create_product_image_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (125,'2024_10_17_093019_create_product_language_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (126,'2024_10_17_093414_create_member_product_order_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (127,'2024_10_17_153827_add_base_configs_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (128,'2024_10_18_105146_add_third_party_providers_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (129,'2024_11_15_165016_create_machine_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (130,'2024_11_15_165459_create_password_recovery_token',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (131,'2024_11_15_165681_update_member_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (132,'2024_11_22_132656_create_cagent_telegram_info_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (133,'2024_11_29_165335_add_base_configs_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (134,'2024_12_03_104813_create_cagent_game_rebate',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (135,'2024_12_03_105917_create_cagent_info_history',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (136,'2024_12_03_110226_upsert_cagent_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (137,'2024_12_03_171505_add_game_list_new_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (138,'2024_12_06_000001_create_member_lose_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (139,'2024_12_06_00000_create_member_lose_limit_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (140,'2024_12_10_093803_create_cagent_bet_limit_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (141,'2024_12_18_101830_create_push_notifications_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (142,'2024_12_23_101633_create_push_notifications_history',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (143,'2024_12_25_134521_create_data_land_half_of_day_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (144,'2024_12_25_155613_add_current_profit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (145,'2024_12_25_155732_create_member_setting_history_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (146,'2024_12_31_101546_create_winlose_dataland_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (147,'2024_12_31_101547_create_winlose_dataland_member',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (148,'2024_12_31_102905_create_cash_register_log',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (149,'2025_01_03_203977_create_member_game_rebate_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (150,'2025_01_16_165615_add_current_rebate',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (151,'2025_01_16_168304_create_member_point_transfer_temp_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (152,'2025_01_20_175611_add_machine_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (153,'2025_01_23_179615_add_backend_action_logs',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (154,'2025_02_03_142745_update_all_platform',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (155,'2025_02_24_163132_add_column_into_machine_info_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (156,'2025_02_26_184503_create_game_clicks_land_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (157,'2025_03_12_184745_add_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (158,'2025_03_17_188413_add_machine_info',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (159,'2025_03_31_189511_add_base_configs',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (160,'2025_04_07_189601_add_all_platform',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (161,'2025_04_07_189711_add_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (162,'2025_04_16_191501_create_all_platform_config_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (163,'2025_04_24_192741_add_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (164,'2025_04_29_193507_create_member_risk_watchlist_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (165,'2025_04_29_193701_add_base_configs',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (166,'2025_05_02_105744_add_all_platform_config_column',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (167,'2025_05_06_171613_create_whitelists_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (168,'2025_05_06_197702_add_base_configs',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (169,'2025_05_06_197807_create_cagent_statistics_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (170,'2025_05_12_199701_add_all_platform',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (171,'2025_05_15_199903_add_all_platform',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (172,'2025_06_17_152210_add_member_lose_limit',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (173,'2025_06_17_199903_create_donate_log_table_',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (174,'2025_07_01_199941_add_cagent',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (175,'2025_07_04_190222_create_cagent_login_log_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (176,'2025_07_29_199903_add_all_platform',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (177,'2025_04_16_197213_add_data_land_half_of_day',3);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (178,'2025_04_10_190712_add_data_land_half_of_day',4);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (179,'2025_02_25_161430_add_column_into_member_lose_limit_table',5);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (180,'2025_08_01_199908_add_member_lose_limit',5);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (181,'2025_08_05_194274_create_engineer_action_logs_table',6);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (182,'2025_07_17_171903_add_game_list_new',7);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (183,'2025_08_27_196581_update_all_platform_config_table',8);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (184,'2025_08_13_195271_create_game_play_disable_table',9);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (185,'2025_09_23_199908_add_all_platform',10);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (186,'2025_10_13_199999_add_cagent',11);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (187,'2025_10_23_187608_add_cagent_login_log',12);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (188,'2025_11_19_104846_create_job_batches_table',13);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (189,'2025_11_20_142626_create_jobs_table',14);
