--
-- Host: localhost    Database: skyworld_test
-- ------------------------------------------------------


--
-- Table structure for table `API_KEY`
--

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 NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `API_KEY`
--


--
-- Table structure for table `all_platform`
--

CREATE TABLE `all_platform` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '前端和客戶會看到的名稱 (可以修改的平臺名稱)',
  `platform_mode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'single' COMMENT '该平台模式转账还是单一',
  `supported_currencies` json DEFAULT NULL COMMENT '该品牌支持的货币，以JSON格式存储',
  `platform_enum` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '个平台的固定常量(不可修改)',
  `game_wallet_name` varchar(100) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '遊戲資訊，不含前綴(prefix)的表格名稱',
  `report_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '報表、詳細紀錄(用API從原廠抓取的)，不含前綴(prefix)的表格名稱',
  `primary_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '歷程表的唯一鍵',
  `member_info_uid_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '會員編號在該館別的欄位名稱',
  `date_time_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'date時間欄位名稱',
  `date_time_timezone` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'date時間欄位的時區範例:"+8"',
  `unix_time_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '時間戳欄位名稱',
  `report_time_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲帳務時間所使用的欄位名稱',
  `round_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲回合的欄位名稱',
  `order_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '紀錄遊戲局別的欄位名稱',
  `amount_before_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易前餘額欄位名稱',
  `amount_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '交易金额欄位名稱',
  `amount_after_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '交易后餘額欄位名稱',
  `win` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '贏金額欄位或公式',
  `win_or_lose` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '輸贏欄位或公式',
  `jack_port_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'JackPort欄位名稱',
  `game_id_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '遊戲ID欄位名稱',
  `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',
  `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家遊戲名稱欄位',
  `transaction_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易狀態欄位或公式',
  `transaction_status_judgment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易狀態Enum',
  `oem_order_detail_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '原廠查訂單明細用ID',
  `oem_order_detail_option` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '原廠查訂單明細用，填充選項',
  `sum_bet_order` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'select計算下注額的mysql指令(不含where條件)',
  `sum_win_order` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'select計算輸贏額的mysql指令(不含where條件)',
  `excluding_cancelled` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'mysql指令中where的條件子句，排除取消單',
  `other_conditions` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '動態搜尋用的其他條件',
  `sum_valid_bet` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '有效投注欄位',
  `table_style` tinyint(1) DEFAULT NULL COMMENT '表格顯示樣式(1:911模式,0:新模式)',
  `game_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '平台遊戲類別',
  `sort` int DEFAULT '0' COMMENT '平台排序',
  `bet_limit_count` int NOT NULL DEFAULT '0',
  `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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '玩家帳號名稱後綴',
  `oem_order_use_model` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '0=>顯示原廠url, 1=>顯示多筆下注的model',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `platform_enum_unique` (`platform_enum`) USING BTREE,
  UNIQUE KEY `all_platform_platform_enum_unique` (`platform_enum`) USING BTREE,
  KEY `platform_mode_idx` (`platform`,`platform_mode`) USING BTREE,
  KEY `front_back_status_idx` (`status_front`,`status_backend`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `all_platform`
--

INSERT INTO `all_platform` VALUES (1,'WM','single',NULL,'WM','wm',1,0,1,'10:00:00','12:30:00',0,1,1,0,0.10000000,0,'wm_bet_log',NULL,'id','uid','requestDate','8','unix_time',NULL,'gameno','dealid',NULL,'CASE WHEN code = 2 THEN money ELSE 0 END',NULL,'CASE WHEN code = 1 THEN money ELSE 0 END',NULL,NULL,NULL,0.00,0.00,0,'user','CASE WHEN cmd =\'TimeoutBetReturn\' THEN 3 ELSE code END','{\"2\":\"bet\",\"1\":\"payout\",\"3\":\"cancel\"}',NULL,NULL,'sum(case when CODE = \'2\' then -money ELSE 0 END)','SUM(money)','',NULL,NULL,1,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(2,'PG','single',NULL,'PG','pg',1,0,0,'00:00:00','23:00:00',0,0,0,0,0.10000000,0,'pg_bet_log',NULL,'uid','member_info_uid','txn_date',NULL,'txn_date_unix',NULL,'game_round_id','txn_id','','bet_amount','','win_amount','',NULL,'',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"cancel\"}',NULL,NULL,'SUM(bet_amount)','SUM(amount)',NULL,NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(3,'EVO','single',NULL,'EVO','evo',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'evo_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END',NULL,NULL,'JSON_UNQUOTE(JSON_EXTRACT(game_detail, \"$.table.id\"))',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"payout\"}',NULL,NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(\r\n    CASE \r\n        WHEN action = 2 THEN amount\r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN amount\r\n        ELSE 0 \r\n    END\r\n)','',NULL,NULL,1,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(4,'JILI','single',NULL,'JILI','jili',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'jili_bet_log',NULL,'uid','memId','endTime','8','endTime_Unixt',NULL,'round','sessionId','beginGold','CASE WHEN action = 3 THEN -betAmount ELSE betAmount END','balance','winloseAmount','CASE \r\nWHEN `type` = \'EGAME\' THEN \r\n    CASE \r\n        WHEN `ACTION` = \'2\' THEN netWin \r\n        WHEN `ACTION` = \'3\' THEN cancel \r\n        ELSE 0 \r\n    END\r\nWHEN `type` = \'TABLE\' THEN netWin\r\nELSE 0 \r\nEND','jpWin','game',0.00,0.00,0,'userId','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','round',NULL,'SUM(\n    CASE \n        WHEN `type` = \'EGAME\' THEN \n            CASE \n                WHEN `ACTION` = \'2\' THEN betAmount \n                WHEN `ACTION` = \'3\' THEN -betAmount \n                ELSE 0 \n            END\n        WHEN `type` = \'TABLE\' THEN \n            CASE \n                WHEN `ACTION` = \'1\' THEN betAmount\n                WHEN `ACTION` = \'2\' THEN betAmount \n                WHEN `ACTION` = \'3\' THEN -cancel \n                ELSE 0 \n            END \n        ELSE 0 \n    END\n)','SUM(\n                    CASE \n                        WHEN `type` = \'EGAME\' THEN \n                            CASE \n                                WHEN `ACTION` = \'2\' AND transaction_status!=\'cancel\' THEN winloseAmount-betAmount\n                                ELSE 0 \n                            END\n                        WHEN `type` = \'TABLE\' THEN \n                            CASE \n                                WHEN `ACTION` = \'2\' THEN winloseAmount \n                                WHEN `ACTION` = \'1\' THEN -betAmount\n                                WHEN `ACTION` = \'2\' THEN -betAmount\n                                WHEN `ACTION` = \'3\' THEN cancel \n                                ELSE 0 \n                            END \n                        ELSE 0 \n                    END\n                )  ','',NULL,'SUM(\r\n    CASE \r\n        WHEN `type` = \'EGAME\' THEN \r\n            CASE \r\n                WHEN `ACTION` = \'2\' THEN turnover \r\n                WHEN `ACTION` = \'3\' THEN -cancel \r\n                ELSE 0 \r\n            END\r\n        WHEN `type` = \'TABLE\' AND `ACTION` = \'2\' THEN \r\n            CASE \r\n                WHEN `ACTION` = \'1\' THEN turnover\r\n                WHEN `ACTION` = \'2\' THEN turnover \r\n                WHEN `ACTION` = \'3\' THEN -cancel \r\n                ELSE 0 \r\n            END \r\n        ELSE 0 \r\n    END\r\n)',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(5,'EG','single',NULL,'EG','eg',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'eg_bet_log',NULL,'id','uid','modifyDate','8','timestamp',NULL,'mainTxID','subTxID',NULL,'CASE WHEN action = \'bet&payout\' THEN bet ELSE 0 END',NULL,'CASE WHEN action = \'bet&payout\' THEN win ELSE 0 END','CASE WHEN action = \'bet&payout\' THEN netWin ELSE 0 END',NULL,'gameID',0.00,0.00,0,'username','action','{\"cancelBet\":\"cancel\",\"bet&payout\":\"result\"}','mainTxID',NULL,'SUM(CASE WHEN `action` != \'cancelBet\' THEN bet ELSE 0 END)','SUM(\n                    CASE \n                        WHEN action != \'cancelBet\' THEN netWin\n                        ELSE 0 \n                    END\n                )','action!=\'cancelBet\'',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(6,'GR','transfer',NULL,'GR','GRtable,GRpvp,GRslot,GRfish',1,0,1,'12:00:00','15:00:00',0,1,1,0,0.10000000,0,NULL,NULL,NULL,NULL,NULL,NULL,'create_timeUnix',NULL,'game_round','sid',NULL,'valid_bet',NULL,NULL,'netWin',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,'sum(valid_bet)','sum(win)-sum(validbet)',NULL,NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(7,'BBIN','transfer',NULL,'BBIN','bbin',1,0,3,'13:00:00','15:00:00',1,0,0,0,0.10000000,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'win-validbet',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(8,'RG','transfer',NULL,'RG','RG',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,NULL,NULL,NULL,NULL,'payout_at','8','payout_unix',NULL,'qishu','order_sn',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,0,'','status','{\"0\":\"bet\",\"1\":\"result\",\"2\":\"cancel\"}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(9,'IMESPORTS','single',NULL,'IMESPORTS','imes',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'imes_bet_log',NULL,'id','uid','TimeStamp','8','TimeStamp_Unix',NULL,'BetId','OperatorTransactionId',NULL,'Amount',NULL,NULL,'CASE WHEN ActionId IN (\'4002\',\'4004\',\'1005\') THEN Amount WHEN ActionId in (\'1003\') THEN -Amount ELSE 0 END',NULL,NULL,0.00,0.00,0,'','ActionId','{\"1003\":\"bet\",\"1005\":\"cancel\",\"4002\":\"result\"}',NULL,NULL,'SUM(CASE WHEN ActionId = \'1003\' THEN Amount when ActionId = \'1005\' THEN -Amount ELSE 0 END)','SUM(CASE WHEN ActionId IN (\'4002\',\'4004\',\'1005\') THEN Amount WHEN ActionId in (\'1003\') THEN -Amount ELSE 0 END)','TransactionType IS null',NULL,NULL,0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(10,'SABA','single',NULL,'SABA','saba',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,'saba_bet_log',NULL,'id','uid',NULL,NULL,'winlostDateTs',NULL,'txId','licenseeTxId',NULL,'actualAmount',NULL,NULL,'CASE WHEN action IN (\'settle\', \'resettle\', \'unsettle\') THEN COALESCE(creditAmount - debitAmount, 0) WHEN action IN (\'ConfirmBet\', \'ConfirmBetParlay\') THEN COALESCE(-actualAmount, 0) ELSE 0 END',NULL,NULL,0.00,0.00,0,'userId',NULL,NULL,NULL,NULL,'SUM(CASE  WHEN action = \'ConfirmBet\' OR action = \'ConfirmBetParlay\' THEN COALESCE(actualAmount, 0) ELSE 0 END)','SUM(CASE WHEN action IN (\'settle\', \'resettle\', \'unsettle\') THEN COALESCE(creditAmount - debitAmount, 0) WHEN action IN (\'ConfirmBet\', \'ConfirmBetParlay\') THEN COALESCE(-actualAmount, 0) ELSE 0 END)','winlostDate IS not NULL',NULL,NULL,0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(11,'DG','single',NULL,'DG','dg',1,0,4,'04:00:00','11:00:00',0,1,1,0,0.10000000,0,'dg_bet_log',NULL,'id','uid','createDate','8','ts',NULL,'ticketId','data',NULL,'CASE WHEN iaction = 1 then amount ELSE 0 END',NULL,'CASE WHEN iaction IN (2)  then amount ELSE 0 END','',NULL,NULL,0.00,0.00,0,'username','iaction','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"cancel\"}',NULL,NULL,'SUM(case when iaction = 1 then -amount when iaction = 3 then amount ELSE 0 END )','SUM(case when iaction = 1 then amount when iaction IN (2, 3) then amount ELSE 0 END )','iaction != \'3\'',NULL,NULL,1,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(12,'SEXY','single',NULL,'SEXY','sexy',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'sexy_bet_log',NULL,'id','uid','txTime','8','txTimeUnix',NULL,'roundId','platformTxId',NULL,'betAmount',NULL,'winAmount','winAmount-betAmount',NULL,NULL,0.00,0.00,0,'userId','CASE WHEN updateAction in (\'settle\',\'resettle\') THEN \'settle\' ELSE \'cancelBet\' END','{\"cancelBet\":\"cancel\",\"settle\":\"result\"}',NULL,NULL,'sum(betAmount)','sum(winAmount-betAmount)','updateAction in (\'settle\', \'resettle\')',NULL,'sum(turnover)',0,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(13,'SALONG','single',NULL,'SALONG','salong',0,0,1,'10:00:00','12:00:00',1,1,1,0,0.10000000,0,'salong_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 then amount WHEN action = 3 then amount ELSE 0 END',NULL,'CASE WHEN action in (2) then amount ELSE 0 END','',NULL,NULL,0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}',NULL,NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN  -amount\r\n        WHEN action = 3 THEN  -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN  amount\r\n        WHEN action = 2 THEN  amount\r\n        WHEN action = 3 THEN  amount\r\n        ELSE 0 \r\n    END\r\n)\r\n',NULL,NULL,NULL,1,'LIVE',0,0,NULL,'2026-01-26 04:00:02',0,NULL,NULL,NULL,0),(14,'VSL','single',NULL,'VSL','vsl',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,'vsl_bet_log',NULL,'id','uid','datetime','8',NULL,NULL,'cwTransId','requestId',NULL,'amt',NULL,NULL,'case when transType IN (510,501,502,503) then amt ELSE -amt END',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,'sum(case when transType = \'500\' then amt when transType = \'502\' then -amt ELSE 0 END)','sum(case when transType IN (510,501,502,503) then amt ELSE -amt END)','WLstatus != \'Cancel Bet\'',NULL,NULL,0,'',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(15,'AG','single',NULL,'AG','ag',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,'ag_bet_log',NULL,'id','uid','TimeStamp','8','TimeStamp_Unix',NULL,'RoundId','TransactionId',NULL,'Amount',NULL,NULL,'(CASE WHEN Type = \'Settle\' THEN Amount ELSE 0 END)-(CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,'SUM(CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)','SUM(CASE WHEN Type = \'Settle\' THEN Amount ELSE 0 END)-SUM(CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)','TransactionType IS NULL',NULL,NULL,0,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(16,'XG','single',NULL,'XG','xg',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'xg_bet_log',NULL,'id','uid',NULL,NULL,'settle_time_unix',NULL,'bet_form_id','transaction_id',NULL,'bet_amount',NULL,NULL,'bet_amount+win_amount',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,'SUM(-bet_amount)','SUM(bet_amount+win_amount)','operation_new_code =2',NULL,NULL,0,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(17,'EVOE','transfer',NULL,'EVOPLAY','EVOE',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,NULL,NULL,NULL,NULL,'startedAt','0','startedAtUnix',NULL,NULL,'id',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(18,'ALLBET','single',NULL,'ALLBET','allbet',0,0,1,'08:00:00','12:00:00',0,1,1,0,0.10000000,0,'allbet_bet_log','allbet_detail_log','id','member_info_uid',NULL,NULL,'betTimeUnix',NULL,'gameRoundId','tranId',NULL,'CASE WHEN a.status = 100 then betAmount ELSE 0 END',NULL,'','winOrLossAmount',NULL,NULL,0.00,0.00,0,'','status','{\"100\":\"bet\",\"110\":\"bet\",\"111\":\"result\",\"101\":\"cancel\"}',NULL,NULL,'sum(case when status = 100 then betAmount when status = 101 then -betAmount ELSE 0 END)','SUM(winOrLossAmount)',NULL,NULL,NULL,0,'LIVE',0,0,NULL,'2026-01-26 04:00:02',0,NULL,NULL,NULL,0),(19,'CQ9','single',NULL,'CQ9','cq9',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'cq9_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,NULL,'amount',NULL,NULL,0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"refund\"}','game_round_id','user_id as oem_order_detail_playerId','SUM(\r\nCASE \r\n    WHEN action = 1 THEN -amount\r\n    WHEN action = 3 THEN -amount\r\n    ELSE 0\r\nEND\r\n) ','SUM(amount)','',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(20,'RICH88','single',NULL,'RICH88','rich88',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'rich88_bet_log',NULL,'uid','memId','createDate','8','timestamp',NULL,'round_id','record_id',NULL,'CASE \r\nWHEN `action` = \'withdraw\' AND transaction_status IS null THEN money  \r\nELSE 0 END',NULL,'CASE WHEN `action` = \'deposit\' THEN money ELSE 0 END','',NULL,'game_code',0.00,0.00,0,'account','CASE WHEN transaction_status IS NOT NULL THEN transaction_status  ELSE action END','{\"deposit\":\"payout\",\"withdraw\":\"bet\",\"cancel\":\"cancel\"}','',NULL,'SUM(CASE WHEN `action` = \'withdraw\' AND transaction_status IS null THEN money ELSE 0 END)','SUM(CASE WHEN `action` = \'deposit\' THEN money ELSE 0 END)- SUM(CASE WHEN `action` = \'withdraw\' AND transaction_status IS null THEN money ELSE 0 END)','',NULL,NULL,1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(21,'WS168','single',NULL,'WS168','ws168',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'ws168_bet_log',NULL,'id','uid','settled_at','0',NULL,NULL,'round_id','slug',NULL,'amount',NULL,NULL,'(CASE WHEN amount >= 0 THEN amount ELSE 0 END)-(CASE WHEN amount < 0 THEN -amount ELSE 0 END)',NULL,NULL,0.00,0.00,0,'player',NULL,NULL,NULL,NULL,'SUM(CASE WHEN amount < 0 THEN -amount ELSE 0 END)','SUM(CASE WHEN amount >= 0 THEN amount ELSE 0 END)-SUM(CASE WHEN amount < 0 THEN -amount ELSE 0 END)','status != \'cancel\'',NULL,NULL,0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(22,'QTECH','single',NULL,'QTECH','qtech',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'qtech_bet_log',NULL,'id','uid',NULL,NULL,'createdUnix',NULL,'roundId','txnId',NULL,'CASE WHEN txnType = \'DEBIT\' THEN amount WHEN txnType = \'ROLLBACK\' THEN -amount ELSE 0 END',NULL,'CASE WHEN txnType = \'CREDIT\' THEN amount ELSE 0 END','',NULL,'gameId',0.00,0.00,0,'playerId','txnType','{\"CREDIT\":\"payout\",\"DEBIT\":\"bet\",\"ROLLBACK\":\"cancel\"}','roundId',NULL,'SUM(CASE WHEN txnType = \'DEBIT\' THEN amount ELSE 0 END) - SUM(CASE WHEN txnType = \'ROLLBACK\' THEN amount ELSE 0 END)','SUM(CASE WHEN txnType = \'CREDIT\' THEN amount ELSE 0 END) - SUM(CASE WHEN txnType = \'DEBIT\' THEN amount ELSE 0 END) + SUM(CASE WHEN txnType = \'ROLLBACK\' THEN amount ELSE 0 END)',NULL,NULL,'SUM(CASE WHEN txnType = \'DEBIT\' THEN amount ELSE 0 END) - SUM(CASE WHEN txnType = \'ROLLBACK\' THEN amount ELSE 0 END)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(23,'V8','single',NULL,'V8','v8',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'v8_bet_log',NULL,'uid','memId','create_date','8','create_unix',NULL,'game_no','order_id',NULL,'amount',NULL,NULL,'(CASE WHEN type = \'1003\' THEN amount ELSE 0 END) - (CASE WHEN type = \'1002\' THEN amount ELSE 0 END)',NULL,NULL,0.00,0.00,0,'memId','type','{\"1003\":\"result\",\"1002\":\"bet\",\"1005\":\"cancel\"}',NULL,NULL,'SUM(\n                    CASE \n                        WHEN type = \'1002\' AND kind_id NOT IN (510) AND status = 0 THEN amount \n                        ELSE 0 \n                    END\n                )','SUM(CASE WHEN type = \'1003\' THEN amount ELSE 0 END) - \n                SUM(\n                    CASE \n                        WHEN type = \'1002\' AND kind_id NOT IN (510) AND status = 0 THEN amount \n                        ELSE 0 \n                    END\n                )\n                ','STATUS = 0',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(24,'UG','single',NULL,'UG','ug',1,0,3,'13:00:00','15:00:00',0,0,0,0,0.10000000,0,'ug_bet_log',NULL,'id','uid',NULL,NULL,'timestamp',NULL,'ticketId','txnId',NULL,'amount',NULL,NULL,'(CASE WHEN status = 2 THEN amount ELSE 0 END)-(CASE WHEN status = 1 THEN -amount ELSE 0 END)',NULL,NULL,0.00,0.00,0,'userId','status','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','ticketId','userId as oem_order_detail_playerId','SUM(CASE WHEN status = 1 THEN -amount ELSE 0 END)','SUM(CASE WHEN status = 2 THEN amount ELSE 0 END)-SUM(CASE WHEN status = 1 THEN -amount ELSE 0 END)',NULL,NULL,NULL,0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(25,'GB','single',NULL,'HC','gb',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'gb_bet_log',NULL,'id','memberInfo_uid',NULL,NULL,'timestamp',NULL,'mainOrderNo','orderNo',NULL,'bet',NULL,NULL,'totalWin',NULL,NULL,0.00,0.00,0,'',NULL,NULL,'orderNo',NULL,'SUM(CASE WHEN gameCode != \'fish-GetRichFishing\' THEN bet ELSE 0 END)','SUM(totalWin)','cancelAmount is null',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(26,'IMSPRIBE','single',NULL,'IMSPRIBE','spribe',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'spribe_bet_log',NULL,'id','uid','TimeStamp','8','TimeStamp_Unix',NULL,'RoundId','TransactionId',NULL,'Amount',NULL,NULL,'(CASE WHEN Type = \'Settle\' THEN Amount ELSE 0 END) - (CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)',NULL,NULL,0.00,0.00,0,'','CASE WEHN TransactionType IS NOT NULL THEN TransactionType ELSE Type END','{\"Bet\":\"bet\",\"Settle\":\"result\",\"Cancel\":\"cancel\"}',NULL,NULL,'SUM(CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)','SUM(CASE WHEN Type = \'Settle\' THEN Amount ELSE 0 END)-SUM(CASE WHEN Type = \'Bet\' THEN Amount ELSE 0 END)','TransactionType IS NULL',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(27,'SC','transfer',NULL,'SC','SC',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,NULL,NULL,NULL,NULL,'time','8','time_unix',NULL,'issue','project_id',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(28,'WINWIN','transfer',NULL,'WINWIN','winwin',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,NULL,NULL,NULL,NULL,'bet_time','8','bet_unix',NULL,'number','bid',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(29,'C911','single',NULL,'C911','c911',1,1,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'c911_bet_log',NULL,'id','uid','modifyDate','8','timestamp',NULL,'mainTxID','subTxID',NULL,'bet',NULL,NULL,'netWin',NULL,NULL,0.00,0.00,0,'username','action','{\"cancelBet\":\"cancel\",\"bet&payout\":\"result\"}','mainTxID',NULL,'SUM(\n                    CASE \n                        WHEN action != \'cancelBet\' THEN bet\n                        ELSE 0 \n                    END\n                )','SUM(\n                    CASE \n                        WHEN action != \'cancelBet\' THEN netWin\n                        ELSE 0 \n                    END\n                )','action!=\'cancelBet\'',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(30,'BIGPOT','single',NULL,'BIGPOT','bigpot',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'bigpot_bet_log',NULL,'id','uid',NULL,NULL,'time',NULL,'gameId','transactionId',NULL,'CASE WHEN action = 1 THEN amount ELSE 0 END',NULL,'winning','',NULL,'tname',0.00,0.00,0,'account','action','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"cancel\"}','CASE WHEN gcode = \'SLOT\' THEN gameId ELSE transactionId END',NULL,'SUM(CASE WHEN ACTION = 1 THEN COALESCE(amount, 0) ELSE 0 END)','SUM(CASE WHEN ACTION = 2 THEN COALESCE(winning, 0) WHEN ACTION = 1 THEN COALESCE(-amount, 0) ELSE 0 END)',NULL,NULL,NULL,1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(31,'CMD','single',NULL,'CMD','cmd',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,'cmd_bet_log',NULL,'id','uid',NULL,NULL,'dateSentTs',NULL,'ReferenceNo','packageId',NULL,'TransactionAmount ',NULL,NULL,'TransactionAmount',NULL,NULL,0.00,0.00,0,'',NULL,NULL,NULL,NULL,'SUM(CASE WHEN ActionId = 1003 THEN -TransactionAmount ELSE 0 END) ','SUM(TransactionAmount)',NULL,NULL,NULL,0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(32,'PNG','single',NULL,'PNG','png',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'png_bet_log',NULL,'uid','memId','betTime',NULL,'betTimeUnix',NULL,'GamesessionId','transactionId',NULL,'TotalLoss',NULL,NULL,'winOrLoss',NULL,NULL,0.00,0.00,0,'','Status','{\"0\":\"bet\",\"1\":\"result\"}',NULL,NULL,'SUM(TotalLoss)','SUM(winOrLoss)',' action=\'release\' AND NumRounds!=\'\'',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(33,'DNASlot','single',NULL,'DNASlot','dnaslot',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'dnaslot_betlog',NULL,'uid','memId','createDate',NULL,'timestamp',NULL,'order_id','order_id',NULL,'betPoint',NULL,NULL,'winPoint',NULL,'',0.00,0.00,0,'',NULL,NULL,NULL,NULL,'SUM(betPoint)','SUM(winPoint)','is_over=1',NULL,NULL,0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(34,'FC','single',NULL,'FC','fc',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'fc_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN `action_type` = \'multiple\' THEN \r\n    CASE \r\n        WHEN `action` = \'1\' THEN Bet \r\n        WHEN `action` = \'3\' THEN -amount \r\n        ELSE 0 \r\n    END\r\nELSE \r\nCASE \r\n WHEN `action` = \'2\' THEN Bet \r\n WHEN `action` = \'3\' THEN -Bet \r\nELSE 0 \r\nEND\r\nEND',NULL,'Win','CASE \r\nWHEN `GameId` IN (\'27007\',\'28001\',\'27008\',\'27009\') THEN \r\n    CASE \r\n        WHEN `action` = \'1\' THEN NetWin\r\n        WHEN `action` = \'2\' THEN NetWin\r\n        ELSE 0 \r\n    END\r\nELSE \r\nCASE \r\n WHEN `action` = \'2\' THEN NetWin \r\n WHEN `action` = \'3\' THEN amount \r\nELSE 0 \r\nEND\r\nEND',NULL,'GameID',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\",\"4\":\"event\"}','game_round_id','user_id as oem_order_detail_playerId','SUM(\r\n    CASE \r\n        WHEN action = 2 THEN Bet\r\n        WHEN action = 3 THEN -Bet\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 2 THEN RequireAmt\r\n        WHEN action = 3 THEN -RequireAmt\r\n        ELSE 0 \r\n    END\r\n)',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(35,'FTG','single',NULL,'FTG','ftg',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'ftg_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 then -amount WHEN action = 3 then -amount ELSE 0 END',NULL,'CASE WHEN action = 2 then amount ELSE 0 END','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"cancel\"}','game_round_id','game_id as oem_order_detail_gameId','SUM(\r\n    CASE \r\n        WHEN (action = 1 OR action = 3) AND game_id != 248 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(36,'DS88','single',NULL,'DS88','ds88',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'ds88_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,'amount','amount',NULL,NULL,0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','','SUM(\r\n        CASE \r\n            WHEN action = 1 THEN -amount\r\n            WHEN action = 3 THEN -amount\r\n            ELSE 0\r\n        END\r\n        ) ','SUM(amount)','',NULL,'',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(37,'KA','single',NULL,'KA','ka',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'ka_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\n    WHEN freeGames = \'true\' THEN 0 \r\n    ELSE \r\n        CASE \r\n            WHEN action = \'2\' THEN betAmount \r\n            WHEN action = \'3\' THEN -betAmount \r\n        END \r\nEND',NULL,'winAmount','amount',NULL,'gameId',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','gameId as oem_order_detail_gameId','SUM(\r\n        CASE \r\n            WHEN freeGames = false THEN betAmount\r\n            WHEN action = 3 THEN -betAmount\r\n            ELSE 0\r\n        END\r\n        ) ','SUM(amount)','',NULL,'',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(38,'DCS','single',NULL,'DCS','dcs',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'dcs_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,'amount','amount',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','provider as oem_order_detail_gameId,user_id as oem_order_detail_playerId','SUM(\r\n        CASE \r\n            WHEN action = 1 THEN -amount\r\n            WHEN action = 3 THEN -amount\r\n            ELSE 0\r\n        END\r\n        ) ','SUM(amount)','',NULL,'',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(39,'JDB','single',NULL,'JDB','jdb',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'jdb_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'\r\nCASE \r\nWHEN `action_type` = \'single\' THEN \r\n    CASE \r\n        WHEN `action` = \'2\' THEN -bet \r\n        WHEN `action` = \'3\' THEN bet \r\n        ELSE 0 \r\n    END\r\nWHEN `action_type` = \'multiple\' THEN \r\n 	CASE \r\n 		  WHEN `action` = \'1\' THEN -amount\r\n 		  WHEN `action` = \'3\' THEN -amount\r\n        ELSE 0 \r\n    END\r\nELSE 0 \r\nEND\r\n',NULL,'win','amount',NULL,'mType',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','historyId','gType as oem_order_detail_gameId,user_id as oem_order_detail_playerId','SUM(\r\n   CASE \r\nWHEN `action_type` = \'single\' THEN \r\n    CASE \r\n        WHEN `action` = \'2\' THEN -bet \r\n        WHEN `action` = \'3\' THEN bet \r\n        ELSE 0 \r\n    END\r\nWHEN `action_type` = \'multiple\' THEN \r\n 	CASE \r\n 		  WHEN `action` = \'1\' THEN -amount\r\n 		  WHEN `action` = \'3\' THEN -amount\r\n        ELSE 0 \r\n    END\r\nELSE 0 \r\nEND\r\n)','SUM(\r\n   CASE \r\n	WHEN `action_type` = \'single\' THEN \r\n	    CASE \r\n	        WHEN `action` = \'2\' THEN netWin \r\n	        WHEN `action` = \'3\' THEN -netWin \r\n	        ELSE 0 \r\n	    END\r\n	WHEN `action_type` = \'multiple\' THEN \r\n	 	CASE \r\n	 		  WHEN `action` = \'2\' THEN netWin\r\n	        ELSE 0 \r\n	    END\r\n	ELSE 0 \r\n END\r\n)','',NULL,'',0,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(40,'MW','single',NULL,'MW','mw',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'mw_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'gameId',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','gameId as oem_order_detail_gameId','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(41,'MKBINGO(TRANS)','transfer',NULL,'BINGO','bingo',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'bingo_bet_log',NULL,'uid','member_info_uid','bet_time','8','bet_time_unix',NULL,'round_id','txn_id',NULL,'bet_amount','','win_lose_amount+bet_amount','win_lose_amount',NULL,'game_type',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','game_type as oem_order_detail_gameId','sum(bet_amount)','sum(win_lose_amount)','',NULL,'',1,'BINGO',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(42,'PP','single',NULL,'PP','PP',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'pp_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'gameId',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','gameId as oem_order_detail_gameId,user_id as oem_order_detail_playerId','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'',1,'SLOT',3,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(43,'SIMPLEPLAY','single',NULL,'SIMPLEPLAY','simpleplay',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.10000000,0,'simpleplay_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'gamecode',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','CASE \r\n    WHEN gametype = \'slot\' AND action = 2 then JSON_UNQUOTE(JSON_EXTRACT(payoutdetails, \'$.betlist[0].betid\'))\r\n    ELSE NULL\r\nEND','','SUM(\r\n    CASE \r\n        WHEN action = 2 THEN bet_amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(winlose_amount)','',NULL,'sum(vaild_bet_amount)',1,'SLOT',96,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(45,'BNG','single',NULL,'BNG','bng',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.10000000,0,'bng_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'bet',NULL,'win','',NULL,'',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(bet)','SUM(amount)','',NULL,'SUM(bet)',1,'SLOT',1,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(46,'T1','single',NULL,'T1','t1',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'t1_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'game_code',0.00,0.00,0,NULL,'action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)',1,'SLOT',1,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(47,'MKBINGO','single',NULL,'MKBINGO','mkbingo',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'mkbingo_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'gameId',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'',1,'BINGO',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(48,'SUPER','transfer',NULL,'SUPER','super',1,0,0,'00:00:00','00:00:00',1,0,0,0,0.10000000,0,'super_bet_log',NULL,'uid','member_info_uid','bet_time',NULL,'bet_time_unix',NULL,'txn_id','txn_id',NULL,'bet_amount',NULL,NULL,'win_lose_amount',NULL,NULL,0.00,0.00,0,NULL,'action','{\"0\":\"bet\",\"1\":\"result\",\"3\":\"cancel\"}',NULL,NULL,'SUM(bet_amount)','SUM(win_lose_amount)',NULL,NULL,'sum(valid_bet_amount)',0,'SPORT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(49,'T9','single',NULL,'T9','t9',1,0,1,'10:00:00','14:30:00',0,1,1,0,0.00000000,0,'t9_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'bet_amount',NULL,'win_lose_amount','win_lose_amount',NULL,'',0.00,0.00,0,'user_id','action','{\"2\":\"bet\",\"1\":\"result\",\"3\":\"cancel\"}','game_round_id','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN bet\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN valid_money\r\n        ELSE 0 \r\n    END\r\n)',1,'LIVE',1,1,NULL,'2026-01-26 02:59:01',25,NULL,NULL,NULL,0),(50,'RSG','transfer',NULL,'RSG','rsg',1,0,3,'11:00:00','15:00:00',0,1,1,0,0.00000000,0,'rsg_bet_log',NULL,'uid','member_info_uid','bet_time','8','bet_time_unix',NULL,'round_id','txn_id',NULL,'bet_amount',NULL,NULL,'win_lose_amount',NULL,'gamecode',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','','SUM(bet_amount)','SUM(win_lose_amount)','','sum(valid_bet_amount)',1,'SLOT',1,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(51,'ATG','transfer',NULL,'ATG','atg',1,0,2,'10:00:00','13:00:00',0,1,1,0,0.00000000,0,'atg_bet_log',NULL,'uid','member_info_uid','bet_time','8','bet_time_unix',NULL,'round_id','txn_id',NULL,'bet_amount',NULL,NULL,'win_lose_amount',NULL,'gamecode',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','','SUM(bet_amount)','SUM(win_lose_amount)','','sum(valid_bet_amount)',1,'SLOT',3,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(52,'KS','single',NULL,'KS','ks',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'ks_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END','',NULL,'gameId',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','','SUM(bet)*-1','SUM(amount)','',NULL,'SUM(bet)*-1',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(53,'NAGA','single',NULL,'NAGA','naga',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'naga_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id','','SUM(CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END)','SUM(amount)','',NULL,'SUM(CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(54,'MK','single',NULL,'FXG','fxg',1,1,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'fxg_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END','',NULL,'gameID',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','sum(bet)','SUM(amount)','',NULL,'sum(bet)',1,'SLOT',2,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(55,'ZG','single',NULL,'ZG','zg',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.00000000,0,'zg_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','txn_id','','SUM(CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END)','SUM(amount)','',NULL,'SUM(CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END)',1,'SLOT',98,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(56,'PG2','single',NULL,'PG2','pg2',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.00000000,0,'pg2_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'session_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,'PG2_?',0),(57,'JILI2','single',NULL,'JILI2','jili2',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.00000000,0,'jili2_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'session_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,'JILI2_?',0),(58,'PP2','single',NULL,'PP2','pp2',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.00000000,0,'pp2_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'session_id','txn_id',NULL,'CASE \r\nWHEN action = 1 THEN -amount\r\nWHEN action = 3 THEN -amount\r\nELSE 0 \r\nEND\r\n',NULL,'CASE \r\nWHEN action = 2 THEN amount\r\nELSE 0 \r\nEND\r\n','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)','SUM(amount)','',NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        ELSE 0 \r\n    END\r\n)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,'PP2_?',0),(59,'WINNER','transfer',NULL,'WINNER','winner',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'winner_bet_log',NULL,'uid','member_info_uid','txn_date','8','bet_time_unix','update_time_unix','round_id','txn_id',NULL,'bet_amount',NULL,'','win_lose_amount',NULL,'gamecode',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','txn_id',NULL,'SUM(bet_amount)','SUM(win_lose_amount)',NULL,NULL,'sum(valid_bet_amount)',0,'LIVE',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(60,'SPLUS','single',NULL,'SPLUS','splus',1,0,1,'14:00:00','16:00:00',0,0,0,0,0.00000000,0,'splus_bet_log',NULL,'uid','member_info_uid','txn_date','8','end_time_unix',NULL,'game_round_id','txn_id',NULL,'CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END',NULL,'CASE WHEN action = 2 THEN amount ELSE 0 END','',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','','','SUM(CASE WHEN action = 2 THEN bet ELSE 0 END)','SUM(amount)','',NULL,'SUM(CASE WHEN action = 2 THEN bet ELSE 0 END)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(61,'BP','single',NULL,'BP','bp',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'bp_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,'SUM(CASE WHEN action = 2 THEN amount ELSE 0 END)','amount',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','CASE WHEN gcode = \\\'SLOT\\\' THEN game_round_id ELSE txn_id END',NULL,'SUM(CASE WHEN action = 1 THEN -amount ELSE 0 END)','SUM(amount)',NULL,NULL,'SUM(CASE WHEN action = 1 THEN -amount WHEN action = 3 THEN -amount ELSE 0 END)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(62,'BTG','single',NULL,'BTG','btg',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.10000000,0,'btg_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,'CASE WHEN action = 2 THEN win ELSE 0 END','CASE WHEN action = 2 THEN win_lose ELSE 0 END',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\",\"5\":\"reward\"}','txn_id',NULL,'SUM(CASE WHEN action = 2 THEN bet ELSE 0 END)','SUM(CASE WHEN action = 2 THEN win_lose ELSE 0 END)',NULL,NULL,'SUM(CASE WHEN action = 2 THEN valid_bet ELSE 0 END)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(63,'MT','single',NULL,'MT','mt',0,0,1,'08:00:00','12:00:00',0,1,1,0,0.00000000,0,'mt_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'txn_id','txn_id',NULL,'CASE \n                WHEN action = 1 THEN -amount\n                WHEN action = 3 THEN -amount\n                ELSE 0 \n                END',NULL,'CASE \n                WHEN action = 2 THEN amount\n                ELSE 0 \n                END','',NULL,'',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','txn_id','','SUM(\n                    CASE \n                        WHEN action = 1 THEN -amount\n                        WHEN action = 3 THEN -amount\n                        ELSE 0 \n                    END\n                )','SUM(amount)','',NULL,'SUM(valid_money)',1,'LIVE',0,0,NULL,'2026-01-26 04:00:02',0,NULL,NULL,NULL,0),(64,'TAG','single',NULL,'TAG','tag',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'tag_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'debit_amount',NULL,'credit_amount','amount',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel\"}','game_round_id',NULL,'SUM(debit_amount)','SUM(amount)',NULL,NULL,'SUM(debit_amount)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(65,'RG2','single',NULL,'RG2','rg2',1,0,0,'00:00:00','00:00:00',0,0,0,0,0.00000000,0,'rg2_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount','payout','',NULL,'game_code','user_id',0.00,0.00,0,'action','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"refundl\",\"4\":\"restore\"}','txn_id','','','SUM(bet_total)','SUM(amount)','',NULL,'SUM(bet_real)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0),(66,'RC','single',NULL,'RC','rc',0,0,1,'10:00:00','12:00:00',0,0,0,0,0.00000000,0,'rc_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount','payout','',NULL,'game_id','user_id',0.00,0.00,0,'action','{\"1\":\"bet\",\"2\":\"payout\",\"3\":\"refundl\",\"4\":\"restore\"}',NULL,'','SUM(\n                    CASE \n                        WHEN action = 1 THEN -amount\n                ','SUM(amount)','',NULL,'SUM(\n                    CASE \n                        WHEN action = 1 THEN bet_real\n                        ELSE 0 \n                    END\n                )','1',0,'LIVE',NULL,0,NULL,'2026-01-26 04:00:02',0,NULL,NULL,NULL,0),(68,'BNG3','single',NULL,'BNG3','bng3',1,0,0,'00:00:00','00:00:00',0,1,1,0,0.10000000,0,'bng3_bet_log',NULL,'uid','member_info_uid','txn_date','8','txn_date_unix',NULL,'game_round_id','txn_id',NULL,'amount',NULL,'CASE \r\n     WHEN action = 2 THEN amount\r\n     WHEN action = 4 THEN win\r\n     ELSE 0 \r\nEND\r\n','CASE \r\n     WHEN action = 1 THEN amount\r\n     WHEN action = 3 THEN amount\r\n     WHEN action = 2 THEN amount\r\n     WHEN action = 4 THEN amount\r\n     ELSE 0 \r\nEND\r\n',NULL,'game_id',0.00,0.00,0,'user_id','action','{\"1\":\"bet\",\"2\":\"result\",\"3\":\"cancel,\"4\":\"bet_n_pay\"}',NULL,NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        WHEN action = 4 THEN bet\r\n        ELSE 0 \r\n    END\r\n)','SUM(\r\n    CASE \r\n        WHEN action = 1 THEN amount\r\n        WHEN action = 2 THEN amount\r\n        WHEN action = 3 THEN amount\r\n        WHEN action = 4 THEN amount\r\n        ELSE 0 \r\n    END\r\n)',NULL,NULL,'SUM(\r\n    CASE \r\n        WHEN action = 1 THEN -amount\r\n        WHEN action = 3 THEN -amount\r\n        WHEN action = 4 THEN bet\r\n        ELSE 0 \r\n    END\r\n)',1,'SLOT',0,0,NULL,'2026-01-26 02:59:01',0,NULL,NULL,NULL,0);

--
-- Table structure for table `all_platform_config`
--

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 '0.00' COMMENT '廠商打賞佔成比',
  `machine_exclusion_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '機台預設排除狀態',
  `create_time` datetime NOT NULL COMMENT '創建時間',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `all_platform_uid_unique` (`all_platform_uid`),
  KEY `all_platform_uid_IDX` (`all_platform_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='平台設定表';

--
-- Dumping data for table `all_platform_config`
--


--
-- Table structure for table `auth_token_temp`
--

CREATE TABLE `auth_token_temp` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `role` enum('cagent','member') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '腳色(cagent|member)',
  `role_uid` bigint unsigned NOT NULL COMMENT '腳色UID',
  `token` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'token',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `auth_token_temp_role_IDX` (`role`,`role_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='token暫存區';

--
-- Dumping data for table `auth_token_temp`
--

INSERT INTO `auth_token_temp` VALUES (1,'cagent',16,'MXxtUGVlSGR5dXVLbWhJYjlVbmQwY3JMWEhwelpiVUhDaVZmbGJpNjNLMjcwNGFjMzQ=','2026-01-26 12:29:41'),(2,'cagent',12,'M3x0WXdmNlFSSHpxMUxBMGlYdDBvcGpUWlIwcHZUd0JjNWpSa1JJalJ1OGNkZTIyNmE=','2026-01-26 13:12:08');

--
-- Table structure for table `backend_action_logs`
--

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地址',
  `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 `backend_action_logs_cagent_uid_index` (`cagent_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `backend_action_logs`
--

INSERT INTO `backend_action_logs` VALUES (1,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131348\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:13:48','2026-01-26 05:13:48'),(2,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"machine_ouagent1_20260126131348\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:13:48','2026-01-26 05:13:48'),(3,12,'add_cagent_game_rebate',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131348\",\"rebate\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,NULL,'2026-01-26 05:13:49','2026-01-26 05:13:49'),(4,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131546\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:15:46','2026-01-26 05:15:46'),(5,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"machine_ouagent1_20260126131546\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:15:47','2026-01-26 05:15:47'),(6,12,'add_cagent_game_rebate',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131546\",\"rebate\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,NULL,'2026-01-26 05:15:47','2026-01-26 05:15:47'),(7,12,'add_cagent_game_profit',NULL,'{\"cagent_uid\":12,\"type\":\"cagent\",\"name\":\"ouagent1_20260126131546\",\"profit\":\"{\\\"1\\\":80,\\\"6\\\":80,\\\"11\\\":80,\\\"13\\\":80,\\\"18\\\":80,\\\"43\\\":80,\\\"49\\\":80,\\\"50\\\":80,\\\"51\\\":80,\\\"55\\\":80,\\\"56\\\":80,\\\"57\\\":80,\\\"58\\\":80,\\\"62\\\":80,\\\"63\\\":80,\\\"68\\\":80}\",\"current_profit\":\"{\\\"1\\\":80,\\\"6\\\":80,\\\"11\\\":80,\\\"13\\\":80,\\\"18\\\":80,\\\"43\\\":80,\\\"49\\\":80,\\\"50\\\":80,\\\"51\\\":80,\\\"55\\\":80,\\\"56\\\":80,\\\"57\\\":80,\\\"58\\\":80,\\\"62\\\":80,\\\"63\\\":80,\\\"68\\\":80}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:15:47','2026-01-26 05:15:47'),(9,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131656\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:16:56','2026-01-26 05:16:56'),(10,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"machine_ouagent1_20260126131656\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:16:56','2026-01-26 05:16:56'),(11,12,'add_cagent_game_rebate',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent1_20260126131656\",\"rebate\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,NULL,'2026-01-26 05:16:57','2026-01-26 05:16:57'),(12,12,'add_cagent_game_profit',NULL,'{\"cagent_uid\":12,\"type\":\"cagent\",\"name\":\"ouagent1_20260126131656\",\"profit\":\"{\\\"1\\\":80,\\\"6\\\":80,\\\"11\\\":80,\\\"13\\\":80,\\\"18\\\":80,\\\"43\\\":80,\\\"49\\\":80,\\\"50\\\":80,\\\"51\\\":80,\\\"55\\\":80,\\\"56\\\":80,\\\"57\\\":80,\\\"58\\\":80,\\\"62\\\":80,\\\"63\\\":80,\\\"68\\\":80}\",\"current_profit\":\"{\\\"1\\\":80,\\\"6\\\":80,\\\"11\\\":80,\\\"13\\\":80,\\\"18\\\":80,\\\"43\\\":80,\\\"49\\\":80,\\\"50\\\":80,\\\"51\\\":80,\\\"55\\\":80,\\\"56\\\":80,\\\"57\\\":80,\\\"58\\\":80,\\\"62\\\":80,\\\"63\\\":80,\\\"68\\\":80}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:16:57','2026-01-26 05:16:57'),(13,12,'add_cagent','{\"cagent\":\"ouagent1\",\"login_name\":\"ouagent1\",\"nick_name\":\"ouagent1\",\"true_name\":null,\"passwd\":\"$2y$10$N.RSUBX8y\\/rPTQkq16veqOX7wvTMVZXh0D\\/5gtHfqUVrePPB.Gz1y\",\"parent_uid\":2,\"level\":3,\"type\":\"cagent\",\"mobile\":null,\"birthday\":null,\"email\":null,\"cagent_game_permission_uid\":5,\"machine_game_permission_uid\":6,\"cagent_game_profit_uid\":272,\"cagent_game_rebate_uid\":3,\"cagent_page_permission_uid\":3,\"cagent_profit_uid\":0,\"member_rebate\":0,\"status\":1,\"site_type\":\"0\",\"create_time\":\"2026-01-26 13:16:58\",\"create_ts\":1769404618,\"open_trans_point\":1,\"open_member_line_bind\":1}',NULL,'118.163.164.139',24,'cagent','2026-01-26 05:16:58','2026-01-26 05:16:58'),(14,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent2_20260126131907\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:19:07','2026-01-26 05:19:07'),(15,12,'add_cagent_game_permission',NULL,'{\"cagent_uid\":12,\"name\":\"machine_ouagent2_20260126131907\",\"permission\":\"{\\\"0\\\":0,\\\"1\\\":1,\\\"2\\\":0,\\\"3\\\":0,\\\"4\\\":0,\\\"5\\\":0,\\\"6\\\":1,\\\"7\\\":0,\\\"8\\\":0,\\\"9\\\":0,\\\"10\\\":0,\\\"11\\\":1,\\\"12\\\":0,\\\"13\\\":1,\\\"14\\\":0,\\\"15\\\":0,\\\"16\\\":0,\\\"17\\\":0,\\\"18\\\":1,\\\"19\\\":0,\\\"20\\\":0,\\\"21\\\":0,\\\"22\\\":0,\\\"23\\\":0,\\\"24\\\":0,\\\"25\\\":0,\\\"26\\\":0,\\\"27\\\":0,\\\"28\\\":0,\\\"29\\\":0,\\\"30\\\":0,\\\"31\\\":0,\\\"32\\\":0,\\\"33\\\":0,\\\"34\\\":0,\\\"35\\\":0,\\\"36\\\":0,\\\"37\\\":0,\\\"38\\\":0,\\\"39\\\":0,\\\"40\\\":0,\\\"41\\\":0,\\\"42\\\":0,\\\"43\\\":1,\\\"44\\\":0,\\\"45\\\":0,\\\"46\\\":0,\\\"47\\\":0,\\\"48\\\":0,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"52\\\":0,\\\"53\\\":0,\\\"54\\\":0,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"59\\\":0,\\\"60\\\":0,\\\"61\\\":0,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:19:07','2026-01-26 05:19:07'),(16,12,'add_cagent_game_rebate',NULL,'{\"cagent_uid\":12,\"name\":\"ouagent2_20260126131907\",\"rebate\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,NULL,'2026-01-26 05:19:07','2026-01-26 05:19:07'),(17,12,'add_cagent_game_profit',NULL,'{\"cagent_uid\":12,\"type\":\"cagent\",\"name\":\"ouagent2_20260126131907\",\"profit\":\"{\\\"1\\\":70,\\\"6\\\":70,\\\"11\\\":70,\\\"13\\\":70,\\\"18\\\":70,\\\"43\\\":70,\\\"49\\\":70,\\\"50\\\":70,\\\"51\\\":70,\\\"55\\\":70,\\\"56\\\":70,\\\"57\\\":70,\\\"58\\\":70,\\\"62\\\":70,\\\"63\\\":70,\\\"68\\\":70}\",\"current_profit\":\"{\\\"1\\\":70,\\\"6\\\":70,\\\"11\\\":70,\\\"13\\\":70,\\\"18\\\":70,\\\"43\\\":70,\\\"49\\\":70,\\\"50\\\":70,\\\"51\\\":70,\\\"55\\\":70,\\\"56\\\":70,\\\"57\\\":70,\\\"58\\\":70,\\\"62\\\":70,\\\"63\\\":70,\\\"68\\\":70}\"}','118.163.164.139',NULL,'cagent','2026-01-26 05:19:08','2026-01-26 05:19:08'),(18,12,'add_cagent','{\"cagent\":\"ouagent2\",\"login_name\":\"ouagent2\",\"nick_name\":\"ouagent2\",\"true_name\":null,\"passwd\":\"$2y$10$F.5L3Xz8vcTRs7nQL28W.OjfHP.zVEg2BIW0oLcr3Wb5sa3mc7UhC\",\"parent_uid\":24,\"level\":4,\"type\":\"cagent\",\"mobile\":null,\"birthday\":null,\"email\":null,\"cagent_game_permission_uid\":7,\"machine_game_permission_uid\":8,\"cagent_game_profit_uid\":273,\"cagent_game_rebate_uid\":4,\"cagent_page_permission_uid\":4,\"cagent_profit_uid\":0,\"member_rebate\":0,\"status\":1,\"site_type\":\"0\",\"create_time\":\"2026-01-26 13:19:08\",\"create_ts\":1769404748,\"open_trans_point\":1,\"open_member_line_bind\":1}',NULL,'118.163.164.139',25,'cagent','2026-01-26 05:19:08','2026-01-26 05:19:08'),(19,12,'add_member_game_rebate',NULL,'{\"cagent_uid\":12,\"type\":\"member\",\"name\":\"ouPlayer1_20260126131938\",\"profit\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\",\"current_profit\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,'member','2026-01-26 05:19:38','2026-01-26 05:19:38'),(20,12,'add_member_info','{\"memId\":\"ouPlayer1\",\"name\":\"ouPlayer1\",\"passwd\":\"202cb962ac59075b964b07152d234b70\",\"point\":0,\"cagent_uid\":24,\"cagent_game_profit_uid\":274,\"exchange_code\":\"TWD\",\"rebate\":0}',NULL,'118.163.164.139',17,'member','2026-01-26 05:19:39','2026-01-26 05:19:39'),(21,12,'add_member_game_rebate',NULL,'{\"cagent_uid\":12,\"type\":\"member\",\"name\":\"ouPlayer2_20260126131957\",\"profit\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\",\"current_profit\":\"{\\\"1\\\":0.01,\\\"6\\\":0.01,\\\"11\\\":0.01,\\\"13\\\":0.01,\\\"18\\\":0.01,\\\"43\\\":0.01,\\\"49\\\":0.01,\\\"50\\\":0.01,\\\"51\\\":0.01,\\\"55\\\":0.01,\\\"56\\\":0.01,\\\"57\\\":0.01,\\\"58\\\":0.01,\\\"62\\\":0.01,\\\"63\\\":0.01,\\\"68\\\":0.01}\"}','118.163.164.139',NULL,'member','2026-01-26 05:19:57','2026-01-26 05:19:57'),(22,12,'add_member_info','{\"memId\":\"ouPlayer2\",\"name\":\"ouPlayer2\",\"passwd\":\"202cb962ac59075b964b07152d234b70\",\"point\":0,\"cagent_uid\":25,\"cagent_game_profit_uid\":275,\"exchange_code\":\"TWD\",\"rebate\":0}',NULL,'118.163.164.139',18,'member','2026-01-26 05:19:58','2026-01-26 05:19:58'),(23,12,'update_cagent_game_rebate','\"{\\\"1\\\": 0.01, \\\"6\\\": 0.01, \\\"11\\\": 0.01, \\\"13\\\": 0.01, \\\"18\\\": 0.01, \\\"43\\\": 0.01, \\\"49\\\": 0.01, \\\"50\\\": 0.01, \\\"51\\\": 0.01, \\\"55\\\": 0.01, \\\"56\\\": 0.01, \\\"57\\\": 0.01, \\\"58\\\": 0.01, \\\"62\\\": 0.01, \\\"63\\\": 0.01, \\\"68\\\": 0.01}\"','{\"rebate\":\"{\\\"1\\\":0.8,\\\"6\\\":0,\\\"11\\\":0.8,\\\"13\\\":0.8,\\\"18\\\":0.8,\\\"43\\\":0,\\\"49\\\":0.8,\\\"50\\\":0.8,\\\"51\\\":0.8,\\\"55\\\":0.8,\\\"56\\\":0.8,\\\"57\\\":0.8,\\\"58\\\":0.8,\\\"62\\\":0.8,\\\"63\\\":0.8,\\\"68\\\":0}\",\"current_rebate\":\"{\\\"1\\\":0.8,\\\"6\\\":0,\\\"11\\\":0.8,\\\"13\\\":0.8,\\\"18\\\":0.8,\\\"43\\\":0,\\\"49\\\":0.8,\\\"50\\\":0.8,\\\"51\\\":0.8,\\\"55\\\":0.8,\\\"56\\\":0.8,\\\"57\\\":0.8,\\\"58\\\":0.8,\\\"62\\\":0.8,\\\"63\\\":0.8,\\\"68\\\":0}\"}','118.163.164.139',5,'cagent','2026-01-26 05:52:12','2026-01-26 05:52:12'),(24,12,'update_cagent_game_rebate','\"{\\\"1\\\": 0.01, \\\"6\\\": 0.01, \\\"11\\\": 0.01, \\\"13\\\": 0.01, \\\"18\\\": 0.01, \\\"43\\\": 0.01, \\\"49\\\": 0.01, \\\"50\\\": 0.01, \\\"51\\\": 0.01, \\\"55\\\": 0.01, \\\"56\\\": 0.01, \\\"57\\\": 0.01, \\\"58\\\": 0.01, \\\"62\\\": 0.01, \\\"63\\\": 0.01, \\\"68\\\": 0.01}\"','{\"rebate\":\"{\\\"1\\\":0.7,\\\"6\\\":0,\\\"11\\\":0.7,\\\"13\\\":0.7,\\\"18\\\":0.7,\\\"43\\\":0,\\\"49\\\":0.7,\\\"50\\\":0.7,\\\"51\\\":0.7,\\\"55\\\":0.7,\\\"56\\\":0.7,\\\"57\\\":0.7,\\\"58\\\":0.7,\\\"62\\\":0.7,\\\"63\\\":0.7,\\\"68\\\":0}\",\"current_rebate\":\"{\\\"1\\\":0.7,\\\"6\\\":0,\\\"11\\\":0.7,\\\"13\\\":0.7,\\\"18\\\":0.7,\\\"43\\\":0,\\\"49\\\":0.7,\\\"50\\\":0.7,\\\"51\\\":0.7,\\\"55\\\":0.7,\\\"56\\\":0.7,\\\"57\\\":0.7,\\\"58\\\":0.7,\\\"62\\\":0.7,\\\"63\\\":0.7,\\\"68\\\":0}\"}','118.163.164.139',6,'cagent','2026-01-26 05:52:31','2026-01-26 05:52:31'),(25,12,'update_cagent_game_rebate','\"{\\\"1\\\": 0.8, \\\"6\\\": 0, \\\"11\\\": 0.8, \\\"13\\\": 0.8, \\\"18\\\": 0.8, \\\"43\\\": 0, \\\"49\\\": 0.8, \\\"50\\\": 0.8, \\\"51\\\": 0.8, \\\"55\\\": 0.8, \\\"56\\\": 0.8, \\\"57\\\": 0.8, \\\"58\\\": 0.8, \\\"62\\\": 0.8, \\\"63\\\": 0.8, \\\"68\\\": 0}\"','{\"rebate\":\"{\\\"1\\\":0.9,\\\"6\\\":0,\\\"11\\\":0.9,\\\"13\\\":0.9,\\\"18\\\":0.9,\\\"43\\\":0,\\\"49\\\":0.9,\\\"50\\\":0.9,\\\"51\\\":0.9,\\\"55\\\":0.9,\\\"56\\\":0.9,\\\"57\\\":0.9,\\\"58\\\":0.9,\\\"62\\\":0.9,\\\"63\\\":0.9,\\\"68\\\":0}\",\"current_rebate\":\"{\\\"1\\\":0.9,\\\"6\\\":0,\\\"11\\\":0.9,\\\"13\\\":0.9,\\\"18\\\":0.9,\\\"43\\\":0,\\\"49\\\":0.9,\\\"50\\\":0.9,\\\"51\\\":0.9,\\\"55\\\":0.9,\\\"56\\\":0.9,\\\"57\\\":0.9,\\\"58\\\":0.9,\\\"62\\\":0.9,\\\"63\\\":0.9,\\\"68\\\":0}\"}','118.163.164.139',5,'cagent','2026-01-26 06:00:15','2026-01-26 06:00:15'),(26,12,'update_cagent_game_rebate','\"{\\\"1\\\": 0.7, \\\"6\\\": 0, \\\"11\\\": 0.7, \\\"13\\\": 0.7, \\\"18\\\": 0.7, \\\"43\\\": 0, \\\"49\\\": 0.7, \\\"50\\\": 0.7, \\\"51\\\": 0.7, \\\"55\\\": 0.7, \\\"56\\\": 0.7, \\\"57\\\": 0.7, \\\"58\\\": 0.7, \\\"62\\\": 0.7, \\\"63\\\": 0.7, \\\"68\\\": 0}\"','{\"rebate\":\"{\\\"1\\\":0.9,\\\"6\\\":0,\\\"11\\\":0.9,\\\"13\\\":0.9,\\\"18\\\":0.9,\\\"43\\\":0,\\\"49\\\":0.9,\\\"50\\\":0.9,\\\"51\\\":0.9,\\\"55\\\":0.9,\\\"56\\\":0.9,\\\"57\\\":0.9,\\\"58\\\":0.9,\\\"62\\\":0.9,\\\"63\\\":0.9,\\\"68\\\":0}\",\"current_rebate\":\"{\\\"1\\\":0.9,\\\"6\\\":0,\\\"11\\\":0.9,\\\"13\\\":0.9,\\\"18\\\":0.9,\\\"43\\\":0,\\\"49\\\":0.9,\\\"50\\\":0.9,\\\"51\\\":0.9,\\\"55\\\":0.9,\\\"56\\\":0.9,\\\"57\\\":0.9,\\\"58\\\":0.9,\\\"62\\\":0.9,\\\"63\\\":0.9,\\\"68\\\":0}\"}','118.163.164.139',6,'cagent','2026-01-26 06:00:39','2026-01-26 06:00:39'),(27,24,'update_member_game_rebate','{\"1\":0.01,\"6\":0.01,\"11\":0.01,\"13\":0.01,\"18\":0.01,\"43\":0.01,\"49\":0.01,\"50\":0.01,\"51\":0.01,\"55\":0.01,\"56\":0.01,\"57\":0.01,\"58\":0.01,\"62\":0.01,\"63\":0.01,\"68\":0.01}','{\"1\":0.01,\"6\":0.01,\"11\":0.01,\"13\":0.01,\"18\":0.01,\"43\":0.01,\"49\":0.01,\"50\":0.01,\"51\":0.01,\"55\":0.01,\"56\":0.01,\"57\":0.01,\"58\":0.01,\"62\":0.01,\"63\":0.01,\"68\":0.01}','118.163.164.139',17,'member','2026-01-26 06:10:39','2026-01-26 06:10:39'),(28,25,'update_member_game_rebate','{\"1\":0.01,\"6\":0.01,\"11\":0.01,\"13\":0.01,\"18\":0.01,\"43\":0.01,\"49\":0.01,\"50\":0.01,\"51\":0.01,\"55\":0.01,\"56\":0.01,\"57\":0.01,\"58\":0.01,\"62\":0.01,\"63\":0.01,\"68\":0.01}','{\"1\":0.01,\"6\":0.01,\"11\":0.01,\"13\":0.01,\"18\":0.01,\"43\":0.01,\"49\":0.01,\"50\":0.01,\"51\":0.01,\"55\":0.01,\"56\":0.01,\"57\":0.01,\"58\":0.01,\"62\":0.01,\"63\":0.01,\"68\":0.01}','118.163.164.139',18,'member','2026-01-26 06:10:39','2026-01-26 06:10:39'),(29,12,'update_cagent_game_rebate','\"{\\\"1\\\": 1, \\\"2\\\": 1, \\\"3\\\": 1, \\\"4\\\": 1, \\\"5\\\": 1, \\\"11\\\": 1, \\\"12\\\": 1, \\\"13\\\": 1, \\\"18\\\": 1, \\\"19\\\": 1, \\\"20\\\": 1, \\\"22\\\": 1, \\\"30\\\": 1, \\\"34\\\": 1, \\\"35\\\": 1, \\\"36\\\": 1, \\\"37\\\": 1, \\\"38\\\": 1, \\\"39\\\": 1, \\\"40\\\": 1, \\\"42\\\": 1, \\\"45\\\": 1, \\\"46\\\": 1, \\\"47\\\": 1, \\\"48\\\": 1, \\\"49\\\": 1, \\\"50\\\": 1, \\\"51\\\": 1, \\\"53\\\": 1, \\\"54\\\": 1, \\\"55\\\": 1, \\\"56\\\": 1, \\\"57\\\": 1, \\\"58\\\": 1, \\\"60\\\": 1, \\\"61\\\": 1, \\\"62\\\": 1, \\\"63\\\": 1, \\\"64\\\": 1, \\\"66\\\": 1}\"','{\"rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\",\"current_rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',2,'cagent','2026-01-26 06:10:39','2026-01-26 06:10:39'),(30,12,'update_cagent_game_rebate','\"{\\\"1\\\": 1, \\\"2\\\": 1, \\\"3\\\": 1, \\\"4\\\": 1, \\\"5\\\": 1, \\\"11\\\": 1, \\\"12\\\": 1, \\\"13\\\": 1, \\\"18\\\": 1, \\\"19\\\": 1, \\\"20\\\": 1, \\\"22\\\": 1, \\\"30\\\": 1, \\\"34\\\": 1, \\\"35\\\": 1, \\\"36\\\": 1, \\\"37\\\": 1, \\\"38\\\": 1, \\\"39\\\": 1, \\\"40\\\": 1, \\\"42\\\": 1, \\\"45\\\": 1, \\\"46\\\": 1, \\\"47\\\": 1, \\\"48\\\": 1, \\\"49\\\": 1, \\\"50\\\": 1, \\\"51\\\": 1, \\\"53\\\": 1, \\\"54\\\": 1, \\\"55\\\": 1, \\\"56\\\": 1, \\\"57\\\": 1, \\\"58\\\": 1, \\\"60\\\": 1, \\\"61\\\": 1, \\\"62\\\": 1, \\\"63\\\": 1, \\\"64\\\": 1, \\\"66\\\": 1}\"','{\"rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\",\"current_rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',5,'cagent','2026-01-26 06:10:59','2026-01-26 06:10:59'),(31,12,'update_cagent_game_rebate','\"{\\\"1\\\": 1, \\\"2\\\": 1, \\\"3\\\": 1, \\\"4\\\": 1, \\\"5\\\": 1, \\\"11\\\": 1, \\\"12\\\": 1, \\\"13\\\": 1, \\\"18\\\": 1, \\\"19\\\": 1, \\\"20\\\": 1, \\\"22\\\": 1, \\\"30\\\": 1, \\\"34\\\": 1, \\\"35\\\": 1, \\\"36\\\": 1, \\\"37\\\": 1, \\\"38\\\": 1, \\\"39\\\": 1, \\\"40\\\": 1, \\\"42\\\": 1, \\\"45\\\": 1, \\\"46\\\": 1, \\\"47\\\": 1, \\\"48\\\": 1, \\\"49\\\": 1, \\\"50\\\": 1, \\\"51\\\": 1, \\\"53\\\": 1, \\\"54\\\": 1, \\\"55\\\": 1, \\\"56\\\": 1, \\\"57\\\": 1, \\\"58\\\": 1, \\\"60\\\": 1, \\\"61\\\": 1, \\\"62\\\": 1, \\\"63\\\": 1, \\\"64\\\": 1, \\\"66\\\": 1}\"','{\"rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\",\"current_rebate\":\"{\\\"1\\\":1,\\\"6\\\":1,\\\"11\\\":1,\\\"13\\\":1,\\\"18\\\":1,\\\"43\\\":1,\\\"49\\\":1,\\\"50\\\":1,\\\"51\\\":1,\\\"55\\\":1,\\\"56\\\":1,\\\"57\\\":1,\\\"58\\\":1,\\\"62\\\":1,\\\"63\\\":1,\\\"68\\\":1}\"}','118.163.164.139',6,'cagent','2026-01-26 06:11:10','2026-01-26 06:11:10'),(32,12,'update_cagent_game_profit','{\"uid\":2,\"cagent_uid\":2,\"type\":\"cagent\",\"name\":\"90%\",\"cannot_delete\":1,\"profit\":\"{\\\"1\\\": 0.9, \\\"2\\\": 0.9, \\\"3\\\": 0.9, \\\"4\\\": 0.9, \\\"5\\\": 0.9, \\\"11\\\": 0.9, \\\"12\\\": 0.9, \\\"13\\\": 0.9, \\\"18\\\": 0.9, \\\"19\\\": 0.9, \\\"20\\\": 0.9, \\\"22\\\": 0.9, \\\"30\\\": 0.9, \\\"34\\\": 0.9, \\\"35\\\": 0.9, \\\"36\\\": 0.9, \\\"37\\\": 0.9, \\\"38\\\": 0.9, \\\"39\\\": 0.9, \\\"40\\\": 0.9, \\\"42\\\": 0.9, \\\"45\\\": 0.9, \\\"46\\\": 0.9, \\\"47\\\": 0.9, \\\"48\\\": 0.9, \\\"56\\\": 0.9, \\\"57\\\": 0.9, \\\"58\\\": 0.9, \\\"59\\\": 0.9, \\\"60\\\": 0.9, \\\"61\\\": 0.9, \\\"63\\\": 0.9, \\\"64\\\": 0.9, \\\"65\\\": 0.9, \\\"66\\\": 0.9, \\\"69\\\": 0.9}\",\"current_profit\":\"{\\\"1\\\": 0.9, \\\"2\\\": 0.9, \\\"3\\\": 0.9, \\\"4\\\": 0.9, \\\"5\\\": 0.9, \\\"11\\\": 0.9, \\\"12\\\": 0.9, \\\"13\\\": 0.9, \\\"18\\\": 0.9, \\\"19\\\": 0.9, \\\"20\\\": 0.9, \\\"22\\\": 0.9, \\\"30\\\": 0.9, \\\"34\\\": 0.9, \\\"35\\\": 0.9, \\\"36\\\": 0.9, \\\"37\\\": 0.9, \\\"38\\\": 0.9, \\\"39\\\": 0.9, \\\"40\\\": 0.9, \\\"42\\\": 0.9, \\\"45\\\": 0.9, \\\"46\\\": 0.9, \\\"47\\\": 0.9, \\\"48\\\": 0.9, \\\"56\\\": 0.9, \\\"57\\\": 0.9, \\\"58\\\": 0.9, \\\"59\\\": 0.9, \\\"60\\\": 0.9, \\\"61\\\": 0.9, \\\"63\\\": 0.9, \\\"64\\\": 0.9, \\\"65\\\": 0.9, \\\"66\\\": 0.9, \\\"69\\\": 0.9}\"}','{\"profit\":\"{\\\"1\\\":90,\\\"6\\\":90,\\\"11\\\":90,\\\"13\\\":90,\\\"18\\\":90,\\\"43\\\":90,\\\"49\\\":90,\\\"50\\\":90,\\\"51\\\":90,\\\"55\\\":90,\\\"56\\\":90,\\\"57\\\":90,\\\"58\\\":90,\\\"62\\\":90,\\\"63\\\":90,\\\"68\\\":90}\",\"current_profit\":\"{\\\"1\\\":90,\\\"6\\\":90,\\\"11\\\":90,\\\"13\\\":90,\\\"18\\\":90,\\\"43\\\":90,\\\"49\\\":90,\\\"50\\\":90,\\\"51\\\":90,\\\"55\\\":90,\\\"56\\\":90,\\\"57\\\":90,\\\"58\\\":90,\\\"62\\\":90,\\\"63\\\":90,\\\"68\\\":90}\"}','118.163.164.139',2,'cagent','2026-01-26 06:23:06','2026-01-26 06:23:06');

--
-- Table structure for table `backend_news`
--

CREATE TABLE `backend_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` text COLLATE utf8mb4_unicode_ci 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;

--
-- Dumping data for table `backend_news`
--


--
-- Table structure for table `backend_news_language`
--

CREATE TABLE `backend_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 `backend_news_language_news_uid_index` (`news_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `backend_news_language`
--


--
-- Table structure for table `base_configs`
--

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:关闭',
  `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:关闭',
  `open_pop_up` tinyint(1) DEFAULT '0' COMMENT '是否開啟彈跳功能',
  `open_store` tinyint(1) DEFAULT '0' COMMENT '是否開啟市集,1:是,0:否',
  `vip_open` tinyint(1) DEFAULT '0' COMMENT 'VIP的顯示開關',
  `app_download_open` tinyint(1) NOT NULL DEFAULT '0' COMMENT '使否開啟下載按鈕',
  `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等)',
  `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 'PC檔案下載連結',
  `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 '要排除的網域名稱',
  `daily_create_member` int NOT NULL DEFAULT '30' COMMENT '每日創建會員數量',
  `daily_create_cagent` int NOT NULL DEFAULT '10' COMMENT '每日創建代理數量',
  `amount_at_risk` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '轉入/出風控額度',
  `background_maintenance` tinyint(1) NOT NULL DEFAULT '0' COMMENT '後台維護',
  `is_under_maintenance` tinyint(1) DEFAULT '0' COMMENT '是否正在維護,1:是,0:否',
  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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `base_configs`
--

INSERT INTO `base_configs` VALUES (1,0,1,0,0,0,0,1,0,0,1,0,7,'天界娛樂城','123','TWD',NULL,'特殊设置',NULL,NULL,0,1,'[\"example.com\", \"example2.com\"]','{\"Ios\": \"https://www.google.com/\", \"Android\": \"https://www.google.com/\"}','{\"Tiktok\": \"https://www.tiktok.com/\", \"Youtube\": \"https://www.Youtube.com/\", \"Facebook\": \"https://www.facebook.com/\", \"Telegram\": \"https://web.telegram.org/\"}','','https://app.91url.cc/AppGo.08.19Be.skywardgame.zip','\"[\\\"tw\\\",\\\"en\\\",\\\"cn\\\"]\"','deep-blue','{\"red\": {\"brand\": {\"300\": \"#FFA3A3\", \"500\": \"#FF6666\", \"600\": \"#F04D4D\", \"700\": \"#D43232\", \"900\": \"#A32222\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#FF6666\"}, \"game-item\": {\"mask\": \"rgba(255, 102, 102, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"right-promotion-box\": {\"to\": \"#ffb3b3\", \"from\": \"#ffe1e1\", \"border\": \"#F04D4D\", \"hover_to\": \"#FF6666\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#ff8c8c\"}}, \"blue\": {\"brand\": {\"300\": \"#89C0F5\", \"500\": \"#67A9E0\", \"600\": \"#4F91CC\", \"700\": \"#3B7AB8\", \"900\": \"#2A5E95\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#89C0F5\"}, \"game-item\": {\"mask\": \"rgba(137, 192, 245, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"right-promotion-box\": {\"to\": \"#b3dfff\", \"from\": \"#e1f2ff\", \"border\": \"#4F91CC\", \"hover_to\": \"#67A9E0\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#8dc9ff\"}}, \"green\": {\"brand\": {\"300\": \"#B7FF64\", \"500\": \"#A2E04A\", \"600\": \"#8FCC39\", \"700\": \"#7DBA29\", \"900\": \"#5E8A1C\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#B7FF64\"}, \"game-item\": {\"mask\": \"rgba(183, 255, 100, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"right-promotion-box\": {\"to\": \"#bfffa3\", \"from\": \"#e3ffbf\", \"border\": \"#5E8A1C\", \"hover_to\": \"#7DBA29\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#a3e07f\"}}, \"purple\": {\"brand\": {\"300\": \"#E3C3FF\", \"500\": \"#C299FF\", \"600\": \"#A366FF\", \"700\": \"#8C4DF0\", \"900\": \"#7327D4\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#C299FF\"}, \"game-item\": {\"mask\": \"rgba(178, 102, 255, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"right-promotion-box\": {\"to\": \"#d9b7ff\", \"from\": \"#f3e1ff\", \"border\": \"#8C4DF0\", \"hover_to\": \"#A366FF\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#b184f0\"}}, \"yellow\": {\"brand\": {\"300\": \"#FFAA5E\", \"500\": \"#fec00e\", \"600\": \"#e9b00e\", \"700\": \"#e9b00e\", \"900\": \"#bd8e08\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#ffc700\"}, \"game-item\": {\"mask\": \"rgba(254, 192, 14, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"right-promotion-box\": {\"to\": \"#ffc881\", \"from\": \"#ffe5bf\", \"border\": \"#866b25\", \"hover_to\": \"#ff892e\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#ffbc44\"}}, \"deep-blue\": {\"dark\": {\"100\": \"#232A37\", \"150\": \"#232937\", \"200\": \"#171B27\", \"300\": \"#0F0D1A\", \"400\": \"#110F1E\", \"500\": \"#0B0916\", \"600\": \"#090714\", \"700\": \"#4F5C78\"}, \"brand\": {\"100\": \"#95C8FE\", \"300\": \"#567cf5\", \"500\": \"#3a66f3\", \"600\": \"#1e50f1\", \"700\": \"#0e41e3\", \"900\": \"#0a30aa\"}, \"light\": {\"100\": \"#f1f2f4\", \"200\": \"#ffffff\", \"300\": \"#DDE0E3\", \"350\": \"rgb(170,170,170)\", \"400\": \"#535353\", \"500\": \"#15191C\", \"600\": \"#5f5f5f\"}, \"special\": {\"1\": \"#6779B1\", \"gold\": \"#f8e709\", \"jackpot-to\": \"#F6EB20\", \"jackpot-from\": \"#FEF87D\"}, \"game-item\": {\"mask\": \"rgba(58, 102, 243, 0.4)\"}, \"leaderBoard\": {\"left\": \"#242D4C\", \"right\": \"#33406B\", \"border\": \"#0f1428\"}, \"second-brand\": {\"500\": \"#7392f6\", \"700\": \"#0c38c7\"}, \"right-promotion-box\": {\"to\": \"#567cf5\", \"from\": \"#7392f6\", \"border\": \"#1e50f1\", \"hover_to\": \"#3a66f3\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#567cf5\"}}, \"light-green\": {\"dark\": {\"100\": \"#191C33\", \"200\": \"#110F1C\", \"300\": \"#0F0D1A\", \"400\": \"#110F1E\", \"500\": \"#0B0916\", \"600\": \"#090714\"}, \"brand\": {\"300\": \"#A4F3CF\", \"500\": \"#53DEA1\", \"600\": \"#45C38A\", \"700\": \"#42BA84\", \"900\": \"#319764\"}, \"light\": {\"100\": \"#f1f2f4\", \"200\": \"#ffffff\", \"300\": \"#DDE0E3\", \"350\": \"rgb(170,170,170)\", \"400\": \"#535353\", \"500\": \"#15191C\", \"600\": \"#5f5f5f\"}, \"special\": {\"1\": \"#8fa8aa\", \"gold\": \"#53DEA1\"}, \"game-item\": {\"mask\": \"rgba(83, 222, 161, 0.4)\"}, \"second-brand\": {\"500\": \"#b7ff64\", \"700\": \"#09d7eb\"}, \"header-gradient\": {\"to\": \"#52dcab\", \"from\": \"#7ef5d3\"}, \"right-promotion-box\": {\"to\": \"#A4F3CF\", \"from\": \"#D6F7E9\", \"border\": \"#42BA84\", \"hover_to\": \"#53DEA1\", \"background\": {\"platformBg\": \"#e3e3e3\", \"transactionCard\": \"#fff\"}, \"hover_from\": \"#78E8B2\"}}}','[\"127\", \"localhost\", \"boom69\", \"creditwww\"]',30,10,0.00,1,0);

--
-- Table structure for table `base_language`
--

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 AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `base_language`
--

INSERT INTO `base_language` VALUES (1,'Traditional Chinese','tw','zh_TW','GMT+8','tw.json',1),(2,'English','en','en_US','GMT-4','en.json',1),(3,'Simplified Chinese','cn','zh_CN','GMT+8','cn.json',0),(4,'Vietnamese ','vi','vi_VN','GMT+7','vi.json',0),(5,'Indonesia','id','id_ID','GMT+7','id.json',0),(6,'Japanese','jp','ja_JP','GMT+9','jp.json',0);

--
-- Table structure for table `blacklist`
--

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;

--
-- Dumping data for table `blacklist`
--


--
-- Table structure for table `cagent`
--

CREATE TABLE `cagent` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_uid` int unsigned NOT NULL,
  `level` tinyint DEFAULT NULL,
  `cagent_path` varchar(60) CHARACTER SET utf8mb4 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',
  `is_burden_rebate` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否負擔反水',
  `is_earn_rebate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否賺取反水',
  `oauth_ts` int DEFAULT NULL,
  `type` varchar(20) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `login_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `true_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '真實姓名(選填)',
  `name_set` tinyint NOT NULL DEFAULT '0' COMMENT '已經設定loginname1是0否',
  `passwd` varchar(70) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手機號碼(選填)',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `email` varchar(100) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdraw_password_set` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已設提款密碼',
  `open_trans_point` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否開啟機台棄分點數移轉(0關閉1開啟)',
  `open_member_line_bind` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否開啟會員LINE綁定(0關閉1開啟)',
  `google2fa_secret` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `google2fa_enable` int NOT NULL DEFAULT '0',
  `site_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `telegram_binded` tinyint(1) NOT NULL DEFAULT '0',
  `allow_skip_invoice` tinyint(1) NOT NULL DEFAULT '0' COMMENT '代理下的會員可否跳過發票設定(1:是,0:否)',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `cagent_cagent_unique` (`cagent`) USING BTREE,
  UNIQUE KEY `cagent_login_name_unique` (`login_name`) USING BTREE,
  KEY `parent_type_idx` (`parent_uid`,`type`) USING BTREE,
  KEY `game_permission_idx` (`cagent_game_permission_uid`) USING BTREE,
  KEY `game_profit_idx` (`cagent_game_profit_uid`) USING BTREE,
  KEY `page_permission_idx` (`cagent_page_permission_uid`) USING BTREE,
  KEY `cagent_path_idx` (`cagent_path`) USING BTREE,
  KEY `site_type_idx` (`site_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cagent`
--

INSERT INTO `cagent` VALUES (1,'Admin',0,1,'1',NULL,NULL,100,1,1,1,1,0,1766131642,'admin',0,'Admin Nickname 1','admin','admin',0,'$2y$10$XHmP4k8ygJ.QnPlh71gKl.pgqu9bkJfoRdNUe6azfgdZzcwtxXnve',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'1234567890','1998-07-01','admin.doe@example.com',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(2,'Agent2',1,2,'1>2',1,NULL,90,2,2,2,1,0,1766131642,'cagent',0,'Agent2','Agent2','Agent2',0,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'1234567890','1998-07-01','Agent2.doe@example.com',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(3,'wskyco_tgs44',0,1,'3',1,NULL,100,3,3,1,1,0,1766131642,'admin',1,'wskyco_tgs44','wskyco_tgs44','wskyco_tgs44',0,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'17084320775','1981-09-04','mhermann@schowalter.biz',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(4,'wskyco_s7503228',0,1,'4',1,NULL,100,4,4,1,1,0,1766131642,'admin',1,'wskyco_s7503228','wsky_s7503228','wskyco_s7503228',1,'$2y$10$8kh8rGDpK0s9oA9YhJMaIuSYPP8AAU7ux6lhumqHMdtLtUIxEAieC',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'19523402470','2002-05-11','devonte.stoltenberg@yahoo.com',0,0.000,0,NULL,0,1,1,'WWCP5JQ57TL6J4A4AODK633DTJMYCXNN',1,'0',0,0),(5,'wskyco_kuo',0,1,'5',1,NULL,100,5,5,1,1,0,1766131642,'admin',1,'wskyco_kuo','wskyco_kuo','wskyco_kuo',1,'$2y$10$42vnoJDZP90pTsflfS1GVe9erXB9V4ON47iogPKa5oSYx2ObyTOO2',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'14354549331','1976-12-04','tatum05@hotmail.com',0,0.000,0,NULL,0,1,1,'IDIPAMLHLZFL5SQQEB2PSPTIEJCP6V4K',1,'0',0,0),(6,'wskyco_chinin0702',0,1,'6',1,NULL,100,6,6,1,1,0,1766131642,'admin',1,'wskyco_chinin0702','wsky_chinin0702','wskyco_chinin0702',1,'$2y$10$qHCP4pTbVNji7Z7vi9xY.ew5wiCfEfz/E28m7TcWVkx18sosGoTJ2',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'15183264445','1972-04-05','dexter61@gmail.com',0,0.000,0,NULL,0,1,1,'6YZUUIWYCDN2QUEZOWNCVNK4IFBZYDNZ',1,'0',0,0),(7,'marketing_007',0,1,'7',1,NULL,100,7,7,1,1,0,1766131642,'admin',1,'marketing_007','marketing_007','marketing_007',0,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'15612223697','2015-06-24','katarina02@yahoo.com',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(8,'wskyco_yuling',0,1,'8',1,NULL,100,8,8,1,1,0,1766131642,'admin',1,'wskyco_yuling','wskyco_yuling','wskyco_yuling',0,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'17374518261','1973-07-17','inicolas@reichel.com',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(9,'wskyco_rick',0,1,'9',1,NULL,100,9,9,1,1,0,1766131642,'admin',1,'wskyco_rick','wskyco_rick','wskyco_rick',1,'$2y$10$LslEWu0JVx7G5pwbMra5A.niN4Ooae/fBdulGtHS3ymfdQLAzk6dW',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'18724415060','1997-09-12','aortiz@boyle.com',0,0.000,0,NULL,0,1,1,'2QZ6TKTSUPCAWZ7YOPLIOAMO56GJYTLM',1,'0',0,0),(10,'wsky_acc',0,1,'10',1,NULL,100,10,10,1,1,0,1766131642,'admin',1,'wsky_acc','wsky_acc','wsky_acc',1,'$2y$10$47xxIgPDwOJIPtmsfu.AqO3NxJZoU6tOV1/5SJEhjUU2x4a/eQFOm',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'19373399133','1995-07-07','welch.diamond@jacobs.com',0,0.000,0,NULL,0,1,1,'EEEYYJGS6G73OQSKSBYGJYTN3FI6ZSBM',1,'0',0,0),(11,'wskyco_zhi',0,1,'11',1,NULL,100,11,11,1,1,0,1766131642,'admin',1,'wskyco_zhi','wskyco_zhi','wskyco_zhi',1,'$2y$10$cRDOXeOY7PCjpeKsEuE5iujTSQUTzEFv24BgR561hfzT5qKZQV58C',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'18189302285','2024-01-20','precious35@yahoo.com',0,0.000,0,NULL,0,1,1,'VMKGQ44SAQ2YLFCAN7M2F2BYZHSPGA6P',1,'0',0,0),(12,'wskyco_ou',0,1,'12',1,NULL,100,12,12,1,1,0,1766131642,'admin',1,'wskyco_ou','wskyco_ou','wskyco_ou',1,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'18208836098','1974-05-04','laverna14@hotmail.com',0,0.000,0,NULL,0,1,1,'BJVZOI6YOHSXX6AWUVF37RVA3RZ24EL2',1,'0',0,0),(13,'wskyco_sy',0,1,'13',1,NULL,100,13,13,1,1,0,1766131642,'admin',1,'wskyco_sy','wskyco_sy','wskyco_sy',1,'$2y$10$ogLlL.iqtAU7R7gOZ2amAePgyoGUsVUrQ0iazrbiq47UOz0fkrEZm',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'18023594682','1971-05-17','enid81@wunsch.com',0,0.000,0,NULL,0,1,1,'XT2XL3YOJUXBUK5UJJZ5UNE3FFTYHNI2',1,'0',0,0),(14,'wskyco_j',0,1,'14',1,NULL,100,14,14,1,1,0,1766131642,'admin',1,'wskyco_j','wskyco_j','wskyco_j',0,'$2y$10$Aixo1aeHAFXTeTbXaJ2Xsep1MLg0GhO9yAR5s4uk0jGrHsMCO7oTq',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'13418877425','2025-04-23','feest.eileen@schiller.com',0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(15,'wskyco_mimi',0,1,'15',1,NULL,100,15,15,1,1,0,1766131642,'admin',1,'wskyco_mimi','wskyco_mimi','wskyco_mimi',1,'$2y$10$0MZVQHw81sbKEpqP87pQBuggXa3suDUzfbil2bpYvIQD7IKsIc1Ze',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'18058264870','1992-06-22','davis.jaida@yundt.com',0,0.000,0,NULL,0,1,1,'XJWSGUXGNA42UPEPGWHY5YXHAOFTMJKH',1,'0',0,0),(16,'wskyco_leonard',0,1,'16',1,NULL,100,16,16,1,1,0,1766131642,'admin',1,'wskyco_leonard','wskyco_leonard','wskyco_leonard',1,'$2y$10$KLUKI.0VLzcow2AJgV4TEOaPtNU/mnswJn6Mk9WIElRhlwzRXNVcG',1,'2025-12-19 16:07:22',1766131642,NULL,NULL,NULL,'14248993746','2016-10-03','dorian.steuber@yahoo.com',0,0.000,0,NULL,0,1,1,'GXUKTDLLXIHDK7IQEQHA563YDYHKRZ7U',1,'0',0,0),(17,'test0116',13,2,'13>17',NULL,NULL,0,0,0,11,1,0,NULL,'child',0,'test0116','test0116',NULL,0,'$2y$10$.sbIxdmZmZlIQJR0ABcGU.KYJIFoRQz/deQ/T5f4JEpNxt1EsfRkG',1,'2026-01-16 17:19:21',1768555161,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(18,'0119',13,2,'13>18',NULL,NULL,0,0,0,11,1,0,NULL,'child',0,'0119','0119',NULL,0,'$2y$10$7BHbpQadnLx0ublmlSkNlOh/mktuZNWZRM0nPZKxy/VNU5GGLrAj2',1,'2026-01-19 16:06:50',1768810010,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(19,'wskyCo',1,2,'1>19',14,15,0,29,14,2,1,0,NULL,'cagent',0,'系統商','wskyCo',NULL,1,'$2y$10$b.NbEmvw3vzT23hfpzPgCe8QJ0qrlRA6PZPsLmo729I3T6m4EbcsO',1,'2026-01-23 10:42:13',1769136133,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(20,'wskyDist1',19,3,'1>19>20',16,17,0,30,15,3,1,0,NULL,'cagent',0,'經銷商1','wskyDist1',NULL,0,'$2y$10$T36.YWqJ8.FR7BjXXDhtYu6HCnlJGoxMyEH0yghqSvn65criWec4a',1,'2026-01-23 11:20:46',1769138446,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(21,'wskyStore1',20,4,'1>19>20>21',18,19,0,31,16,4,1,0,NULL,'cagent',0,'店家1','wskyStore1',NULL,1,'$2y$10$9H6dUGZ7v1w575Bb/yaxVeTvkfnzVdyc3qRGogVMRbvGi3iI3cs7a',1,'2026-01-23 11:22:54',1769138574,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(22,'wskyDist2',19,3,'1>19>22',20,21,0,32,17,3,1,0,NULL,'cagent',0,'經銷商2','wskyDist2',NULL,0,'$2y$10$Xutt9ewmWPJFDjy/4myVp.dFbeXOrdDCS4BfeS4LFp/OfpP3ZweHC',1,'2026-01-23 13:39:57',1769146797,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(24,'ouagent1',2,3,'1>2>24',5,6,0,271,5,3,1,0,NULL,'cagent',0,'ouagent1','ouagent1',NULL,0,'$2y$10$N.RSUBX8y/rPTQkq16veqOX7wvTMVZXh0D/5gtHfqUVrePPB.Gz1y',1,'2026-01-26 13:16:58',1769404618,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0),(25,'ouagent2',24,4,'1>2>24>25',7,8,0,273,6,4,1,0,NULL,'cagent',0,'ouagent2','ouagent2',NULL,0,'$2y$10$F.5L3Xz8vcTRs7nQL28W.OjfHP.zVEg2BIW0oLcr3Wb5sa3mc7UhC',1,'2026-01-26 13:19:08',1769404748,NULL,NULL,NULL,NULL,NULL,NULL,0,0.000,0,NULL,0,1,1,NULL,0,'0',0,0);

--
-- Table structure for table `cagent_bet_limit`
--

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;

--
-- Dumping data for table `cagent_bet_limit`
--


--
-- Table structure for table `cagent_commission_log`
--

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;

--
-- Dumping data for table `cagent_commission_log`
--


--
-- Table structure for table `cagent_game_permission`
--

CREATE TABLE `cagent_game_permission` (
  `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 '不能被刪除',
  `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 AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理遊戲權限設定';

--
-- Dumping data for table `cagent_game_permission`
--

INSERT INTO `cagent_game_permission` VALUES (1,12,'ouagent1_20260126131348',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(2,12,'machine_ouagent1_2026012613134',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(3,12,'ouagent1_20260126131546',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(4,12,'machine_ouagent1_2026012613154',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(5,12,'ouagent1_20260126131656',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(6,12,'machine_ouagent1_2026012613165',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(7,12,'ouagent2_20260126131907',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}'),(8,12,'machine_ouagent2_2026012613190',0,'{\"0\": 0, \"1\": 1, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 1, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 1, \"12\": 0, \"13\": 1, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 1, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 1, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 1, \"63\": 1, \"68\": 1}');

--
-- Table structure for table `cagent_game_profit`
--

CREATE TABLE `cagent_game_profit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL,
  `type` enum('cagent','member') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '類別,代理或會員',
  `name` varchar(50) CHARACTER SET utf8mb4 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 AUTO_INCREMENT=278 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理佔成設定';

--
-- Dumping data for table `cagent_game_profit`
--

INSERT INTO `cagent_game_profit` VALUES (1,1,'cagent','100%',1,'{\"1\": 100, \"2\": 100, \"3\": 100, \"4\": 100, \"5\": 100, \"11\": 100, \"12\": 100, \"13\": 100, \"18\": 100, \"19\": 100, \"20\": 100, \"22\": 100, \"30\": 100, \"34\": 100, \"35\": 100, \"36\": 100, \"37\": 100, \"38\": 100, \"39\": 100, \"40\": 100, \"42\": 100, \"45\": 100, \"46\": 100, \"47\": 100, \"48\": 100, \"49\": 100, \"50\": 100, \"51\": 100, \"53\": 100, \"54\": 100, \"55\": 100, \"56\": 100, \"57\": 100, \"58\": 100, \"60\": 100, \"61\": 100, \"62\": 100, \"63\": 100, \"64\": 100, \"66\": 100}','{\"1\": 100, \"2\": 100, \"3\": 100, \"4\": 100, \"5\": 100, \"11\": 100, \"12\": 100, \"13\": 100, \"18\": 100, \"19\": 100, \"20\": 100, \"22\": 100, \"30\": 100, \"34\": 100, \"35\": 100, \"36\": 100, \"37\": 100, \"38\": 100, \"39\": 100, \"40\": 100, \"42\": 100, \"45\": 100, \"46\": 100, \"47\": 100, \"48\": 100, \"49\": 100, \"50\": 100, \"51\": 100, \"53\": 100, \"54\": 100, \"55\": 100, \"56\": 100, \"57\": 100, \"58\": 100, \"60\": 100, \"61\": 100, \"62\": 100, \"63\": 100, \"64\": 100, \"66\": 100}'),(2,2,'cagent','90%',1,'{\"1\": 90, \"6\": 90, \"11\": 90, \"13\": 90, \"18\": 90, \"43\": 90, \"49\": 90, \"50\": 90, \"51\": 90, \"55\": 90, \"56\": 90, \"57\": 90, \"58\": 90, \"62\": 90, \"63\": 90, \"68\": 90}','{\"1\": 90, \"6\": 90, \"11\": 90, \"13\": 90, \"18\": 90, \"43\": 90, \"49\": 90, \"50\": 90, \"51\": 90, \"55\": 90, \"56\": 90, \"57\": 90, \"58\": 90, \"62\": 90, \"63\": 90, \"68\": 90}'),(271,12,'cagent','ouagent1_20260126131546',0,'{\"1\": 80, \"6\": 80, \"11\": 80, \"13\": 80, \"18\": 80, \"43\": 80, \"49\": 80, \"50\": 80, \"51\": 80, \"55\": 80, \"56\": 80, \"57\": 80, \"58\": 80, \"62\": 80, \"63\": 80, \"68\": 80}','{\"1\": 80, \"6\": 80, \"11\": 80, \"13\": 80, \"18\": 80, \"43\": 80, \"49\": 80, \"50\": 80, \"51\": 80, \"55\": 80, \"56\": 80, \"57\": 80, \"58\": 80, \"62\": 80, \"63\": 80, \"68\": 80}'),(273,12,'cagent','ouagent2_20260126131907',0,'{\"1\": 70, \"6\": 70, \"11\": 70, \"13\": 70, \"18\": 70, \"43\": 70, \"49\": 70, \"50\": 70, \"51\": 70, \"55\": 70, \"56\": 70, \"57\": 70, \"58\": 70, \"62\": 70, \"63\": 70, \"68\": 70}','{\"1\": 70, \"6\": 70, \"11\": 70, \"13\": 70, \"18\": 70, \"43\": 70, \"49\": 70, \"50\": 70, \"51\": 70, \"55\": 70, \"56\": 70, \"57\": 70, \"58\": 70, \"62\": 70, \"63\": 70, \"68\": 70}'),(274,12,'member','ouPlayer1_20260126131938',0,'{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}','{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}'),(275,12,'member','ouPlayer2_20260126131957',0,'{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}','{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}');

--
-- Table structure for table `cagent_game_rebate`
--

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 AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='遊戲返水設定';

--
-- Dumping data for table `cagent_game_rebate`
--

INSERT INTO `cagent_game_rebate` VALUES (1,1,'100%',1,'{\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"11\": 1, \"12\": 1, \"13\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"22\": 1, \"30\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"37\": 1, \"38\": 1, \"39\": 1, \"40\": 1, \"42\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"53\": 1, \"54\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"60\": 1, \"61\": 1, \"62\": 1, \"63\": 1, \"64\": 1, \"66\": 1}','{\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"11\": 1, \"12\": 1, \"13\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"22\": 1, \"30\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"37\": 1, \"38\": 1, \"39\": 1, \"40\": 1, \"42\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"53\": 1, \"54\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"60\": 1, \"61\": 1, \"62\": 1, \"63\": 1, \"64\": 1, \"66\": 1}'),(2,2,'90%',1,'{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}'),(5,12,'ouagent1_20260126131656',0,'{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}'),(6,12,'ouagent2_20260126131907',0,'{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}');

--
-- Table structure for table `cagent_info_bindings`
--

CREATE TABLE `cagent_info_bindings` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL COMMENT '代理uid',
  `bind_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '綁定來源',
  `bind_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '綁定id',
  `status` int unsigned NOT NULL DEFAULT '1' COMMENT '狀態(1:有效 0:無效)',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  PRIMARY KEY (`uid`),
  KEY `cagent_info_bindings_cagent_uid_index` (`cagent_uid`),
  KEY `cagent_info_bindings_bind_type_index` (`bind_type`),
  KEY `cagent_info_bindings_bind_id_index` (`bind_id`),
  KEY `cagent_info_bindings_status_index` (`status`),
  CONSTRAINT `cagent_info_bindings_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理綁定第三方登入表';

--
-- Dumping data for table `cagent_info_bindings`
--


--
-- Table structure for table `cagent_line_group`
--

CREATE TABLE `cagent_line_group` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` int unsigned NOT NULL COMMENT '代理uid',
  `group_url` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '群組網址',
  `group_id` text COLLATE utf8mb4_unicode_ci COMMENT '群組id',
  `status` int unsigned NOT NULL DEFAULT '1' COMMENT '狀態(1:有效 0:無效)',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  `is_admin_services` int unsigned NOT NULL DEFAULT '0' COMMENT '管理服務',
  PRIMARY KEY (`uid`),
  KEY `cagent_line_group_cagent_uid_index` (`cagent_uid`),
  KEY `cagent_line_group_status_index` (`status`),
  KEY `cagent_line_group_is_admin_services_index` (`is_admin_services`),
  CONSTRAINT `cagent_line_group_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理LINE群組';

--
-- Dumping data for table `cagent_line_group`
--


--
-- Table structure for table `cagent_login_log`
--

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 '網址',
  `memo` text COLLATE utf8mb4_unicode_ci,
  `create_time` datetime DEFAULT NULL,
  `create_ts` int NOT NULL,
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  KEY `ip_idx` (`ip`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理登入日誌';

--
-- Dumping data for table `cagent_login_log`
--

INSERT INTO `cagent_login_log` VALUES (1,16,'118.163.164.139','desktop',NULL,'sndams.5285.com.tw','{\"account\":\"wskyco_leonard\",\"password\":\"bff3bf476dd252b38f0f14295adee79f\",\"fa2\":\"111\"}','2026-01-26 12:29:41',1769401781),(2,12,'118.163.164.139','desktop',NULL,'sndams.5285.com.tw','{\"account\":\"wskyco_ou\",\"password\":\"b33aed8f3134996703dc39f9a7c95783\"}','2026-01-26 13:12:08',1769404328);

--
-- Table structure for table `cagent_page_permission`
--

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 AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理頁面權限設定';

--
-- Dumping data for table `cagent_page_permission`
--

INSERT INTO `cagent_page_permission` VALUES (1,'ENGINEERING','ENGINEERING','{\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"8\": 1, \"9\": 1, \"10\": 1, \"11\": 1, \"12\": 1, \"13\": 1, \"14\": 1, \"15\": 1, \"16\": 1, \"17\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"24\": 1, \"25\": 1, \"26\": 1, \"27\": 1, \"28\": 1, \"29\": 1, \"30\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"37\": 1, \"38\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"42\": 1, \"43\": 1, \"44\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"52\": 1, \"53\": 1, \"54\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"59\": 1, \"60\": 1, \"61\": 1, \"62\": 1, \"63\": 1, \"64\": 1, \"65\": 1, \"66\": 1, \"67\": 1, \"68\": 1, \"69\": 1, \"70\": 1, \"71\": 1, \"72\": 1, \"73\": 1, \"74\": 1}',0),(2,'2','總公司(總監)','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"26\": 1, \"27\": 1, \"28\": 1, \"29\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"42\": 1, \"50\": 1, \"51\": 1, \"52\": 1, \"54\": 1, \"60\": 1, \"61\": 1, \"64\": 1, \"70\": 1, \"72\": 1, \"73\": 1, \"75\": 1, \"77\": 1, \"79\": 1, \"80\": 1, \"82\": 1, \"83\": 1, \"109\": 1, \"116\": 1, \"117\": 1, \"120\": 1, \"126\": 1, \"128\": 1, \"129\": 1, \"130\": 1}',0),(3,'3','經銷商','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"79\": 1, \"80\": 1, \"81\": 1, \"82\": 1, \"83\": 1, \"109\": 1, \"120\": 1, \"126\": 1, \"127\": 1}',1),(4,'4','店家','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"80\": 1, \"81\": 1, \"109\": 1, \"120\": 1}',1),(5,'5','店家1','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"80\": 1, \"81\": 1, \"109\": 1, \"120\": 1}',1),(6,'6','店家2','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"80\": 1, \"81\": 1, \"109\": 1, \"120\": 1}',1),(7,'7','店家3','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"80\": 1, \"81\": 1, \"109\": 1, \"120\": 1}',1),(8,'8','店家4','{\"1\": 1, \"2\": 1, \"3\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"14\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"31\": 1, \"32\": 1, \"33\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"39\": 1, \"40\": 1, \"41\": 1, \"60\": 1, \"61\": 1, \"72\": 1, \"77\": 1, \"80\": 1, \"81\": 1, \"109\": 1, \"120\": 1}',1),(9,'CUSTOMER_SERVICE','CUSTOMER_SERVICE','{\"1\": 0, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"6\": 1, \"7\": 1, \"8\": 1, \"9\": 1, \"10\": 1, \"14\": 0, \"17\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"21\": 1, \"22\": 1, \"23\": 1, \"24\": 1, \"25\": 0, \"26\": 1, \"27\": 1, \"28\": 1, \"29\": 1, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"39\": 0, \"40\": 0, \"41\": 1, \"42\": 1, \"43\": 1, \"44\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"51\": 1, \"52\": 1, \"53\": 0, \"54\": 0, \"55\": 0, \"56\": 0, \"57\": 0, \"58\": 1, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 0, \"63\": 1, \"64\": 1, \"65\": 1, \"66\": 0, \"67\": 0, \"68\": 0, \"69\": 1, \"70\": 0, \"71\": 1, \"72\": 1, \"73\": 1, \"74\": 1, \"75\": 0, \"76\": 0, \"custom_name\": 1}',1),(10,'FINANCE','FINANCE','{\"1\": 0, \"2\": 1, \"3\": 0, \"4\": 0, \"5\": 1, \"6\": 0, \"7\": 0, \"8\": 1, \"9\": 1, \"10\": 1, \"11\": 1, \"14\": 1, \"17\": 0, \"18\": 0, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 1, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 0, \"44\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"51\": 0, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 0, \"56\": 1, \"57\": 0, \"58\": 0, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 0, \"63\": 1, \"64\": 0, \"65\": 0, \"66\": 0, \"67\": 0, \"68\": 0, \"69\": 0, \"70\": 0, \"71\": 0, \"72\": 0, \"73\": 0, \"74\": 1, \"75\": 0, \"76\": 0, \"custom_name\": 1}',1),(11,'CHILD_REPORT','CHILD_REPORT','{\"1\": 1, \"2\": 1, \"5\": 1, \"17\": 1, \"18\": 1, \"20\": 1, \"custom_name\": 1}',1);

--
-- Table structure for table `cagent_profit`
--

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='代理基本佔成設定';

--
-- Dumping data for table `cagent_profit`
--


--
-- Table structure for table `cagent_promo_code`
--

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;

--
-- Dumping data for table `cagent_promo_code`
--


--
-- Table structure for table `cagent_setting_history`
--

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 '創建時間',
  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 AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理訊息設定歷史封存';

--
-- Dumping data for table `cagent_setting_history`
--

INSERT INTO `cagent_setting_history` VALUES (53,2,'Agent2',1,2,'1>2','{\"profit\": 0, \"rebate\": 0, \"commission\": 0, \"event_rewards\": 0}','{\"1\": 90, \"6\": 90, \"11\": 90, \"13\": 90, \"18\": 90, \"43\": 90, \"49\": 90, \"50\": 90, \"51\": 90, \"55\": 90, \"56\": 90, \"57\": 90, \"58\": 90, \"62\": 90, \"63\": 90, \"68\": 90}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}',0.00000000,'2026-01-26','2026-01-26 14:10:39'),(54,24,'ouagent1',2,3,'1>2>24','{\"profit\": 0, \"rebate\": 0, \"commission\": 0, \"event_rewards\": 0}','{\"1\": 80, \"6\": 80, \"11\": 80, \"13\": 80, \"18\": 80, \"43\": 80, \"49\": 80, \"50\": 80, \"51\": 80, \"55\": 80, \"56\": 80, \"57\": 80, \"58\": 80, \"62\": 80, \"63\": 80, \"68\": 80}','{\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"11\": 1, \"12\": 1, \"13\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"22\": 1, \"30\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"37\": 1, \"38\": 1, \"39\": 1, \"40\": 1, \"42\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"53\": 1, \"54\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"60\": 1, \"61\": 1, \"62\": 1, \"63\": 1, \"64\": 1, \"66\": 1}',0.00000000,'2026-01-26','2026-01-26 14:10:39'),(55,25,'ouagent2',24,4,'1>2>24>25','{\"profit\": 0, \"rebate\": 0, \"commission\": 0, \"event_rewards\": 0}','{\"1\": 70, \"6\": 70, \"11\": 70, \"13\": 70, \"18\": 70, \"43\": 70, \"49\": 70, \"50\": 70, \"51\": 70, \"55\": 70, \"56\": 70, \"57\": 70, \"58\": 70, \"62\": 70, \"63\": 70, \"68\": 70}','{\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 1, \"5\": 1, \"11\": 1, \"12\": 1, \"13\": 1, \"18\": 1, \"19\": 1, \"20\": 1, \"22\": 1, \"30\": 1, \"34\": 1, \"35\": 1, \"36\": 1, \"37\": 1, \"38\": 1, \"39\": 1, \"40\": 1, \"42\": 1, \"45\": 1, \"46\": 1, \"47\": 1, \"48\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"53\": 1, \"54\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"60\": 1, \"61\": 1, \"62\": 1, \"63\": 1, \"64\": 1, \"66\": 1}',0.00000000,'2026-01-26','2026-01-26 14:10:39'),(56,5,'wskyco_kuo',0,1,'5','{\"profit\": 0, \"rebate\": 0, \"commission\": 0, \"event_rewards\": 0}','{\"1\": 0, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 0, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 0, \"12\": 0, \"13\": 0, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 0, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 0, \"50\": 0, \"51\": 0, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 0, \"56\": 0, \"57\": 0, \"58\": 0, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 0, \"63\": 0, \"64\": 0, \"65\": 0, \"66\": 0, \"68\": 0}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}',0.00000000,'2026-01-26','2026-01-26 14:10:59'),(57,6,'wskyco_chinin0702',0,1,'6','{\"profit\": 0, \"rebate\": 0, \"commission\": 0, \"event_rewards\": 0}','{\"1\": 0, \"2\": 0, \"3\": 0, \"4\": 0, \"5\": 0, \"6\": 0, \"7\": 0, \"8\": 0, \"9\": 0, \"10\": 0, \"11\": 0, \"12\": 0, \"13\": 0, \"14\": 0, \"15\": 0, \"16\": 0, \"17\": 0, \"18\": 0, \"19\": 0, \"20\": 0, \"21\": 0, \"22\": 0, \"23\": 0, \"24\": 0, \"25\": 0, \"26\": 0, \"27\": 0, \"28\": 0, \"29\": 0, \"30\": 0, \"31\": 0, \"32\": 0, \"33\": 0, \"34\": 0, \"35\": 0, \"36\": 0, \"37\": 0, \"38\": 0, \"39\": 0, \"40\": 0, \"41\": 0, \"42\": 0, \"43\": 0, \"45\": 0, \"46\": 0, \"47\": 0, \"48\": 0, \"49\": 0, \"50\": 0, \"51\": 0, \"52\": 0, \"53\": 0, \"54\": 0, \"55\": 0, \"56\": 0, \"57\": 0, \"58\": 0, \"59\": 0, \"60\": 0, \"61\": 0, \"62\": 0, \"63\": 0, \"64\": 0, \"65\": 0, \"66\": 0, \"68\": 0}','{\"1\": 1, \"6\": 1, \"11\": 1, \"13\": 1, \"18\": 1, \"43\": 1, \"49\": 1, \"50\": 1, \"51\": 1, \"55\": 1, \"56\": 1, \"57\": 1, \"58\": 1, \"62\": 1, \"63\": 1, \"68\": 1}',0.00000000,'2026-01-26','2026-01-26 14:11:10');

--
-- Table structure for table `cagent_statistics`
--

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 AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理每日統計額度控管表';

--
-- Dumping data for table `cagent_statistics`
--

INSERT INTO `cagent_statistics` VALUES (2,'2026-01-26',12,'daily_create_cagent',2.00,'2026-01-26 13:16:58','2026-01-26 13:19:08'),(3,'2026-01-26',24,'daily_create_member',1.00,'2026-01-26 13:19:39','2026-01-26 13:19:39'),(4,'2026-01-26',25,'daily_create_member',1.00,'2026-01-26 13:19:58','2026-01-26 13:19:58');

--
-- Table structure for table `cagent_telegram_info`
--

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;

--
-- Dumping data for table `cagent_telegram_info`
--


--
-- Table structure for table `cagent_wallet`
--

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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cagent_wallet`
--

INSERT INTO `cagent_wallet` VALUES (2,'TWD-24',24,'TWD',0.00000000,0.00000000),(3,'TWD-25',25,'TWD',0.00000000,0.00000000);

--
-- Table structure for table `cagent_wallet_log`
--

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;

--
-- Dumping data for table `cagent_wallet_log`
--


--
-- Table structure for table `cagent_withdrawals`
--

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;

--
-- Dumping data for table `cagent_withdrawals`
--


--
-- Table structure for table `carousels`
--

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:市集輪播',
  `events_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'carousels' COMMENT '輪播圖活動類型',
  `events_uid` int unsigned DEFAULT NULL COMMENT '輪播圖活動關聯uid',
  PRIMARY KEY (`uid`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  KEY `carousels_events_type_index` (`events_type`),
  KEY `carousels_events_uid_index` (`events_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `carousels`
--


--
-- Table structure for table `carousels_language`
--

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 '輪播圖_移動裝置',
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文案標題',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '文案內容',
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `carousels_language`
--


--
-- Table structure for table `cash_register_limit`
--

CREATE TABLE `cash_register_limit` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '表的主鍵',
  `member_info_uid` int unsigned NOT NULL,
  `amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT '當前額度',
  `limit_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT '額度上限',
  `status` int unsigned NOT NULL DEFAULT '1' COMMENT '狀態(1:有效 0:無效)',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '記錄最後更新的時間戳',
  PRIMARY KEY (`uid`),
  KEY `cash_register_limit_member_info_uid_index` (`member_info_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='機台入超額度限制';

--
-- Dumping data for table `cash_register_limit`
--


--
-- Table structure for table `cash_register_log`
--

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;

--
-- Dumping data for table `cash_register_log`
--


--
-- Table structure for table `chat_profiles`
--

CREATE TABLE `chat_profiles` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '聊天設定檔唯一識別碼',
  `is_cagent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為代理',
  `identity_uid` int unsigned NOT NULL COMMENT '用戶識別碼，若is_cagent = true, 則代表cagent_uid，依此類推',
  `chat_nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天暱稱',
  `chat_avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天頭像',
  `introduction` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '個人簡介',
  `privacy_setting` enum('public','friends_only','private') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'public' COMMENT '隱私設定：public公開、friends_only僅好友、private私人',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '狀態：還沒有規劃要怎麼使用這個欄位，暫時預留',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `chat_profiles_is_cagent_identity_uid_unique` (`is_cagent`,`identity_uid`) USING BTREE,
  KEY `chat_profiles_chat_nickname_index` (`chat_nickname`) USING BTREE,
  KEY `chat_profiles_status_index` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=667 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_profiles`
--

INSERT INTO `chat_profiles` VALUES (665,1,16,NULL,NULL,NULL,'public',NULL,'2026-01-26 04:30:41','2026-01-26 04:30:41'),(666,1,12,NULL,NULL,NULL,'public',NULL,'2026-01-26 05:12:09','2026-01-26 05:12:09');

--
-- Table structure for table `chat_room_friendships`
--

CREATE TABLE `chat_room_friendships` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '好友關係唯一識別碼',
  `chat_profile_uid` bigint unsigned NOT NULL COMMENT '用戶識別碼',
  `friend_profile_uid` bigint unsigned NOT NULL COMMENT '好友識別碼',
  `status` enum('pending','accepted','blocked') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '好友狀態：pending待處理、accepted已接受、blocked已封鎖',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE KEY `chat_room_friendships_chat_profile_uid_friend_profile_uid_unique` (`chat_profile_uid`,`friend_profile_uid`) USING BTREE,
  KEY `chat_room_friendships_friend_profile_uid_foreign` (`friend_profile_uid`) USING BTREE,
  CONSTRAINT `chat_room_friendships_chat_profile_uid_foreign` FOREIGN KEY (`chat_profile_uid`) REFERENCES `chat_profiles` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `chat_room_friendships_friend_profile_uid_foreign` FOREIGN KEY (`friend_profile_uid`) REFERENCES `chat_profiles` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=247 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_friendships`
--


--
-- Table structure for table `chat_room_member_permission`
--

CREATE TABLE `chat_room_member_permission` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT '會員uid',
  `chat_room` tinyint(1) NOT NULL DEFAULT '1' COMMENT '聊天室功能開關',
  `public_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '公頻功能開關',
  `public_send` tinyint(1) NOT NULL DEFAULT '0' COMMENT '公頻發言功能開關',
  `private_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '私聊功能開關',
  `edit_by` int unsigned NOT NULL DEFAULT '1' COMMENT '最後編輯權限者',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `chat_room_member_permission_member_info_uid_index` (`member_info_uid`) USING BTREE,
  CONSTRAINT `chat_room_member_permission_member_info_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1494 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_member_permission`
--

INSERT INTO `chat_room_member_permission` VALUES (1492,17,1,1,0,1,12,'2026-01-26 05:19:39','2026-01-26 05:19:39'),(1493,18,1,1,0,1,12,'2026-01-26 05:19:58','2026-01-26 05:19:58');

--
-- Table structure for table `chat_room_members`
--

CREATE TABLE `chat_room_members` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '聊天室成員唯一識別碼',
  `chat_room_uid` bigint unsigned NOT NULL,
  `chat_profile_uid` bigint unsigned NOT NULL COMMENT '成員識別碼',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `chat_room_members_chat_room_uid_index` (`chat_room_uid`) USING BTREE,
  KEY `chat_room_members_chat_profile_uid_index` (`chat_profile_uid`) USING BTREE,
  CONSTRAINT `chat_room_members_chat_profile_uid_foreign` FOREIGN KEY (`chat_profile_uid`) REFERENCES `chat_profiles` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `chat_room_members_chat_room_uid_foreign` FOREIGN KEY (`chat_room_uid`) REFERENCES `chat_rooms` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2347 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_members`
--


--
-- Table structure for table `chat_room_message_reads`
--

CREATE TABLE `chat_room_message_reads` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '已讀記錄唯一識別碼',
  `message_uid` bigint unsigned NOT NULL,
  `chat_profile_uid` bigint unsigned NOT NULL COMMENT '讀取者識別碼',
  `read_at` timestamp NOT NULL COMMENT '讀取時間',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `chat_room_message_reads_message_uid_foreign` (`message_uid`) USING BTREE,
  KEY `chat_room_message_reads_chat_profile_uid_foreign` (`chat_profile_uid`) USING BTREE,
  CONSTRAINT `chat_room_message_reads_chat_profile_uid_foreign` FOREIGN KEY (`chat_profile_uid`) REFERENCES `chat_profiles` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `chat_room_message_reads_message_uid_foreign` FOREIGN KEY (`message_uid`) REFERENCES `chat_room_messages` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2555 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_message_reads`
--


--
-- Table structure for table `chat_room_messages`
--

CREATE TABLE `chat_room_messages` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '訊息唯一識別碼',
  `chat_room_uid` bigint unsigned NOT NULL,
  `chat_profile_uid` bigint unsigned NOT NULL COMMENT '發送者識別碼',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'text' COMMENT '訊息類型：text文字、image圖片、emoji表情',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '訊息內容',
  `content_excerpt` varchar(255) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (substr(`content`,1,255)) VIRTUAL,
  `is_retracted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '訊息是否收回',
  `retracted_at` timestamp NULL DEFAULT NULL COMMENT '訊息收回時間',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `chat_room_messages_chat_profile_uid_foreign` (`chat_profile_uid`) USING BTREE,
  KEY `room_profile_time` (`chat_room_uid`,`chat_profile_uid`,`created_at`) USING BTREE,
  KEY `chat_room_messages_content_excerpt_index` (`content_excerpt`) USING BTREE,
  CONSTRAINT `chat_room_messages_chat_profile_uid_foreign` FOREIGN KEY (`chat_profile_uid`) REFERENCES `chat_profiles` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `chat_room_messages_chat_room_uid_foreign` FOREIGN KEY (`chat_room_uid`) REFERENCES `chat_rooms` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=735 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_messages`
--


--
-- Table structure for table `chat_room_words_censorship`
--

CREATE TABLE `chat_room_words_censorship` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('text','image','emoji') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'text' COMMENT '限制/審核的訊息類型',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '限制的敏感詞彙',
  `edit_by` int unsigned NOT NULL COMMENT '該詞彙最後由誰創建/編輯',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_room_words_censorship`
--


--
-- Table structure for table `chat_rooms`
--

CREATE TABLE `chat_rooms` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '聊天室唯一識別碼',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天室名稱',
  `type` enum('public','private','cs','cr','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '聊天室類型：public公開、private私人、cs客服、cr紙鈔機棄分專用、other其他',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`) USING BTREE,
  KEY `idx_chat_rooms_name_type` (`name`,`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=604 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_rooms`
--


--
-- Table structure for table `company_bank_accounts`
--

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表示關閉',
  `type` enum('deposit','withdraw') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'deposit' COMMENT '銀行帳用途: deposit|withdraw',
  `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 `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;

--
-- Dumping data for table `company_bank_accounts`
--


--
-- Table structure for table `company_receipts`
--

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;

--
-- Dumping data for table `company_receipts`
--


--
-- Table structure for table `continuous_events`
--

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;

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


--
-- Table structure for table `continuous_events_attribute`
--

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;

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


--
-- Table structure for table `continuous_events_copywriting`
--

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;

--
-- Dumping data for table `continuous_events_copywriting`
--


--
-- Table structure for table `crypto_wallet_log`
--

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 '8a639981-ac75-4c53-bb57-3ceeca9a49bf' 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;

--
-- Dumping data for table `crypto_wallet_log`
--


--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `currency_code` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣字母代碼, 符合ISO 4217標準',
  `currency_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣名稱',
  `exchange_rate` json NOT NULL COMMENT '相對於基準貨幣的匯率',
  `prefix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '貨幣前綴',
  `symbol` varchar(3) CHARACTER SET utf8mb4 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`) USING BTREE,
  KEY `status_idx` (`status`) USING BTREE,
  KEY `status_front_idx` (`status_front`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` VALUES ('IDR','Indonesian Rupiah','{\"IDR\": 1, \"JPY\": \"0.0095194985\", \"PHP\": \"0.003524345\", \"TWD\": \"0.0020014722\", \"USDT\": \"0.0000617548\"}','idr_','Rp',8,0,150000000.00000000,0,0,NULL,NULL),('JPY','Japanese Yen','{\"IDR\": \"105.0475510866\", \"JPY\": 1, \"PHP\": \"0.370223808\", \"TWD\": \"0.2102497567\", \"USDT\": \"0.0064871878\"}','jpy_','¥',8,0,10000.00000000,0,0,NULL,NULL),('PHP','Philippine Peso','{\"IDR\": \"283.7406693534\", \"JPY\": \"2.7010688628\", \"PHP\": 1, \"TWD\": \"0.5678990713\", \"USDT\": \"0.017522341\"}','php_','₱',8,0,30000.00000000,0,0,NULL,'[\"Gcash\", \"PayMaya\", \"BPI Bank\", \"BDO Unibank\", \"Metropolitan Bank and Trust Co\", \"LANDBANK / OFBank\", \"Security Bank Corporation\", \"Union Bank of the Philippines\", \"Philippine National Bank\", \"China Banking Corporation\", \"East West Banking Corporation\", \"RCBC/DiskarTech\", \"United Coconut Planters Bank (UCPB)\", \"Philippine Savings Bank\", \"Asia United Bank Corporation\", \"Philippine Bank of Communications\", \"Development Bank of the Philippines\", \"ALLBANK(A Thirft Bank)\", \"Asenso\", \"Bangko Mabuhay\", \"Bank of Commerce\", \"BanKo,A Subsidiary of BPI\", \"Bayad\", \"BDO NeTwork Bank\", \"Camalig Bank\", \"CARD Bank\", \"Cebuana Lhuillier Bank / Cebuana Xpress\", \"China Bank Savings\", \"Coins.ph (DCPay)\", \"CTBC Bank (Philippines) Corporation\", \"Dumaguete City Development Bank\", \"Dungganon Bank\", \"Equicom Savings Bank\", \"GrabPay\", \"ING Bank N.V.\", \"ISLA Bank\", \"JuanCash\", \"Zybi Tech Inc. / JuanCash\", \"Komo / EastWest Rural Bank\", \"East West Rural Bank / Komo\", \"Legazpi Saving Bank\", \"Malayan Bank Saving and Mortage Bank\", \"Malayan Bank Savings and Mortgage Bank Inc.\", \"Maybank Philippnies\", \"Mindanao Consolidated CoopBank\", \"Netbank\", \"OmniPay\", \"OmniPay, Inc.\", \"Partner Rural Bank\", \"Partner Rural Bank (Cotabato), Inc.\", \"Philippine Business Bank\", \"Philippine Trust Company\", \"Producers Bank\", \"Queenbank\", \"Quezon Capital Rural Bank\", \"RCBC Saving Bank\", \"Robinsons Bank Corporation\", \"Seabank\", \"ShopeePay\", \"Standard Chartered Bank\", \"Starpay\", \"Sterling Bank of Asia\", \"Sun Savings Bank\", \"TayoCash\", \"UCPB Savings Bank\", \"USSC Monet Services\", \"Veterans Bank\", \"Wealth Development Bank\"]'),('TWD','New Taiwan dollar','{\"IDR\": \"499.6322122802\", \"JPY\": \"4.7562480716\", \"PHP\": \"1.7608762728\", \"TWD\": 1, \"USDT\": \"0.0308546745\"}','twd_','$',8,0,10000.00000000,1,1,NULL,NULL),('USDT','Tether','{\"IDR\": \"16,193.08\", \"JPY\": \"154.15\", \"PHP\": \"57.07\", \"TWD\": \"32.41\", \"USDT\": 1}','usdt_','₮',8,1,1000.00000000,0,0,NULL,NULL),('VND','Vietnamese Dong','{\"ETH\": 0.00000007, \"EUR\": 0.000039, \"IDR\": 0.64, \"JPY\": 0.005, \"PHP\": 0.0022, \"USD\": 0.000043}','vnd_','₫',8,0,5000000.00000000,0,0,NULL,'[\"ACB\", \"AB\", \"AGRIBANK\", \"BIDV\", \"BVB\", \"BACABANK\", \"CB\", \"CIMB\", \"DBS\", \"DONGA\", \"EXIMBANK\", \"GPB\", \"HDB\", \"IBK\", \"IVB\", \"KIENLONGBANK\", \"LPB\", \"MBBANK\", \"MHB\", \"MSB\", \"NAMA\", \"NCB\", \"NHB\", \"OCB\", \"OCEAN\", \"PBVN\", \"PG\", \"PVCOM\", \"SACOMBANK\", \"SCB\", \"SCB_VN\", \"SEA\", \"SHB\", \"SHINHANBANK\", \"TECHCOM\", \"TPB\", \"UOB\", \"VAB\", \"VIETABANK\", \"VIB\", \"VIETCAPITAL\", \"VIETCOMBANK\", \"VIETINBANK\", \"VPBANK\", \"VRB\"]');

--
-- Table structure for table `data_land`
--

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;

--
-- Dumping data for table `data_land`
--


--
-- Table structure for table `data_land_half_of_day`
--

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',
  `sum_donate` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '打賞總額',
  `ipage` tinyint NOT NULL DEFAULT '0',
  `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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `data_land_half_of_day`
--

INSERT INTO `data_land_half_of_day` VALUES (1,'test-0126-17-1','2026-01-26','PM','RSG','TWD',17,'ouPlayer1',0,18000.00,18000.00,900.00,0.00,0.00,24,0.00,0.00,0.00,0.00,0,1),(2,'test-0126-18-1','2026-01-26','PM','RSG','TWD',18,'ouPlayer2',0,18000.00,18000.00,900.00,0.00,0.00,25,0.00,0.00,0.00,0.00,0,1),(3,'d5c0cb66617d22ee0419c6b3606c80767ad71082248dd73f999dd8614f904edc','2026-01-21','PM','ATG','TWD',3,'testwinwin03',0,10.00,10.00,22.30,0.00,0.00,2,0.00,0.00,0.00,0.00,0,10);

--
-- Table structure for table `donate_log`
--

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;

--
-- Dumping data for table `donate_log`
--


--
-- Table structure for table `engineer_action_logs`
--

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='工程操作紀錄';

--
-- Dumping data for table `engineer_action_logs`
--


--
-- Table structure for table `events_attributes`
--

CREATE TABLE `events_attributes` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `event_uid` bigint unsigned NOT NULL,
  `attribute_id` int unsigned NOT NULL COMMENT '一個活動下的各屬性編號',
  `rewards_uid` bigint unsigned DEFAULT NULL,
  `attribute_currency` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '屬性幣別，未設置則使用活動預設幣別，若都為空則自動設置為USD',
  `attribute_is_rebate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否歸類為返水',
  `attribute_value` double NOT NULL DEFAULT '0' COMMENT '屬性的條件基準值',
  `attribute_is_active` tinyint(1) NOT NULL DEFAULT '1' 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_value`),
  KEY `events_attributes_attribute_is_active_index` (`attribute_is_active`),
  KEY `events_attributes_rewards_uid_foreign` (`rewards_uid`),
  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,
  CONSTRAINT `events_attributes_rewards_uid_foreign` FOREIGN KEY (`rewards_uid`) REFERENCES `rewards` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `events_attributes`
--


--
-- Table structure for table `events_copywriting`
--

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;

--
-- Dumping data for table `events_copywriting`
--


--
-- Table structure for table `events_list`
--

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 '預先建立的幣別種類',
  `initial_is_rebate` tinyint(1) NOT NULL DEFAULT '0',
  `event_show_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活動的類型：儲值、達成洗碼、等等...',
  `enable_initial_condition` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否啟用初始化條件，啟用後子類別將會以初始幣別換匯成所有幣別。',
  `settlement_hour` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '結算的小時 00~23',
  `settlement_interval` enum('day','week','month') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'day',
  `settlement_interval_count` int unsigned NOT NULL DEFAULT '1',
  `last_settlement_date` datetime DEFAULT NULL COMMENT '上次結算日的時間',
  `next_settlement_date` datetime DEFAULT NULL COMMENT '下次結算日的時間',
  `auto_publish` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1=自動派發獎勵, 2=手動?',
  `event_period` int NOT NULL DEFAULT '0' COMMENT '已完成結算次數',
  `initial_currency` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幣別',
  `type` enum('deposit','withdraw','wager','win','lose','others') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '種類',
  `subtype` enum('>','>=','=','<=','<') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '判斷符號',
  `initial_value` double DEFAULT NULL COMMENT '條件基準值',
  `value_basis` enum('single','cumulative') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cumulative' COMMENT '獎勵基於單次或累積金額',
  `single_amount_target` enum('max','min','latest','earliest') COLLATE utf8mb4_unicode_ci 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`),
  KEY `events_list_last_settlement_date_index` (`last_settlement_date`),
  KEY `events_list_next_settlement_date_index` (`next_settlement_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `events_list`
--


--
-- Table structure for table `failed_jobs`
--

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;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `game_bet_limit`
--

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;

--
-- Dumping data for table `game_bet_limit`
--


--
-- Table structure for table `game_clicks_land`
--

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='遊戲點擊次數(每日)';

--
-- Dumping data for table `game_clicks_land`
--


--
-- Table structure for table `game_clicks_statistics`
--

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;

--
-- Dumping data for table `game_clicks_statistics`
--


--
-- Table structure for table `game_list_new`
--

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 '遊戲下注是否為無效',
  `support_horizontal` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否支援橫式',
  `support_vertical` tinyint(1) 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_new_is_invalid_bet_index` (`is_invalid_bet`),
  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`),
  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;

--
-- Dumping data for table `game_list_new`
--


--
-- Table structure for table `game_play_disable`
--

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='代理遊戲關閉清單';

--
-- Dumping data for table `game_play_disable`
--


--
-- Table structure for table `game_subtype`
--

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;

--
-- Dumping data for table `game_subtype`
--


--
-- Table structure for table `game_type`
--

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;

--
-- Dumping data for table `game_type`
--


--
-- Table structure for table `game_wallet`
--

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',
  `transfer_point` double(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '轉帳錢包裡的錢',
  `version` bigint NOT NULL DEFAULT '0' 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 AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `game_wallet`
--

INSERT INTO `game_wallet` VALUES (1,'TWD-1',1,'TWD',8960.93000000,0.00000000,18,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(2,'VND-1',1,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(3,'TWD-2',2,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(4,'VND-2',2,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(5,'TWD-3',3,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(6,'VND-3',3,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(7,'TWD-4',4,'TWD',0.00000000,10.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(8,'VND-4',4,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(9,'TWD-5',5,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(10,'VND-5',5,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(11,'TWD-6',6,'TWD',665.34000000,0.00000000,7,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(12,'VND-6',6,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(13,'TWD-7',7,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(14,'VND-7',7,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(15,'TWD-8',8,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(16,'VND-8',8,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(17,'TWD-9',9,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(18,'VND-9',9,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(19,'TWD-10',10,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(20,'IDR-11',11,'IDR',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(21,'JPY-11',11,'JPY',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(22,'PHP-11',11,'PHP',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(23,'TWD-11',11,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(24,'USDT-11',11,'USDT',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(25,'VND-11',11,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(26,'TWD-12',12,'TWD',4288.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(27,'IDR-13',13,'IDR',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(28,'JPY-13',13,'JPY',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(29,'PHP-13',13,'PHP',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(30,'TWD-13',13,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(31,'USDT-13',13,'USDT',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(32,'VND-13',13,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(33,'IDR-14',14,'IDR',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(34,'JPY-14',14,'JPY',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(35,'PHP-14',14,'PHP',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(36,'TWD-14',14,'TWD',997.75000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(37,'USDT-14',14,'USDT',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(38,'VND-14',14,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(39,'TWD-15',15,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(40,'IDR-16',16,'IDR',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(41,'JPY-16',16,'JPY',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(42,'PHP-16',16,'PHP',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(43,'TWD-16',16,'TWD',1010.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(44,'USDT-16',16,'USDT',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(45,'VND-16',16,'VND',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(46,'TWD-17',17,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000),(47,'TWD-18',18,'TWD',0.00000000,0.00000000,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000);

--
-- Table structure for table `game_wallet_log`
--

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 'c46c75a2-c8d7-4ca4-a717-5ea0c07b8f91' 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;

--
-- Dumping data for table `game_wallet_log`
--


--
-- Table structure for table `internal_notifications`
--

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;

--
-- Dumping data for table `internal_notifications`
--


--
-- Table structure for table `internal_notifications_language`
--

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;

--
-- Dumping data for table `internal_notifications_language`
--


--
-- Table structure for table `jackpot`
--

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;

--
-- Dumping data for table `jackpot`
--


--
-- Table structure for table `live_chat`
--

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;

--
-- Dumping data for table `live_chat`
--


--
-- Table structure for table `machine_info`
--

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 NOT NULL COMMENT '場域',
  `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正常連線)',
  `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版本',
  `memo` json DEFAULT NULL,
  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='機台清單';

--
-- Dumping data for table `machine_info`
--


--
-- Table structure for table `machine_login_code`
--

CREATE TABLE `machine_login_code` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `mac` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'mac地址',
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '驗證碼',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '使用狀態：0(未登入),1(已登入)',
  `login_ip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '登入的IP',
  `login_at` datetime DEFAULT NULL COMMENT '登入的時間',
  `created_at` datetime NOT NULL COMMENT '創建的時間戳',
  `expired_at` datetime NOT NULL COMMENT '過期的時間戳(預設5分鐘內)',
  PRIMARY KEY (`uid`),
  KEY `machine_login_code_mac_index` (`mac`),
  KEY `machine_login_code_status_index` (`status`),
  KEY `machine_login_code_login_ip_index` (`login_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `machine_login_code`
--


--
-- Table structure for table `marketing_credits`
--

CREATE TABLE `marketing_credits` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cagent_uid` bigint unsigned NOT NULL COMMENT '代理 UID',
  `point` decimal(30,8) NOT NULL COMMENT '目前可用行銷額度',
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否啟用',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `cagent_uid_unique_idx` (`cagent_uid`),
  KEY `marketing_credits_cagent_uid_index` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `marketing_credits`
--


--
-- Table structure for table `marketing_credits_log`
--

CREATE TABLE `marketing_credits_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `marketing_credits_uid` bigint unsigned NOT NULL COMMENT '對應 marketing_credits.uid',
  `cagent_uid` bigint unsigned NOT NULL,
  `action` enum('grant','consume','rollback','adjust','expire') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '異動類型',
  `before_point` decimal(30,8) NOT NULL COMMENT '異動前額度',
  `point` decimal(30,8) NOT NULL COMMENT '異動金額 (+/-)',
  `after_point` decimal(30,8) NOT NULL COMMENT '異動後額度',
  `source_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '來源類型 e.g. treasure, event',
  `memo` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `marketing_credits_log_marketing_credits_uid_index` (`marketing_credits_uid`),
  KEY `marketing_credits_log_cagent_uid_index` (`cagent_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `marketing_credits_log`
--


--
-- Table structure for table `marquee_announcements`
--

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;

--
-- Dumping data for table `marquee_announcements`
--


--
-- Table structure for table `marquee_announcements_language`
--

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;

--
-- Dumping data for table `marquee_announcements_language`
--


--
-- Table structure for table `member_action_log`
--

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;

--
-- Dumping data for table `member_action_log`
--


--
-- Table structure for table `member_bet_limit`
--

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;

--
-- Dumping data for table `member_bet_limit`
--


--
-- Table structure for table `member_commission`
--

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='會員自己的返佣申請表';

--
-- Dumping data for table `member_commission`
--


--
-- Table structure for table `member_continuous_events_rewards`
--

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;

--
-- Dumping data for table `member_continuous_events_rewards`
--


--
-- Table structure for table `member_crypto_info`
--

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;

--
-- Dumping data for table `member_crypto_info`
--


--
-- Table structure for table `member_deposits`
--

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`),
  KEY `idx_member_info_uid_completion_date` (`member_info_uid`,`completion_date`),
  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;

--
-- Dumping data for table `member_deposits`
--


--
-- Table structure for table `member_event_rewards_stats`
--

CREATE TABLE `member_event_rewards_stats` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `rewards_uid` int unsigned NOT NULL,
  `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_member_info_uid_index` (`member_info_uid`),
  KEY `member_event_rewards_rewards_uid_index` (`rewards_uid`),
  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:金額}';

--
-- Dumping data for table `member_event_rewards_stats`
--


--
-- Table structure for table `member_event_status`
--

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;

--
-- Dumping data for table `member_event_status`
--


--
-- Table structure for table `member_game_rebate`
--

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='玩家遊戲反水設定';

--
-- Dumping data for table `member_game_rebate`
--


--
-- Table structure for table `member_game_table_limit`
--

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='玩家個別遊戲限紅設定';

--
-- Dumping data for table `member_game_table_limit`
--


--
-- Table structure for table `member_info`
--

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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手機號碼(用於註冊)',
  `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關',
  `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 '註冊來源',
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `passwderrtimes` int DEFAULT '0',
  `is_verify` int DEFAULT '0' COMMENT '是否驗證email',
  `test` tinyint(1) NOT NULL DEFAULT '0' 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`),
  UNIQUE KEY `member_info_mobile_unique` (`mobile`),
  KEY `mobile_idx` (`mobile`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  KEY `memid_mobile_idx` (`memId`,`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_info`
--

INSERT INTO `member_info` VALUES (1,2,2,2,14,'testwinwin01','zxc123','Name1','User1','0000',0,'NDu2kuXWHaz2UYee9IQpE6YznmFHsGrD','2025-12-19 16:07:22',1766131642,'0958517308',NULL,1,NULL,'user1@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(2,0,2,2,15,'testwinwin02','zxc123','Name2','User2','0000',0,'TRgaYBDf37pnDzljaiFy7mjnQmvhAnW9','2025-12-19 16:07:22',1766131642,'0916009235',NULL,1,NULL,'user2@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(3,0,2,2,16,'testwinwin03','zxc123','Name3','User3','0000',0,'gfHNvROrjVQ5xyGmZO3lTRZL8JZ0PzpT','2025-12-19 16:07:22',1766131642,'0968731007',NULL,1,NULL,'user3@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(4,0,2,2,17,'testwinwin04','zxc123','Name4','User4','123456',1,'HVSrpc88Ik6QqG6oSUWPir08H7Ps3XfV','2025-12-19 16:07:22',1766131642,'0964607611',NULL,1,NULL,'user4@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(5,0,2,2,18,'testwinwin05','zxc123','Name5','User5','0000',0,'w2aLTmL80JKeM4cy6MeD8zWRdclKuXGf','2025-12-19 16:07:22',1766131642,'0962439214',NULL,1,NULL,'user5@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(6,1,2,2,19,'testwinwin06','zxc123','Name6','User6','0000',0,'OjouuP5prwj4hRb59YNFY7FBdwJ7Zmk2','2025-12-19 16:07:22',1766131642,'0975363936',NULL,1,NULL,'user6@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(7,0,2,2,20,'testwinwin07','zxc123','Name7','User7','0000',0,'YNtDKT7GTsNSKmWDvDwMzGIFM5pBLrEK','2025-12-19 16:07:22',1766131642,'0942686335',NULL,1,NULL,'user7@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(8,0,2,2,21,'testwinwin08','zxc123','Name8','User8','0000',0,'P9zFCN7qi3sP3LspaxVuc5cCasgIpdOY','2025-12-19 16:07:22',1766131642,'0966349255',NULL,1,NULL,'user8@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(9,0,2,2,22,'testwinwin09','zxc123','Name9','User9','0000',0,'87RMKD90MZ3sfDoOriJEA0eXPUgChkOW','2025-12-19 16:07:22',1766131642,'0921070773',NULL,1,NULL,'user9@example.com',1,1,NULL,0,NULL,NULL,0,1,1,NULL,0,0,'credit'),(10,0,6,6,23,'testwinwin10','123',NULL,'測試機','secret',0,'ad5c63f62bdf54a41f3c8ea81ef1fbea','2025-12-22 17:41:41',1766396501,NULL,NULL,1,NULL,NULL,1,1,'null',1,NULL,NULL,0,1,0,NULL,0,0,'credit'),(11,0,12,12,0,'LU63de02025122310195645','0600752d','Ou.冠輝','Ou.冠輝',NULL,0,'6949fc4c94bbb','2025-12-23 10:19:56',1766456396,NULL,NULL,1,NULL,NULL,1,1,NULL,1,'Line',NULL,0,1,1,NULL,0,0,'credit'),(12,0,5,5,24,'test1234','123',NULL,'1234','111111',1,'6d14aa64e63717ae8de7bf775c9647e9','2025-12-30 13:59:44',1767074384,'12342134',NULL,1,NULL,'1232@gamsd.com',1,1,'null',1,NULL,NULL,0,1,0,NULL,0,0,'credit'),(13,0,2,2,0,'LUcfc3a2025123016082713','4e1a9196','郭尚霖','郭尚霖',NULL,0,'6953887b52392','2025-12-30 16:08:27',1767082107,NULL,NULL,1,NULL,NULL,1,1,NULL,1,'Line',NULL,0,1,0,NULL,0,0,'credit'),(14,0,2,2,0,'LUd7bac2025123114011978','33fd7270','J','J',NULL,0,'6954bc2f7b094','2025-12-31 14:01:19',1767160879,NULL,NULL,1,NULL,NULL,1,1,NULL,1,'Line',NULL,0,1,0,NULL,0,0,'credit'),(15,0,2,2,25,'123','123',NULL,'123','secret',0,'9e8cdd24752b5417c998cde285e41ee5','2026-01-12 21:01:48',1768222908,NULL,NULL,1,NULL,NULL,1,1,'null',1,NULL,NULL,0,1,0,NULL,0,0,'credit'),(16,0,21,19,33,'0988065453','fea5d000',NULL,NULL,NULL,0,'69731ae5b726b','2026-01-23 14:53:25',1769151205,'0988065453',NULL,1,NULL,NULL,1,1,NULL,1,'register',NULL,0,1,0,NULL,0,0,'credit'),(17,0,24,2,274,'ouPlayer1','123',NULL,'ouPlayer1','secret',0,'b9d3e8b171ccda69106296932821f729','2026-01-26 13:19:39',1769404779,NULL,NULL,1,NULL,NULL,1,1,'null',1,NULL,NULL,0,1,0,NULL,0,0,'credit'),(18,0,25,2,275,'ouPlayer2','123',NULL,'ouPlayer2','secret',0,'b2985b762017c4c3fa705a2eb74e36b0','2026-01-26 13:19:58',1769404798,NULL,NULL,1,NULL,NULL,1,1,'null',1,NULL,NULL,0,1,0,NULL,0,0,'credit');

--
-- Table structure for table `member_info_bank`
--

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;

--
-- Dumping data for table `member_info_bank`
--


--
-- Table structure for table `member_info_bindings`
--

CREATE TABLE `member_info_bindings` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT '玩家uid',
  `bind_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '綁定來源',
  `bind_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '綁定id',
  `bind_data` json DEFAULT NULL COMMENT '綁定來源的資料',
  `status` int unsigned NOT NULL COMMENT '狀態(1:有效 0:無效)',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '記錄創建的時間戳',
  PRIMARY KEY (`uid`),
  KEY `member_info_bindings_member_info_uid_index` (`member_info_uid`),
  KEY `member_info_bindings_bind_type_index` (`bind_type`),
  KEY `member_info_bindings_bind_id_index` (`bind_id`),
  KEY `member_info_bindings_status_index` (`status`),
  CONSTRAINT `member_info_bindings_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='玩家綁定第三方登入表';

--
-- Dumping data for table `member_info_bindings`
--


--
-- Table structure for table `member_invoice`
--

CREATE TABLE `member_invoice` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL,
  `type` enum('personal','mobile','donation','natural') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'personal' COMMENT '發票類型',
  `code` text COLLATE utf8mb4_unicode_ci COMMENT '載具 / 統編 / 捐贈碼',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '狀態',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_invoice_member_info_uid_index` (`member_info_uid`),
  KEY `member_invoice_status_index` (`status`),
  KEY `member_invoice_type_index` (`type`),
  KEY `member_invoice_member_info_uid_status_index` (`member_info_uid`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_invoice`
--


--
-- Table structure for table `member_login_log`
--

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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_login_log`
--

INSERT INTO `member_login_log` VALUES (1,1,'118.163.164.139','desktop',NULL,'snd.5285.com.tw','2026-01-26 12:32:51',1769401971);

--
-- Table structure for table `member_lose_limit`
--

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',
  `initial_lose_limit` double(15,8) NOT NULL DEFAULT '0.00000000' COMMENT '初始輸分限制值',
  `lock` int NOT NULL DEFAULT '0',
  `status` int NOT NULL DEFAULT '1',
  `unlock_time` datetime DEFAULT NULL,
  `set_time` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_lose_limit`
--


--
-- Table structure for table `member_lose_log`
--

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;

--
-- Dumping data for table `member_lose_log`
--


--
-- Table structure for table `member_point_transfer_temp`
--

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;

--
-- Dumping data for table `member_point_transfer_temp`
--


--
-- Table structure for table `member_product_order`
--

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='會員兌換商品訂單';

--
-- Dumping data for table `member_product_order`
--


--
-- Table structure for table `member_profit_limit`
--

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) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  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;

--
-- Dumping data for table `member_profit_limit`
--


--
-- Table structure for table `member_rebate`
--

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`),
  KEY `cagent_uid_idx` (`cagent_uid`),
  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='會員自己的返水申請表';

--
-- Dumping data for table `member_rebate`
--


--
-- Table structure for table `member_rewards`
--

CREATE TABLE `member_rewards` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT 'memberInfo玩家編號',
  `rewards_uid` bigint unsigned NOT NULL,
  `cagent_uid` int unsigned DEFAULT NULL,
  `events_attributes_uid` bigint unsigned DEFAULT NULL COMMENT '如果是透過活動派發，則需填入活動屬性編號',
  `event_period` int NOT NULL DEFAULT '0' COMMENT '活動結算周期',
  `claimed_amount` decimal(30,8) NOT NULL DEFAULT '0.00000000' COMMENT '實領金額',
  `wagering_restricted_amount` decimal(30,8) DEFAULT NULL COMMENT '洗碼限制金額，選填',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '狀態：0(未領取),1(已領取/未兌換),2(已兌換),3(已過期)',
  `currency` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幣別，必填',
  `expired_time` datetime NOT NULL COMMENT '過期日期',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_event_rewards_member_info_uid_index` (`member_info_uid`),
  KEY `member_rewards_reward_uid_foreign` (`rewards_uid`),
  KEY `member_rewards_events_attributes_uid_foreign` (`events_attributes_uid`),
  KEY `currency_code` (`currency`),
  KEY `member_rewards_cagent_uid_foreign` (`cagent_uid`),
  CONSTRAINT `currency_code` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currency_code`) ON DELETE CASCADE,
  CONSTRAINT `member_event_rewards_member_uid_foreign` FOREIGN KEY (`member_info_uid`) REFERENCES `member_info` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `member_rewards_cagent_uid_foreign` FOREIGN KEY (`cagent_uid`) REFERENCES `cagent` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `member_rewards_events_attributes_uid_foreign` FOREIGN KEY (`events_attributes_uid`) REFERENCES `events_attributes` (`uid`),
  CONSTRAINT `member_rewards_reward_uid_foreign` FOREIGN KEY (`rewards_uid`) REFERENCES `rewards` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_rewards`
--


--
-- Table structure for table `member_risk_watchlist`
--

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='風險控管名單';

--
-- Dumping data for table `member_risk_watchlist`
--


--
-- Table structure for table `member_roulettes`
--

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;

--
-- Dumping data for table `member_roulettes`
--


--
-- Table structure for table `member_setting_history`
--

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`),
  KEY `member_setting_history_member_info_uid_index` (`member_info_uid`),
  KEY `member_setting_history_cagent_uid_index` (`cagent_uid`),
  KEY `member_setting_history_main_cagent_uid_index` (`main_cagent_uid`),
  KEY `member_setting_history_history_date_index` (`history_date`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_setting_history`
--

INSERT INTO `member_setting_history` VALUES (1,'ouPlayer1',17,24,2,'{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}','2026-01-26','2026-01-26 13:19:39'),(2,'ouPlayer2',18,25,2,'{\"1\": 0.01, \"6\": 0.01, \"11\": 0.01, \"13\": 0.01, \"18\": 0.01, \"43\": 0.01, \"49\": 0.01, \"50\": 0.01, \"51\": 0.01, \"55\": 0.01, \"56\": 0.01, \"57\": 0.01, \"58\": 0.01, \"62\": 0.01, \"63\": 0.01, \"68\": 0.01}','2026-01-26','2026-01-26 13:19:58');

--
-- Table structure for table `member_settlement_report`
--

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='會員結算報表';

--
-- Dumping data for table `member_settlement_report`
--


--
-- Table structure for table `member_treasure_rewards_log`
--

CREATE TABLE `member_treasure_rewards_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned NOT NULL COMMENT '會員 UID',
  `treasure_uid` bigint unsigned NOT NULL COMMENT '寶藏 UID',
  `treasure_rewards_uid` bigint unsigned NOT NULL COMMENT '獎勵設定 UID',
  `reward_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '獎勵類型',
  `reward_amount` int DEFAULT NULL COMMENT '實際獲得金額',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `member_treasure_rewards_log_member_info_uid_index` (`member_info_uid`),
  KEY `member_treasure_rewards_log_treasure_uid_index` (`treasure_uid`),
  KEY `member_treasure_rewards_log_member_info_uid_treasure_uid_index` (`member_info_uid`,`treasure_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_treasure_rewards_log`
--


--
-- Table structure for table `member_treasure_statistics`
--

CREATE TABLE `member_treasure_statistics` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主鍵',
  `member_info_uid` int NOT NULL COMMENT '會員 UID',
  `treasure_uid` bigint unsigned NOT NULL COMMENT '對應寶藏 UID',
  `count` int NOT NULL DEFAULT '0' COMMENT '剩餘可遊玩次數',
  `complete_times` int NOT NULL DEFAULT '0' COMMENT '紀錄:已遊玩次數',
  `complete_bonus` double NOT NULL DEFAULT '0' COMMENT '紀錄:總獲得獎勵',
  `is_active` tinyint NOT NULL DEFAULT '1' COMMENT '是否啟用',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `uniq_member_treasure` (`member_info_uid`,`treasure_uid`),
  KEY `member_treasure_statistics_member_info_uid_index` (`member_info_uid`),
  KEY `member_treasure_statistics_treasure_uid_index` (`treasure_uid`),
  KEY `member_treasure_statistics_member_info_uid_treasure_uid_index` (`member_info_uid`,`treasure_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_treasure_statistics`
--


--
-- Table structure for table `member_vip_info`
--

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 '是否抵達晉升條件',
  `promotion_overflow` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'vip check後溢出的量',
  `promotion_level` int NOT NULL DEFAULT '0' COMMENT 'vip check 晉升等級',
  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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家vip資訊';

--
-- Dumping data for table `member_vip_info`
--

INSERT INTO `member_vip_info` VALUES (1,1,0,'2026-01-26 04:32:52',NULL,'[]',0,0.00,0),(2,17,NULL,'2026-01-26 05:19:39',NULL,'[]',0,0.00,0),(3,18,NULL,'2026-01-26 05:19:58',NULL,'[]',0,0.00,0);

--
-- Table structure for table `member_wallet_transfers`
--

CREATE TABLE `member_wallet_transfers` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `member_info_uid` int unsigned DEFAULT NULL,
  `status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `platform` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(20,6) DEFAULT NULL,
  `request_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_404_count` int unsigned NOT NULL DEFAULT '0',
  `status_999_count` int unsigned NOT NULL DEFAULT '0',
  `create_date` datetime DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `member_wallet_transfers_request_id_unique` (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `member_wallet_transfers`
--


--
-- Table structure for table `member_withdrawals`
--

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',
  `point_transfer` int unsigned NOT NULL DEFAULT '0' COMMENT '是否已撥款(0未撥款1已撥款)',
  `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;

--
-- Dumping data for table `member_withdrawals`
--


--
-- Table structure for table `member_withdrawals_test`
--

CREATE TABLE `member_withdrawals_test` (
  `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',
  `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 '取消備註說明',
  `point_transfer` int unsigned NOT NULL DEFAULT '0' COMMENT '是否已撥款(0未撥款1已撥款)',
  PRIMARY KEY (`withdrawal_id`),
  UNIQUE KEY `member_withdrawals_test_withdrawal_number_unique` (`withdrawal_number`),
  KEY `creation_date_idx` (`creation_date`),
  KEY `completion_date_idx` (`completion_date`),
  KEY `payment_type_idx` (`payment_type`),
  KEY `status_idx` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='會員提款紀錄_測試用';

--
-- Dumping data for table `member_withdrawals_test`
--


--
-- Table structure for table `migrations`
--

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 AUTO_INCREMENT=180 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_reset_tokens_table',1),(3,'2019_08_19_000000_create_failed_jobs_table',1),(4,'2019_12_14_000001_create_personal_access_tokens_table',1),(5,'2023_11_28_022522_create_all_platform_table',1),(6,'2023_11_28_110000_create_currencies_table',1),(7,'2023_11_29_071123_create_platform_maintenance_table',1),(8,'2023_11_29_172301_create_page_table',1),(9,'2023_11_29_172639_create_cagent_page_permission_table',1),(10,'2023_11_29_173926_create_cagent_table',1),(11,'2023_11_29_173927_create_cagent_game_profit_table',1),(12,'2023_11_29_173928_create_cagent_game_permission_table',1),(13,'2023_11_29_173929_create_vip_table',1),(14,'2023_11_29_174352_create_api_key_table',1),(15,'2023_11_29_174352_create_member_info_table',2),(16,'2023_11_29_182032_create_member_game_table_limit_table',2),(17,'2023_11_29_182032_create_vip_game_table_limit_table',2),(18,'2023_11_29_182614_create_vip_game_rebate_table',2),(19,'2023_11_29_184349_create_vip_payment_tags_table',2),(20,'2023_11_29_184350_create_tags_table',2),(21,'2023_11_29_190222_create_member_login_log_table',2),(22,'2023_11_30_102841_create_game_wallet_table',2),(23,'2023_11_30_104053_create_blacklist_table',2),(24,'2023_11_30_104517_create_base_configs_table',2),(25,'2023_11_30_110524_create_internal_notifications_table',2),(26,'2023_11_30_111119_create_notification_read_status_table',2),(27,'2023_11_30_111320_create_site_announcements_table',2),(28,'2023_11_30_111501_create_marquee_announcements_table',2),(29,'2023_11_30_113102_create_company_bank_accounts_table',2),(30,'2023_11_30_113454_create_third_party_providers_table',2),(31,'2023_11_30_113857_create_member_deposits_table',2),(32,'2023_11_30_113860_create_company_receipts_table',2),(33,'2023_11_30_114702_create_member_withdrawals_table',2),(34,'2023_12_08_164244_create_backend_action_logs_table',2),(35,'2023_12_12_113121_create_game_type_table',2),(36,'2023_12_12_113655_create_game_subtype_table',2),(37,'2023_12_12_113944_create_game_list_new_table',2),(38,'2023_12_13_153904_create_member_rebate_table',2),(39,'2023_12_14_131655_create_payment_methods',2),(40,'2023_12_14_131703_create_provider_payment_methods',2),(41,'2023_12_14_164334_create_events_list',2),(42,'2023_12_14_180036_create_events_attributes',2),(43,'2023_12_15_140906_create_internal_notification_language_table',2),(44,'2023_12_18_173851_create_events_copywriting',2),(45,'2023_12_20_175508_create_unlimit_tree_table',2),(46,'2024_01_03_175508_create_user_favorite_games',2),(47,'2024_01_03_175509_create_user_game_clicks',2),(48,'2024_01_03_175510_create_game_clicks_statistics',2),(49,'2024_01_03_175510_create_member_info_bank',2),(50,'2024_01_08_142912_create_wagering_restricted_list_table',2),(51,'2024_01_08_143403_create_member_event_status_table',2),(52,'2024_01_08_165839_create_member_event_rewards_table',2),(53,'2024_01_09_193835_create_game_wallet_log_table',2),(54,'2024_01_10_121101_create_wallet_log_table',2),(55,'2024_01_11_150912_create_marquee_announcements_language',2),(56,'2024_01_15_171832_create_action_type_list_table',2),(57,'2024_01_16_193835_create_member_info_action_log',2),(58,'2024_01_17_093721_create_cagent_wallet',2),(59,'2024_01_17_093725_create_cagent_wallet_log',2),(60,'2024_01_26_171956_create_vip_withdrawal_rate',2),(61,'2024_02_02_090514_create_member_crypto_info',2),(62,'2024_02_02_133555_cteate_data_land',2),(63,'2024_02_06_174713_cteate_cagent_profit',2),(64,'2024_02_15_153446_create_buffer_wallet_table',2),(65,'2024_02_16_153446_create_crypto_wallet_log_table',2),(66,'2024_02_16_153446_create_queue_error_table',2),(67,'2024_02_21_103832_create_member_commission',2),(68,'2024_02_21_103832_create_verify_code',2),(69,'2024_02_22_144025_create_vip_criteria',2),(70,'2024_02_23_104099_create_news_table',2),(71,'2024_02_23_144812_create_member_vip_info',2),(72,'2024_02_26_104100_create_news_language_table',2),(73,'2024_02_26_104100_create_unlimit_settings_table',2),(74,'2024_03_21_155329_create_carousels_table',2),(75,'2024_03_22_091341_create_carousels_language_table',2),(76,'2024_03_28_152011_create_base_language_table',2),(77,'2024_04_08_155950_create_roulettes_attribute',2),(78,'2024_04_08_155951_create_roulettes',2),(79,'2024_04_08_155951_create_roulettes_copywriting',2),(80,'2024_04_08_161124_create_live_chat_table',2),(81,'2024_04_09_105245_create_member_roulettes_table',2),(82,'2024_04_25_102254_create_member_settlement_report',2),(83,'2024_05_08_115701_create_transfer_api_log_table',2),(84,'2024_05_08_115836_create_transfer_log_table',2),(85,'2024_05_08_120003_create_transfer_wallet_log_table',2),(86,'2024_05_24_164127_create_member_bet_limit',2),(87,'2024_05_31_163312_cagent_promo_code',2),(88,'2024_06_05_114715_create_game_bet_limit',2),(89,'2024_07_08_114821_create_sql_event_log',2),(90,'2024_07_09_112113_create_member_profit_limit',2),(91,'2024_07_09_112331_create_jackpot',2),(92,'2024_07_29_153243_create_continuous_events',2),(93,'2024_07_29_153303_create_continuous_events_attribute',2),(94,'2024_07_29_153315_create_continuous_events_copywriting',2),(95,'2024_07_29_153401_create_member_continuous_events_rewards',2),(96,'2024_07_31_185014_create_roulettes_rewards_statistics',2),(97,'2024_09_09_114702_create_cagent_withdrawals_table',2),(98,'2024_09_09_119372_create_cagent_commission_log',2),(99,'2024_10_17_09212_create_product_type_table',2),(100,'2024_10_17_092648_create_product_table',2),(101,'2024_10_17_092755_create_product_image_table',2),(102,'2024_10_17_093019_create_product_language_table',2),(103,'2024_10_17_093414_create_member_product_order_table',2),(104,'2024_11_15_165016_create_machine_info',2),(105,'2024_11_15_165459_create_password_recovery_token',2),(106,'2024_11_22_132656_create_cagent_telegram_info_table',2),(107,'2024_12_03_104813_create_cagent_game_rebate',2),(108,'2024_12_03_105917_create_cagent_info_history',2),(109,'2024_12_06_000001_create_member_lose_log_table',2),(110,'2024_12_06_00000_create_member_lose_limit_table',2),(111,'2024_12_10_093803_create_cagent_bet_limit_table',2),(112,'2024_12_18_101830_create_push_notifications_table',2),(113,'2024_12_23_101633_create_push_notifications_history',2),(114,'2024_12_25_134521_create_data_land_half_of_day_table',2),(115,'2024_12_25_155732_create_member_setting_history_table',2),(116,'2024_12_31_101546_create_winlose_dataland_cagent',2),(117,'2024_12_31_101547_create_winlose_dataland_member',2),(118,'2024_12_31_102905_create_cash_register_log',2),(119,'2025_01_03_203977_create_member_game_rebate_table',2),(120,'2025_01_09_164099_create_backend_news_table',2),(121,'2025_01_09_164100_create_backend_news_language_table',2),(122,'2025_01_16_168304_create_member_point_transfer_temp_table',2),(123,'2025_01_20_178303_create_member_info_bindings_table',2),(124,'2025_02_03_179403_create_cagent_line_group_table',2),(125,'2025_02_03_179507_create_cagent_info_bindings_table',2),(126,'2025_02_26_184503_create_game_clicks_land_table',2),(127,'2025_03_03_186401_create_auth_token_temp_table',2),(128,'2025_04_16_191501_create_all_platform_config_table',2),(129,'2025_04_29_193507_create_member_risk_watchlist_table',2),(130,'2025_05_06_171613_create_whitelists_table',2),(131,'2025_05_06_197807_create_cagent_statistics_table',2),(132,'2025_06_17_199903_create_donate_log_table_',2),(133,'2025_06_30_199908_create_weekly_balance_fail_log_table',2),(134,'2025_07_04_190222_create_cagent_login_log_table',2),(135,'2025_07_25_191222_create_wallet_log_test_table',2),(136,'2025_07_25_191223_create_member_withdrawals_test_table',2),(137,'2025_08_05_194274_create_engineer_action_logs_table',2),(138,'2025_08_08_112130_member_transfer_wallet',2),(139,'2025_08_13_195271_create_game_play_disable_table',2),(140,'2025_11_03_199873_create_cash_register_limit_table',2),(141,'2025_11_27_197345_create_rewards_table',2),(142,'2025_11_27_197346_create_member_rewards_table',2),(143,'2025_11_27_197347_create_member_rewards_claimed_log_table',2),(144,'2025_11_28_144021_create_member_rewards_redeemed_log',2),(145,'2025_12_09_140146_event_list_add_columns',2),(146,'2025_12_09_141848_event_list_add_columns',2),(147,'2025_12_09_154211_event_attributes_add_columns',2),(148,'2025_12_10_101052_events_list_add_columns',2),(149,'2025_12_10_154923_events_attributes_remove_columns',2),(150,'2025_12_10_160450_events_remove_columns',2),(151,'2025_12_10_170732_events_attributes_remove_columns',2),(152,'2025_12_10_171520_events_list_rename_add_columns',2),(153,'2025_12_11_112609_member_event_rewards',2),(154,'2025_12_11_112908_events_list_add_index',2),(155,'2025_12_11_113547_member_event_rewards_rename',2),(156,'2025_12_12_103423_member_event_reward_stats_remove_columns',3),(157,'2025_12_16_145023_create_member_invoice',3),(158,'2025_12_22_175501_create_machine_login_code_table',3),(159,'2025_12_24_172712_create_table_treasure',3),(160,'2025_12_24_172815_create_table_treasure_rewards',3),(161,'2025_12_24_172957_create_table_treasure_copywriting',3),(162,'2025_12_24_173311_create_table_member_treasure_statistics',3),(163,'2025_12_26_095157_member_deposits_add_index',3),(164,'2025_12_29_133402_create_table_member_treasure_rewards_log',3),(165,'2025_12_31_171849_create_table_marketing_credits',3),(166,'2025_12_31_172332_create_table_marketing_credits_log',3),(167,'2026_01_06_101122_treasure_add_column',3),(168,'2026_01_08_090838_treasure_rewards_remove_column',3),(169,'2026_01_09_112746_member_rewards_add_columns',3),(170,'2026_01_09_131656_member_treasure_statistics_add_index',3),(171,'2026_01_09_131713_member_treasure_reward_log_add_index',3),(172,'2026_01_09_173243_drop_table_member_rewards_claimed_log',3),(173,'2026_01_09_173256_drop_table_member_rewards_redeemed_log',3),(174,'2026_01_09_173313_member_rewards_add_columns',3),(175,'2026_01_12_114849_events_list_add_columns',3),(176,'2026_01_12_115130_member_rewards_add_columns',3),(177,'2026_01_21_115174_cagent_add_columns',3),(178,'2026_01_26_090044_cagent_add_column',3),(179,'2026_01_26_101120_create_tabel_test_log',3);

--
-- Table structure for table `news`
--

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;

--
-- Dumping data for table `news`
--


--
-- Table structure for table `news_language`
--

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;

--
-- Dumping data for table `news_language`
--


--
-- Table structure for table `notification_read_status`
--

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;

--
-- Dumping data for table `notification_read_status`
--


--
-- Table structure for table `page`
--

CREATE TABLE `page` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `page_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '页面名称',
  `front_page_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '前端名稱,編輯前綴:edit_,檢視前綴:view_',
  `page_nested_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '前端嵌套路徑',
  `comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '解說',
  `is_main` tinyint NOT NULL DEFAULT '0' COMMENT '是否為群組main',
  `page_group` varchar(255) CHARACTER SET utf8mb4 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`) USING BTREE,
  UNIQUE KEY `idx_page_page_name_front_page_name` (`page_name`,`front_page_name`) USING BTREE,
  KEY `page_status_index` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `page`
--

INSERT INTO `page` VALUES (1,'VIEW_HOME','view_home','','主页',0,NULL,1,0),(2,'VIEW_MEMBER','view_player-search','admin','玩家查询',0,NULL,1,0),(3,'MEMBER_MANAGEMENT','edit_player-search','admin','編輯玩家查詢',0,NULL,1,0),(4,'CREATE_MEMBER_MANAGEMENT','view_create-player','admin','创建玩家',0,NULL,1,0),(5,'VIEW_CAGENT','view_agent-list','admin','代理查询',0,NULL,1,0),(6,'CAGENT_MANAGEMENT','edit_agent-list','admin','編輯代理查询',0,NULL,1,0),(7,'CREATE_CAGENT_MANAGEMENT','view_create-agent','admin','创建代理',1,'[7]',1,0),(8,'VIEW_DEPOSIT_RECORDS','view_deposit-list','cashflow-setting','存款记录',0,NULL,1,0),(9,'DEPOSIT_REVIEW_MANAGEMENT','edit_deposit-list','cashflow-setting','审核存款',0,NULL,1,0),(10,'VIEW_WITHDRAWAL_RECORDS','view_withdraw-list','log-management','棄分记录',0,NULL,1,0),(11,'WITHDRAWAL_REVIEW_MANAGEMENT','edit_withdraw-list','log-management','审核棄分',0,NULL,1,0),(12,'VIEW_COMMISSION_RECORDS','view_commission-list','cashflow-setting','返佣记录',0,NULL,1,0),(13,'COMMISSION_REVIEW_MANAGENT','edit_commission-list','cashflow-setting','审核返佣',0,NULL,1,0),(14,'VIEW_FINANCIAL_REPORTS','view_financial-reports-view','cashflow-setting','财务报告',0,NULL,1,0),(15,'VIEW_THIRD_PARTY_PAYMENT','view_cashflow-status','cashflow-setting','第三方支付查询',0,NULL,1,0),(16,'THIRD_PARTY_PAYMENT_MANAGEMENT','edit_cashflow-status','cashflow-setting','第三方支付配置',0,NULL,1,0),(17,'VIEW_CAGENT_REPORT','view_agent-report','reports','代理報表',0,NULL,1,0),(18,'VIEW_STATISTICS_WIN_LOSS_REPORTS','view_winloss-report','reports','輸贏统计报表',0,NULL,0,0),(19,'VIEW_GAME_HISTORY_RECORDS','view_game-history','reports','游戏记录',0,NULL,0,0),(20,'VIEW_GAME_HISTORY_SPLIT','view_game-history-split','reports','游戏分割记录',0,NULL,1,0),(21,'VIEW_CAGENT_ACT_LOG','view_agent-action-log','log-management','代理操作記錄',0,NULL,1,0),(22,'VIEW_MEMBER_HISTORY_RECORDS','view_player-action-log','log-management','玩家操作記錄',0,NULL,1,0),(23,'VIEW_WALLET_LOG','view_wallet-log','log-management','玩家錢包紀錄',0,NULL,1,0),(24,'VIEW_PLAYER_REWARD_LIST','view_player-reward-list','reports','查看玩家優惠活動清單',0,NULL,1,0),(25,'PLAYER_REWARD_MANAGEMENT','edit_player-reward-list','reports','編輯玩家優惠活動清單',0,NULL,1,0),(26,'VIEW_BLACK_LIST','view_black-list','market','黑名單設置',0,NULL,1,0),(27,'BLACK_LIST_MANAGEMENT','edit_black-list','market','編輯黑名單設置',0,NULL,1,0),(28,'VIEW_TAGS','view_member-tag','market','會員標籤設置',0,NULL,1,0),(29,'TAGS_MANAGEMENT','edit_member-tag','market','編輯會員標籤設置',0,NULL,1,0),(30,'VIEW_VIP','view_vip-level','system-setting','vip等級設置',0,NULL,1,0),(31,'VIP_MANAGEMENT','edit_vip-level','system-setting','編輯vip等級設置',0,NULL,1,0),(32,'VIEW_CHILD_MANAGEMENT','view_sub-agent-list','system-setting','檢視子帳號清單',0,NULL,1,0),(33,'CHILD_MANAGEMENT','edit_sub-agent-list','system-setting','編輯子帳號清單',0,NULL,1,0),(34,'ADD_CHILD','view_create-sub-agent','system-setting','新增子帳號',0,NULL,1,0),(35,'VIEW_PAGE','view_menu-permission','system-setting','菜單權限檢視',0,NULL,1,0),(36,'PAGE_MANAGEMENT','edit_menu-permission','system-setting','菜單權限編輯',0,NULL,1,0),(37,'VIEW_GAME_PROFIT','view_game-commission','system-setting','遊戲佔成檢視',0,'[7]',1,0),(38,'GAME_PROFIT_MANAGEMENT','edit_game-commission','system-setting','遊戲佔成編輯',0,'[7]',1,0),(39,'VIEW_PROFIT','view_profit','system-setting','一般佔成檢視',0,'[7]',0,0),(40,'PROFIT_MANAGEMENT','edit_profit','system-setting','一般佔成編輯',0,'[7]',0,0),(41,'VIEW_GAME_PERMISSION','view_game-permission','system-setting','遊戲權限檢視',0,'[7]',1,0),(42,'GAME_PERMISSION_MANAGEMENT','edit_game-permission','system-setting','遊戲權限編輯',0,'[7]',1,0),(43,'VIEW_MARQUEE','view_marquee','market','跑馬燈檢視',0,NULL,1,0),(44,'MARQUEE_MANAGEMENT','edit_marquee','market','跑馬燈編輯',0,NULL,1,0),(45,'VIEW_PROMOTIONS','view_promotions','market','優惠活動檢視',0,NULL,1,0),(46,'PROMOTIONS_MANAGEMENT','edit_promotions','market','優惠活動編輯',0,NULL,1,0),(47,'VIEW_ROULETTE','view_roulette','market','輪盤活動檢視',0,NULL,1,0),(48,'ROULETTE_MANAGEMENT','edit_roulette','market','輪盤活動編輯',0,NULL,1,0),(49,'VIEW_NEWS','view_news','system-setting','公告檢視',0,NULL,1,0),(50,'NEWS_MANAGEMENT','edit_news','system-setting','公告編輯',0,NULL,1,0),(51,'VIEW_INBOX','view_inbox','market','站內信檢視',0,NULL,1,0),(52,'INBOX_MANAGEMENT','edit_inbox','market','站內信編輯',0,NULL,1,0),(53,'VIEW_CURRENCY_CONFIG','view_currency-config','system-setting','支援货币查询',0,NULL,1,0),(54,'CURRENCY_CONFIG_MANAGEMENT','edit_currency-config','system-setting','支援貨幣配置设置',0,NULL,0,0),(55,'GAME_CONFIG_MANAGEMENT','edit_game-config','system-setting','游戏设置',0,NULL,1,1),(56,'VIEW_BANK_ACCOUNT','view_bank-account','system-setting','银行账号查询',0,NULL,1,0),(57,'COMPANY_BANK_ACCOUNT_MANAGEMENT','edit_bank-account','system-setting','公司银行账号管理',0,NULL,1,0),(58,'VIEW_CUSTOMER_SERVICE','view_customer-service','system-setting','客服中心',0,NULL,1,0),(59,'VIEW_SYSTEM_CONFIG','view_system-config','system-setting','系统配置查询',0,NULL,1,1),(60,'SYSTEM_CONFIG_MANAGEMENT','edit_system-config','system-setting','編輯系统配置',0,NULL,1,1),(61,'VIEW_PLATFORM_SETTING','view_platform-setting','system-setting','查看遊戲平台設置',0,NULL,1,1),(62,'PLATFORM_MANAGEMENT','edit_platform-setting','system-setting','編輯遊戲平台設置',0,NULL,1,1),(63,'MEMBER_BALANCE_ADJUSTMENT','func_member-balance-adjustment','func','是否可以針對玩家做存提款',0,NULL,1,0),(64,'VIEW_CAROUSEL_SETTING','view_carousel-setting','market','檢視輪播設定',0,NULL,1,0),(65,'CAROUSEL_SETTING','edit_carousel-setting','market','編輯輪播設定',0,NULL,1,0),(66,'VIEW_GAME_LIST','view_game-list-settings','system-setting','查看遊戲清單',0,NULL,1,0),(67,'VIEW_GAME_MANAGEMENT','edit_game-list-settings','system-setting','編輯遊戲清單',0,NULL,1,0),(68,'VIEW_MEMBER_DETAIL','func_member-detail','func','是否可以檢視詳細資料',0,NULL,1,0),(69,'VIEW_AGENT_WALLET_LOG','view_agent-wallet-log','log-management','查看代理錢包紀錄',0,NULL,1,0),(70,'RESET_CAGENT_PASSWORD','func_reset-cagent-password','func','重置下屬代理密碼',0,NULL,1,0),(71,'VIEW_PROMO_CODE','view_promo-code','market','推廣碼列表',0,NULL,1,0),(72,'PROMO_CODE_MANAGEMENT','edit_promo-code','market','編輯推廣碼',0,NULL,1,0),(73,'CREATE_SUBORDINATE_CAGENT','func_create-subordinate-cagent','func','是否能建立下屬的代理',0,NULL,1,0),(74,'CREATE_SUBORDINATE_MEMBER','func_create-subordinate-member','func','是否能建立下屬的會員',0,NULL,1,0),(75,'VIEW_CONTINUOUS_PROMOTIONS','view_continuous-promotions','market','連續性優惠活動檢視',0,NULL,1,0),(76,'CONTINUOUS_PROMOTIONS_MANAGEMENT','edit_continuous-promotions','market','連續性優惠活動編輯',0,NULL,1,0),(77,'VIEW_MEMBER_REBATE','view_member-rebate','reports','查看會員返水',0,NULL,1,0),(78,'EDIT_MEMBER_REBATE','edit_member-rebate','reports','編輯會員返水',0,NULL,1,0),(79,'VIEW_CAGENT_WITHDRAWALS','view_cagent-withdrawals','cashflow-setting','查看代理申請提款',0,NULL,1,0),(80,'EDIT_CAGENT_WITHDRAWALS','edit_cagent-withdrawals','cashflow-setting','編輯代理申請提款',0,NULL,1,0),(81,'VIEW_STORE_PRODUCT','view_store-product','product-market','查看市集商品',0,NULL,0,0),(82,'EDIT_STORE_PRODUCT','edit_store-product','product-market','編輯市集商品',0,NULL,0,0),(83,'VIEW_STORE_PRODUCT_TYPE','view_store-product-type','product-market','查看市集商品類型',0,NULL,0,0),(84,'EDIT_STORE_PRODUCT_TYPE','edit_store-product-type','product-market','編輯市集商品類型',0,NULL,0,0),(85,'VIEW_MEMBER_PRODUCT_ORDER','view_member-product-order','product-market','查看玩家訂單',0,NULL,0,0),(86,'EDIT_MEMBER_PRODUCT_ORDER','edit_member-product-order','product-market','編輯玩家訂單',0,NULL,0,0),(87,'VIEW_CASH_REGISTER','view_machine','machine-management','查看紙鈔機台',0,NULL,1,0),(88,'EDIT_CASH_REGISTER','edit_machine','machine-management','編輯紙鈔機台',0,NULL,1,0),(89,'VIEW_GAME_REBATE','view_game-rebate','system-setting','遊戲返水檢視',0,'[7]',0,0),(90,'GAME_REBATE_MANAGEMENT','edit_game-rebate','system-setting','遊戲返水編輯',0,'[7]',1,0),(91,'VIEW_AGENT_SETTING_HISTORY','view_agent-setting-history','system-setting','查看代理設定歷史',0,NULL,0,0),(92,'AGENT_SETTING_HISTORY_MANAGEMENT','edit_agent-setting-history','system-setting','編輯代理設定歷史',0,NULL,0,0),(93,'VIEW_BACKEND_NEWS','view_backend_news','system-setting','後台公告檢視',0,NULL,1,0),(94,'BACKEND_NEWS_MANAGEMENT','edit_backend_news','system-setting','後台公告編輯',0,NULL,1,0),(95,'MEMBER_HIDE','func_member-hide','func','隱藏會員',0,NULL,1,0),(96,'MAC_UPDATE','func_mac-update','func','機台MAC更新',0,NULL,1,0),(97,'VIEW_MACHINE_REPORT','view_machine-report','machine-management','查看機台報表',0,NULL,0,0),(98,'EDIT_MACHINE_REPORT','edit_machine-report','machine-management','編輯機台報表',0,NULL,0,0),(99,'VIEW_AGENT_LINE_GROUP','view_agent-line-group','system-setting','查看代理LINE群組',0,NULL,1,0),(100,'AGENT_LINE_GROUP_MANAGEMENT','edit_agent-line-group','system-setting','編輯代理LINE群組',0,NULL,1,0),(101,'VIEW_GAME_RANKING','view_game-ranking','market','檢視遊戲排行',0,NULL,1,0),(102,'VIEW_CENSORSHIP_WORDS','view_censorship-words','chat-room','查看聊天室審查訊息',0,NULL,1,0),(103,'EDIT_CENSORSHIP_WORDS','edit_censorship-words','chat-room','編輯聊天室審查訊息',0,NULL,1,0),(104,'VIEW_MEMBER_MESSAGES','view_member-messages','chat-room','查看聊天室會員訊息',0,NULL,1,0),(105,'VIEW_CHAT_ROOM_MEMBER_PERMISSION','view_chat-room-member-permission','chat-room','查看聊天室會員權限',0,NULL,1,0),(106,'EDIT_CHAT_ROOM_MEMBER_PERMISSION','edit_chat-room-member-permission','chat-room','編輯聊天室會員權限',0,NULL,1,0),(107,'EDIT_SAFE_BOX_PERMISSION','edit_safe-box','market','編輯保管箱',0,NULL,1,0),(108,'VIEW_SAFE_BOX_PERMISSION','view_safe-box','market','查看保管箱',0,NULL,1,0),(109,'VIEW_LOSS_POINT','view_loss-point','reports','查看掉點報表',0,NULL,1,0),(110,'EDIT_LOSS_POINT','edit_loss-point','reports','編輯掉點報表',0,NULL,1,0),(111,'VIEW_RISK_HANDLE','view_risk-handle','reports','查看風控名單',0,NULL,1,0),(112,'EDIT_RISK_HANDLE','edit_risk-handle','reports','更新風控名單',0,NULL,1,0),(113,'VIEW_WHITE_LIST','view_white-list','market','白名單設置',0,NULL,1,0),(114,'WHITE_LIST_MANAGEMENT','edit_white-list','market','編輯白名單設置',0,NULL,1,0),(115,'NEW_MACHINE','func_new-machine','func','創建機檯會員(獨立權限)',0,NULL,1,0),(116,'NEW_PLAYER','func_new-player','func','創建一般會員(獨立權限)',0,NULL,1,0),(117,'VIEW_MACHINE_SEARCH','view_machine-search','machine-management','查看機台查詢',0,NULL,1,0),(118,'EDIT_MACHINE_SEARCH','edit_machine-search','machine-management','編輯機台查詢',0,NULL,1,0),(119,'MACHINE_CANCEL_REGISTER','func_machine-cancel-register','func','機台MAC註銷',0,NULL,1,0),(120,'VIEW_CAGENT_LOGIN_LOG','view_agent-login-log','log-management','代理登入記錄',0,NULL,1,0),(121,'VIEW_HEDGE_REPORTS','view_hedge-report','reports','對押查詢',0,NULL,1,0),(122,'EDIT_HEDGE_REPORT','edit_hedge-report','reports','編輯對押查詢',0,NULL,1,0),(123,'VIEW_SINGLE_MEMBER_REPORT','view_single-member-report','reports','查詢會員遊戲統計',0,NULL,1,0),(124,'CASH_REGISTER_LIMIT','func_cash-register-limit','func','機台入鈔限額',0,NULL,1,0),(125,'FUNC_IS_TO_ALL_MEMBER','func_is-to-all-member-mode','func','功能性批次設定會員模組',0,NULL,1,0),(126,'VIEW_WITHDRAW_CASH_LIST','view_withdraw-cash-list','cashflow-setting','查看提款訂單',0,'',1,0),(127,'WITHDRAW_CASH_MANAGEMENT','edit_withdraw-cash-list','cashflow-setting','編輯提款訂單',0,'',1,0),(128,'VIEW_MEMBER_ACTION_LOG','view_member-action-log','reports','會員操作日誌',0,NULL,1,0);

--
-- Table structure for table `password_recovery_token`
--

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='忘記密碼重置信';

--
-- Dumping data for table `password_recovery_token`
--


--
-- Table structure for table `password_reset_tokens`
--

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;

--
-- Dumping data for table `password_reset_tokens`
--


--
-- Table structure for table `payment_methods`
--

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='金流商支付類型資料表';

--
-- Dumping data for table `payment_methods`
--


--
-- Table structure for table `personal_access_tokens`
--

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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `personal_access_tokens`
--

INSERT INTO `personal_access_tokens` VALUES (1,'App\\Models\\Cagent',16,'Cagent Access Token','69507a094fa125fffae6ab33d94f2a7d80295c795df9df2c9e5752abe572449b','[\"*\"]','2026-01-26 06:29:53',NULL,'2026-01-26 04:29:41','2026-01-26 06:29:53'),(2,'App\\Models\\MemberInfo',1,'authToken','8f512bf647e0cbb5729fbe2e8a096b2729d831d0316808e8e424230d9d31b2fe','[\"*\"]','2026-01-26 06:25:27',NULL,'2026-01-26 04:32:51','2026-01-26 06:25:27'),(3,'App\\Models\\Cagent',12,'Cagent Access Token','426595b5ce38031f6538ef9ca993a670978ae191c1a163bbb7f0e8f9a91ad7fd','[\"*\"]','2026-01-26 06:28:07',NULL,'2026-01-26 05:12:08','2026-01-26 06:28:07');

--
-- Table structure for table `platform_maintenance`
--

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;

--
-- Dumping data for table `platform_maintenance`
--


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

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='市集商品';

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


--
-- Table structure for table `product_image`
--

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='市集商品圖片';

--
-- Dumping data for table `product_image`
--


--
-- Table structure for table `product_language`
--

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='市集商品名稱語言';

--
-- Dumping data for table `product_language`
--


--
-- Table structure for table `product_type`
--

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='市集商品類型';

--
-- Dumping data for table `product_type`
--


--
-- Table structure for table `provider_payment_methods`
--

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为最优先',
  `not_support_iframe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否不支持iframe, 1:不支持, 0:支持',
  `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='金流商支付設定資料表';

--
-- Dumping data for table `provider_payment_methods`
--


--
-- Table structure for table `push_notifications`
--

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;

--
-- Dumping data for table `push_notifications`
--


--
-- Table structure for table `push_notifications_history`
--

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;

--
-- Dumping data for table `push_notifications_history`
--


--
-- Table structure for table `queue_error`
--

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;

--
-- Dumping data for table `queue_error`
--


--
-- Table structure for table `rewards`
--

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

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


--
-- Table structure for table `roulettes`
--

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;

--
-- Dumping data for table `roulettes`
--


--
-- Table structure for table `roulettes_attribute`
--

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;

--
-- Dumping data for table `roulettes_attribute`
--


--
-- Table structure for table `roulettes_copywriting`
--

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;

--
-- Dumping data for table `roulettes_copywriting`
--


--
-- Table structure for table `roulettes_rewards_statistics`
--

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去存整個資料。';

--
-- Dumping data for table `roulettes_rewards_statistics`
--


--
-- Table structure for table `serial_number_platform_redeem_log`
--

CREATE TABLE `serial_number_platform_redeem_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `sn_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '儲值代碼',
  `member_info_uid` int unsigned NOT NULL,
  `data` json NOT NULL COMMENT '序號資料',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '狀態 0 未執行 1 已執行 2 失敗',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `serial_number_platform_redeem_log_sn_code_unique` (`sn_code`),
  KEY `serial_number_platform_redeem_log_sn_code_index` (`sn_code`),
  KEY `serial_number_platform_redeem_log_member_info_uid_index` (`member_info_uid`),
  KEY `serial_number_platform_redeem_log_status_index` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `serial_number_platform_redeem_log`
--


--
-- Table structure for table `serial_number_platform_sync_log`
--

CREATE TABLE `serial_number_platform_sync_log` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名稱',
  `data` json NOT NULL COMMENT '同步資料',
  `auth` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '驗證',
  `response` json NOT NULL COMMENT '結果',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '狀態 0 未執行 1 已執行 2 失敗',
  `fail_count` int unsigned NOT NULL DEFAULT '0' COMMENT '失敗次數',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `serial_number_platform_sync_log_action_index` (`action`),
  KEY `serial_number_platform_sync_log_status_index` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `serial_number_platform_sync_log`
--

INSERT INTO `serial_number_platform_sync_log` VALUES (17,'sync_cagent','{\"cagent\": \"ouagent1\", \"passwd\": \"$2y$10$N.RSUBX8y/rPTQkq16veqOX7wvTMVZXh0D/5gtHfqUVrePPB.Gz1y\", \"status\": 1, \"nick_name\": \"ouagent1\", \"platform_cagent_uid\": 24, \"platform_parent_uid\": 2, \"platform_cagent_path\": \"1>2>24\", \"platform_cagent_level\": 3}','e39b78de87e06b28e4512cc2ae95d821','null',0,0,'2026-01-26 05:16:58',NULL),(18,'sync_cagent','{\"cagent\": \"ouagent2\", \"passwd\": \"$2y$10$F.5L3Xz8vcTRs7nQL28W.OjfHP.zVEg2BIW0oLcr3Wb5sa3mc7UhC\", \"status\": 1, \"nick_name\": \"ouagent2\", \"platform_cagent_uid\": 25, \"platform_parent_uid\": 24, \"platform_cagent_path\": \"1>2>24>25\", \"platform_cagent_level\": 4}','eeca5c561d36118458fdae78dc7673a0','null',0,0,'2026-01-26 05:19:08',NULL);

--
-- Table structure for table `site_announcements`
--

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;

--
-- Dumping data for table `site_announcements`
--


--
-- Table structure for table `sql_event_log`
--

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,
  `details` json DEFAULT NULL COMMENT '詳細內容',
  `error_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='紀錄mysql執行event的結果';

--
-- Dumping data for table `sql_event_log`
--


--
-- Table structure for table `tags`
--

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='玩家標籤';

--
-- Dumping data for table `tags`
--


--
-- Table structure for table `test_logs`
--

CREATE TABLE `test_logs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `test_suite` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `test_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('passed','failed','skipped','error') COLLATE utf8mb4_unicode_ci NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci,
  `test_data` json DEFAULT NULL,
  `expected_result` json DEFAULT NULL,
  `actual_result` json DEFAULT NULL,
  `assertions` json DEFAULT NULL,
  `execution_time` decimal(10,4) DEFAULT NULL,
  `stack_trace` text COLLATE utf8mb4_unicode_ci,
  `environment` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'testing',
  `git_branch` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `git_commit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `run_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `test_logs_test_suite_test_name_created_at_index` (`test_suite`,`test_name`,`created_at`),
  KEY `test_logs_status_created_at_index` (`status`,`created_at`),
  KEY `test_logs_test_suite_index` (`test_suite`),
  KEY `test_logs_test_name_index` (`test_name`),
  KEY `test_logs_status_index` (`status`),
  KEY `test_logs_run_id_index` (`run_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `test_logs`
--


--
-- Table structure for table `third_party_providers`
--

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='代理商資料表';

--
-- Dumping data for table `third_party_providers`
--


--
-- Table structure for table `transfer_api_log`
--

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,
  `create_date` datetime DEFAULT NULL,
  `request_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'request_id',
  `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`),
  KEY `transfer_api_log_request_id_index` (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transfer_api_log`
--


--
-- Table structure for table `transfer_log`
--

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;

--
-- Dumping data for table `transfer_log`
--


--
-- Table structure for table `transfer_wallet_log`
--

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,
  `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;

--
-- Dumping data for table `transfer_wallet_log`
--


--
-- Table structure for table `treasure`
--

CREATE TABLE `treasure` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主鍵',
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '獎池名稱',
  `level` int NOT NULL DEFAULT '1' COMMENT '獎池等級',
  `threshold` int unsigned NOT NULL DEFAULT '1' COMMENT '達標後可開啟獎池的門檻值',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註',
  `count_limit` int NOT NULL COMMENT '玩家累計最大遊玩次數',
  `is_wagering` tinyint NOT NULL DEFAULT '0' COMMENT '是否鎖洗碼 (0:否,1:是)',
  `wagering_type` enum('multiplier','amounts') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '洗碼類型',
  `wagering_value` double NOT NULL DEFAULT '0' COMMENT '洗碼金額 / 倍率值',
  `complete_times` int NOT NULL DEFAULT '0' COMMENT '紀錄:總遊玩次數',
  `complete_bonus` double NOT NULL DEFAULT '0' COMMENT '紀錄:總送出獎勵',
  `start_time` datetime DEFAULT NULL COMMENT '開始時間',
  `end_time` datetime DEFAULT NULL COMMENT '結束時間',
  `total_prize_money` int NOT NULL DEFAULT '0' COMMENT '總獎池的金額',
  `is_active` tinyint NOT NULL DEFAULT '1' COMMENT '狀態 (0:停用,1:啟用)',
  `cagent_uid` int NOT NULL COMMENT '代理商 UID',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `treasure`
--


--
-- Table structure for table `treasure_copywriting`
--

CREATE TABLE `treasure_copywriting` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主鍵',
  `treasure_uid` bigint 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,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `treasure_copywriting_treasure_uid_foreign` (`treasure_uid`),
  CONSTRAINT `treasure_copywriting_treasure_uid_foreign` FOREIGN KEY (`treasure_uid`) REFERENCES `treasure` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `treasure_copywriting`
--


--
-- Table structure for table `treasure_rewards`
--

CREATE TABLE `treasure_rewards` (
  `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主鍵',
  `treasure_uid` bigint unsigned NOT NULL COMMENT '對應獎池 UID',
  `reward_title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '獎勵標題',
  `reward_amount` int NOT NULL DEFAULT '0' COMMENT '獎勵金額 (reward_type=point)',
  `reward_type` enum('item','point') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'point' COMMENT '獎勵類型',
  `reward_max_draw_times` int DEFAULT NULL COMMENT '獎勵最大被抽中次數',
  `reward_cumulative_times` int NOT NULL DEFAULT '0' COMMENT '紀錄:獎勵累計發放次數',
  `reward_cumulative_amount` bigint NOT NULL DEFAULT '0' COMMENT '紀錄:獎勵累計發放金額',
  `reward_default` tinyint NOT NULL DEFAULT '0' COMMENT '獎勵超過獎池時，是否設為預定中獎項目',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '狀態 (0:不可抽,1:可抽)',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `treasure_rewards_treasure_uid_foreign` (`treasure_uid`),
  CONSTRAINT `treasure_rewards_treasure_uid_foreign` FOREIGN KEY (`treasure_uid`) REFERENCES `treasure` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `treasure_rewards`
--


--
-- Table structure for table `unlimit_settings`
--

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;

--
-- Dumping data for table `unlimit_settings`
--


--
-- Table structure for table `unlimit_tree`
--

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;

--
-- Dumping data for table `unlimit_tree`
--


--
-- Table structure for table `user_favorite_games`
--

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;

--
-- Dumping data for table `user_favorite_games`
--


--
-- Table structure for table `user_game_clicks`
--

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;

--
-- Dumping data for table `user_game_clicks`
--


--
-- Table structure for table `users`
--

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;

--
-- Dumping data for table `users`
--


--
-- Table structure for table `verify_codes`
--

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;

--
-- Dumping data for table `verify_codes`
--


--
-- Table structure for table `vip`
--

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 AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='玩家等級';

--
-- Dumping data for table `vip`
--

INSERT INTO `vip` VALUES (1,0,'vip0','VIP制度0',1,NULL,NULL),(2,1,'vip1','VIP制度1',1,NULL,NULL),(3,2,'vip2','VIP制度2',1,NULL,NULL),(4,3,'vip3','VIP制度3',1,NULL,NULL),(5,4,'vip4','VIP制度4',1,NULL,NULL),(6,5,'vip5','VIP制度5',1,NULL,NULL),(7,6,'vip6','VIP制度6',1,NULL,NULL),(8,7,'vip7','VIP制度7',1,NULL,NULL),(9,8,'vip8','VIP制度8',1,NULL,NULL),(10,9,'vip9','VIP制度9',1,NULL,NULL);

--
-- Table structure for table `vip_criteria`
--

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晉升洗碼量條件';

--
-- Dumping data for table `vip_criteria`
--


--
-- Table structure for table `vip_game_rebate`
--

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',
  `rebate` json DEFAULT NULL COMMENT '平台與返水%數',
  PRIMARY KEY (`uid`),
  KEY `vip_uid_idx` (`vip_uid`),
  KEY `vip_level_idx` (`vip_level`),
  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遊戲返水%數設定';

--
-- Dumping data for table `vip_game_rebate`
--


--
-- Table structure for table `vip_game_table_limit`
--

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遊戲限紅設定';

--
-- Dumping data for table `vip_game_table_limit`
--


--
-- Table structure for table `vip_payment_tags`
--

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)';

--
-- Dumping data for table `vip_payment_tags`
--


--
-- Table structure for table `vip_withdrawal_rate`
--

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;

--
-- Dumping data for table `vip_withdrawal_rate`
--


--
-- Table structure for table `wagering_restricted_list`
--

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;

--
-- Dumping data for table `wagering_restricted_list`
--


--
-- Table structure for table `wallet_log`
--

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 '53c5b283-fad2-489c-90d1-853c09af7e2c' 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;

--
-- Dumping data for table `wallet_log`
--


--
-- Table structure for table `wallet_log_test`
--

CREATE TABLE `wallet_log_test` (
  `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 '23427878-adc2-4f71-a195-1a1c426e8d2c' 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,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `wallet_log_test_member_info_uid_currency_from_to_index` (`member_info_uid`,`currency`,`from`,`to`),
  KEY `wallet_log_test_member_info_uid_created_at_index` (`member_info_uid`,`created_at`),
  KEY `wallet_log_test_member_info_uid_action_index` (`member_info_uid`,`action`),
  KEY `wallet_log_test_cagent_uid_index` (`cagent_uid`),
  KEY `wallet_log_test_transhash_index` (`transhash`),
  KEY `wallet_log_test_currency_index` (`currency`),
  KEY `wallet_log_test_action_index` (`action`),
  KEY `wallet_log_test_from_index` (`from`),
  KEY `wallet_log_test_to_index` (`to`),
  KEY `wallet_log_test_created_at_index` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='錢包交易紀錄_測試用';

--
-- Dumping data for table `wallet_log_test`
--


--
-- Table structure for table `weekly_balance_fail_log`
--

CREATE TABLE `weekly_balance_fail_log` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT,
  `sattle_date` date NOT NULL COMMENT '結算日期',
  `game_wallet_uid` int unsigned NOT NULL COMMENT '錢包ID',
  `platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '平台',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '備註錯誤記錄',
  `created_at` datetime NOT NULL COMMENT '創建時間',
  PRIMARY KEY (`uid`),
  KEY `date_IDX` (`sattle_date`),
  KEY `game_wallet_uid_IDX` (`game_wallet_uid`),
  KEY `platform_IDX` (`platform`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='每周結算取餘額失敗表';

--
-- Dumping data for table `weekly_balance_fail_log`
--


--
-- Table structure for table `whitelist`
--

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;

--
-- Dumping data for table `whitelist`
--


--
-- Table structure for table `winlose_dataland_cagent`
--

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;

--
-- Dumping data for table `winlose_dataland_cagent`
--


--
-- Table structure for table `winlose_dataland_member`
--

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;

--
-- Dumping data for table `winlose_dataland_member`
--



