CreateTables.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <?php
  2. namespace app\process;
  3. use support\think\Db;
  4. use Workerman\Crontab\Crontab;
  5. class CreateTables
  6. {
  7. public function onWorkerStart(): void
  8. {
  9. // 每天的0点10执行,注意这里省略了秒位
  10. new Crontab('10 0 * * *', function(){
  11. $this->initStart();
  12. });
  13. }
  14. protected function initStart()
  15. {
  16. echo "开始创建表\n";
  17. $createTablesSqlList = [
  18. $this->base_total_day,
  19. $this->basic_login_total,
  20. $this->base_total_hour,
  21. $this->basic_login_total_game,
  22. $this->basic_login_total_server,
  23. $this->basic_reg_total,
  24. $this->game_active_hour,
  25. $this->server_total_day,
  26. $this->server_total_hour,
  27. ];
  28. foreach ($createTablesSqlList as $sql){
  29. try {
  30. $year = date('Y', strtotime('+1 year'));
  31. $month = date('Ym', strtotime('+1 month'));
  32. $sql = str_replace('{{YEAR}}', $year, $sql);
  33. $sql = str_replace('{{MONTH}}', $month, $sql);
  34. // echo "创建表:".$sql."\n";
  35. Db::connect("report_data")->execute($sql);
  36. }catch (\Exception $e){
  37. echo $e->getMessage();
  38. }
  39. }
  40. }
  41. protected string $base_total_day = "CREATE TABLE IF NOT EXISTS `base_total_day_{{YEAR}}` (
  42. `id` int(11) NOT NULL AUTO_INCREMENT,
  43. `tdate` date NOT NULL COMMENT '日期',
  44. `game_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  45. `media_id` int(11) NOT NULL DEFAULT '0' COMMENT '媒体ID',
  46. `agent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  47. `site_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告位ID',
  48. `auth_id` int(10) NOT NULL DEFAULT '0' COMMENT '负责人ID',
  49. `ad_show_pv` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告展示PV',
  50. `ad_show_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告展示IP',
  51. `ad_click_pv` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告安装PV',
  52. `ad_click_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告安装IP',
  53. `download` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下载数',
  54. `install` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装数',
  55. `install_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装IP',
  56. `reg_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册数',
  57. `reg_login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '当天注册当天登陆用户数',
  58. `reg_dev` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册设备',
  59. `login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆总数',
  60. `login_reg_game` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆数(注册游戏相同)',
  61. `old_login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '老用户登陆',
  62. `role_create_user` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建角色用户数',
  63. `reg_pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费数',
  64. `reg_pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费金额',
  65. `reg_pay_amount` float unsigned NOT NULL DEFAULT '0' COMMENT '注册付费分成金额',
  66. `pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总用户数',
  67. `pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总金额',
  68. `pay_amount` float unsigned NOT NULL DEFAULT '0' COMMENT '付费分成总金额',
  69. `reg_pay_num_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费数(剔除跨游戏)',
  70. `reg_pay_total_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费金额(剔除跨游戏)',
  71. `reg_pay_amount_rg` float unsigned NOT NULL DEFAULT '0' COMMENT '注册付费分成金额(剔除跨游戏)',
  72. `pay_num_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总用户数(剔除跨游戏)',
  73. `pay_total_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总金额(剔除跨游戏)',
  74. `pay_amount_rg` float unsigned NOT NULL DEFAULT '0' COMMENT '付费分成总金额(剔除跨游戏)',
  75. PRIMARY KEY (`id`) USING BTREE,
  76. UNIQUE KEY `select_index` (`tdate`,`agent_id`,`site_id`,`game_id`) USING BTREE,
  77. KEY `agent_id` (`agent_id`) USING BTREE,
  78. KEY `site_id` (`site_id`) USING BTREE,
  79. KEY `game_id` (`game_id`) USING BTREE,
  80. KEY `auth_id` (`auth_id`) USING BTREE,
  81. KEY `media_id` (`media_id`) USING BTREE
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
  83. protected string $basic_login_total = "CREATE TABLE IF NOT EXISTS `basic_login_total_{{YEAR}}` (
  84. `id` int(11) NOT NULL AUTO_INCREMENT,
  85. `tdate` date NOT NULL COMMENT '登录时间',
  86. `agent_id` int(11) NOT NULL COMMENT '渠道ID',
  87. `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '广告位ID',
  88. `cplaceid` varchar(50) DEFAULT NULL COMMENT '子ID',
  89. `adid` varchar(20) DEFAULT NULL COMMENT '创意ID',
  90. `turn` int(10) unsigned NOT NULL COMMENT '轮数ID',
  91. `login_count` int(11) NOT NULL COMMENT '账号数',
  92. `active` int(10) unsigned NOT NULL COMMENT '活跃天数(0:当天)',
  93. `plat_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平台ID',
  94. PRIMARY KEY (`id`) USING BTREE,
  95. KEY `tdate` (`tdate`) USING BTREE,
  96. KEY `agent_id` (`agent_id`) USING BTREE,
  97. KEY `site_id` (`site_id`) USING BTREE,
  98. KEY `plat_id` (`plat_id`) USING BTREE,
  99. KEY `active` (`active`) USING BTREE
  100. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
  101. protected string $base_total_hour = "CREATE TABLE IF NOT EXISTS `base_total_hour_{{MONTH}}` (
  102. `id` int(11) NOT NULL AUTO_INCREMENT,
  103. `tdate` date NOT NULL COMMENT '日期',
  104. `thour` tinyint(3) unsigned NOT NULL COMMENT '小时',
  105. `game_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  106. `media_id` int(11) NOT NULL DEFAULT '0' COMMENT '媒体ID',
  107. `agent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  108. `site_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告位ID',
  109. `auth_id` int(10) NOT NULL DEFAULT '0' COMMENT '负责人ID',
  110. `ad_show_pv` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告展示PV',
  111. `ad_show_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告展示IP',
  112. `ad_click_pv` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告安装PV',
  113. `ad_click_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告安装IP',
  114. `cost` decimal(14,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '消耗金额',
  115. `download` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下载数',
  116. `install` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装数',
  117. `install_ip` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装IP',
  118. `reg_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册数',
  119. `reg_login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册登陆用户',
  120. `reg_dev` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册设备',
  121. `login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆总数',
  122. `login_reg_game` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆数(注册游戏相同)',
  123. `old_login_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '老用户登陆',
  124. `role_create_user` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建用户数',
  125. `reg_pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '小时注册当天付费数',
  126. `reg_pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '小时注册当天付费金额',
  127. `reg_pay_amount` float unsigned NOT NULL DEFAULT '0' COMMENT '小时注册当天分成金额',
  128. `reg_pay_num_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册累计付费数',
  129. `reg_pay_total_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册累计付费金额',
  130. `reg_pay_amount_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册累计分成金额',
  131. `pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总用户数',
  132. `pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总金额',
  133. `pay_amount` float unsigned NOT NULL DEFAULT '0' COMMENT '付费分成总金额',
  134. `pay_num_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总用户数(剔除跨游戏)',
  135. `pay_total_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费总金额(剔除跨游戏)',
  136. `pay_amount_rg` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付费分成总金额(剔除跨游戏)',
  137. PRIMARY KEY (`id`) USING BTREE,
  138. UNIQUE KEY `select_index` (`tdate`,`thour`,`agent_id`,`site_id`,`game_id`) USING BTREE,
  139. KEY `tdate` (`tdate`) USING BTREE,
  140. KEY `thour` (`thour`) USING BTREE,
  141. KEY `agent_id` (`agent_id`) USING BTREE,
  142. KEY `media_id` (`media_id`) USING BTREE,
  143. KEY `auth_id` (`auth_id`) USING BTREE,
  144. KEY `site_id` (`site_id`) USING BTREE,
  145. KEY `game_id` (`game_id`) USING BTREE
  146. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
  147. protected string $basic_login_total_game = "CREATE TABLE IF NOT EXISTS `basic_login_total_game_{{YEAR}}` (
  148. `id` int(11) NOT NULL AUTO_INCREMENT,
  149. `tdate` date NOT NULL COMMENT '登录时间',
  150. `agent_id` int(11) NOT NULL COMMENT '渠道ID',
  151. `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '广告位ID',
  152. `cplaceid` varchar(50) DEFAULT NULL COMMENT '子ID',
  153. `adid` varchar(20) DEFAULT NULL COMMENT '创意ID',
  154. `game_id` int(10) unsigned NOT NULL COMMENT '游戏ID',
  155. `turn` int(10) unsigned NOT NULL COMMENT '轮数ID',
  156. `login_count` int(11) NOT NULL COMMENT '账号数',
  157. `active` int(10) unsigned NOT NULL COMMENT '活跃天数(0:当天)',
  158. `plat_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平台ID',
  159. PRIMARY KEY (`id`) USING BTREE,
  160. KEY `tdate` (`tdate`) USING BTREE,
  161. KEY `agent_id` (`agent_id`) USING BTREE,
  162. KEY `site_id` (`site_id`) USING BTREE,
  163. KEY `game_id` (`game_id`) USING BTREE,
  164. KEY `plat_id` (`plat_id`) USING BTREE,
  165. KEY `active` (`active`) USING BTREE
  166. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;";
  167. protected string $basic_login_total_server = "CREATE TABLE IF NOT EXISTS `basic_login_total_server_{{YEAR}}` (
  168. `id` int(11) NOT NULL AUTO_INCREMENT,
  169. `tdate` date NOT NULL COMMENT '登录时间',
  170. `agent_id` int(11) NOT NULL COMMENT '渠道ID',
  171. `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '广告位ID',
  172. `cplaceid` varchar(50) DEFAULT NULL COMMENT '子ID',
  173. `adid` varchar(20) DEFAULT NULL COMMENT '创意ID',
  174. `game_id` int(10) unsigned NOT NULL COMMENT '游戏ID',
  175. `server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器ID',
  176. `turn` int(10) unsigned NOT NULL COMMENT '轮数ID',
  177. `login_count` int(11) NOT NULL COMMENT '账号数',
  178. `active` int(10) unsigned NOT NULL COMMENT '活跃天数(0:当天)',
  179. `plat_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平台ID',
  180. PRIMARY KEY (`id`) USING BTREE,
  181. KEY `tdate` (`tdate`) USING BTREE,
  182. KEY `agent_id` (`agent_id`) USING BTREE,
  183. KEY `site_id` (`site_id`) USING BTREE,
  184. KEY `game_id` (`game_id`) USING BTREE,
  185. KEY `server_id` (`server_id`) USING BTREE,
  186. KEY `plat_id` (`plat_id`) USING BTREE,
  187. KEY `active` (`active`) USING BTREE
  188. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;";
  189. protected string $basic_reg_total = "CREATE TABLE IF NOT EXISTS `basic_reg_total_{{YEAR}}` (
  190. `id` int(11) NOT NULL AUTO_INCREMENT,
  191. `tdate` date NOT NULL COMMENT '日期',
  192. `thour` tinyint(4) NOT NULL COMMENT '小时',
  193. `agent_id` int(11) NOT NULL COMMENT '渠道ID',
  194. `site_id` int(11) NOT NULL COMMENT '广告位ID',
  195. `adid` varchar(100) DEFAULT '' COMMENT '创意ID',
  196. `turn` int(11) DEFAULT '0' COMMENT '轮数',
  197. `cplaceid` varchar(100) DEFAULT '' COMMENT '子ID',
  198. `reg_count` int(11) NOT NULL DEFAULT '0' COMMENT '注册数',
  199. `login_count` int(11) NOT NULL DEFAULT '0' COMMENT '登录数',
  200. `game_id` int(11) NOT NULL COMMENT '游戏ID',
  201. `server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器ID',
  202. `plat_id` tinyint(4) NOT NULL DEFAULT '0' COMMENT '平台ID',
  203. PRIMARY KEY (`id`) USING BTREE,
  204. KEY `tdate` (`tdate`) USING BTREE,
  205. KEY `thour` (`thour`) USING BTREE,
  206. KEY `agent_id` (`agent_id`) USING BTREE,
  207. KEY `site_id` (`site_id`) USING BTREE,
  208. KEY `game_id` (`game_id`) USING BTREE,
  209. KEY `server_id` (`server_id`) USING BTREE,
  210. KEY `adid` (`adid`) USING BTREE,
  211. KEY `cplaceid` (`cplaceid`) USING BTREE,
  212. KEY `plat_id` (`plat_id`) USING BTREE
  213. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='注册日志基础统计表';";
  214. protected string $game_active_hour = "CREATE TABLE IF NOT EXISTS `game_active_hour_{{MONTH}}` (
  215. `id` int(11) NOT NULL AUTO_INCREMENT,
  216. `game_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  217. `media_id` int(11) NOT NULL DEFAULT '0' COMMENT '媒体ID',
  218. `agent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  219. `site_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告位ID',
  220. `auth_id` int(10) NOT NULL DEFAULT '0' COMMENT '负责人ID',
  221. `reg_date` date NOT NULL COMMENT '日期',
  222. `thour` tinyint(3) unsigned NOT NULL COMMENT '小时',
  223. `days` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活跃天数(0当天登陆)',
  224. `active_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活跃数',
  225. `active_reg_game` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活跃数(注册游戏相同)',
  226. `pay_total` float NOT NULL DEFAULT '0',
  227. PRIMARY KEY (`id`) USING BTREE,
  228. UNIQUE KEY `select_index` (`reg_date`,`thour`,`days`,`agent_id`,`site_id`,`game_id`) USING BTREE,
  229. KEY `reg_date` (`reg_date`) USING BTREE,
  230. KEY `thour` (`thour`) USING BTREE,
  231. KEY `agent_id` (`agent_id`) USING BTREE,
  232. KEY `site_id` (`site_id`) USING BTREE,
  233. KEY `media_id` (`media_id`) USING BTREE,
  234. KEY `auth_id` (`auth_id`) USING BTREE,
  235. KEY `game_id` (`game_id`) USING BTREE
  236. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='注册活跃表(按小时统计)';";
  237. protected string $server_total_day = "CREATE TABLE IF NOT EXISTS `server_total_day_{{YEAR}}` (
  238. `id` int(11) NOT NULL AUTO_INCREMENT,
  239. `tdate` date NOT NULL COMMENT '日期',
  240. `game_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  241. `media_id` int(11) NOT NULL DEFAULT '0' COMMENT '媒体ID',
  242. `agent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  243. `site_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告位ID',
  244. `auth_id` int(10) NOT NULL DEFAULT '0' COMMENT '负责人ID',
  245. `server_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '区服ID',
  246. `user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆用户数(数据上报)',
  247. `new_user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '新登陆用户(进入游戏)',
  248. `reg_user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册登陆数(数据上报)',
  249. `role_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏角色登陆数',
  250. `role_create_user` int(10) unsigned DEFAULT '0' COMMENT '创建角色用户数',
  251. `role_create_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏创角数',
  252. `pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '充值人数',
  253. `pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '充值金额',
  254. `reg_pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费人数',
  255. `reg_pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册付费金额',
  256. `gf_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '衮服登陆用户数',
  257. `gf_pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '衮服付费数',
  258. `gf_pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '衮服付费金额',
  259. PRIMARY KEY (`id`) USING BTREE,
  260. UNIQUE KEY `select_index` (`tdate`,`agent_id`,`site_id`,`game_id`,`server_id`) USING BTREE,
  261. KEY `tdate` (`tdate`) USING BTREE,
  262. KEY `agent_id` (`agent_id`) USING BTREE,
  263. KEY `site_id` (`site_id`) USING BTREE,
  264. KEY `game_id` (`game_id`) USING BTREE,
  265. KEY `media_id` (`media_id`) USING BTREE,
  266. KEY `auth_id` (`auth_id`) USING BTREE,
  267. KEY `server_id` (`server_id`) USING BTREE
  268. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='按区服统计总表';";
  269. protected string $server_total_hour = "CREATE TABLE IF NOT EXISTS `server_total_hour_{{MONTH}}` (
  270. `id` int(11) NOT NULL AUTO_INCREMENT,
  271. `tdate` date NOT NULL COMMENT '日期',
  272. `thour` tinyint(4) NOT NULL COMMENT '小时',
  273. `game_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  274. `media_id` int(11) NOT NULL DEFAULT '0' COMMENT '媒体ID',
  275. `agent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  276. `site_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '广告位ID',
  277. `auth_id` int(10) NOT NULL DEFAULT '0' COMMENT '负责人ID',
  278. `server_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '区服ID',
  279. `user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登陆用户数(数据上报)',
  280. `new_user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '新登陆用户(进入游戏)',
  281. `reg_user_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册登陆数(数据上报)',
  282. `role_login_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏角色登陆数',
  283. `role_create_user` int(10) unsigned DEFAULT '0' COMMENT '创建角色用户数',
  284. `role_create_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '游戏创角数',
  285. `pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '充值人数',
  286. `pay_total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '充值金额',
  287. PRIMARY KEY (`id`) USING BTREE,
  288. UNIQUE KEY `select_index` (`tdate`,`thour`,`agent_id`,`site_id`,`game_id`,`server_id`) USING BTREE,
  289. KEY `tdate` (`tdate`) USING BTREE,
  290. KEY `thour` (`thour`) USING BTREE,
  291. KEY `agent_id` (`agent_id`) USING BTREE,
  292. KEY `site_id` (`site_id`) USING BTREE,
  293. KEY `game_id` (`game_id`) USING BTREE,
  294. KEY `media_id` (`media_id`) USING BTREE,
  295. KEY `auth_id` (`auth_id`) USING BTREE,
  296. KEY `server_id` (`server_id`) USING BTREE
  297. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='按区服统计小时总表';";
  298. }