db_mp_log.sql 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. SQLyog Ultimate v10.42
  3. MySQL - 5.7.36 : Database - db_mp_log
  4. *********************************************************************
  5. */
  6. /*!40101 SET NAMES utf8 */;
  7. /*!40101 SET SQL_MODE=''*/;
  8. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  9. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  10. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  11. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  12. CREATE DATABASE /*!32312 IF NOT EXISTS*/`db_mp_log` /*!40100 DEFAULT CHARACTER SET latin1 */;
  13. USE `db_mp_log`;
  14. /*Table structure for table `log_day_hour_202111` */
  15. DROP TABLE IF EXISTS `log_day_hour_202111`;
  16. CREATE TABLE `log_day_hour_202111` (
  17. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  18. `date` date NOT NULL DEFAULT '2020-11-01' COMMENT '日期',
  19. `hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '时间KEY值 1~24',
  20. `mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家id',
  21. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '归属渠道',
  22. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  23. `reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  24. `reg_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '注册天数',
  25. `reg_hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间key 1~24',
  26. `game_reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  27. `game_reg_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '注册天数',
  28. `game_reg_hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间key 1~24',
  29. `login_cnt` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '打开次数',
  30. `sum_money` decimal(12,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计充值',
  31. `sum_real_money` decimal(12,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计真实充值',
  32. `order_cnt` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  33. PRIMARY KEY (`id`) USING BTREE,
  34. UNIQUE KEY `dh_date_mem_app_device_unique` (`date`,`hour_key`,`mem_id`,`app_id`) USING BTREE,
  35. KEY `dh_mem_index` (`mem_id`) USING BTREE,
  36. KEY `dh_game_index` (`app_id`) USING BTREE
  37. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='每时统计表';
  38. /*Table structure for table `log_day_hour_switch_202111` */
  39. DROP TABLE IF EXISTS `log_day_hour_switch_202111`;
  40. CREATE TABLE `log_day_hour_switch_202111` (
  41. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  42. `date` date NOT NULL DEFAULT '2020-11-01' COMMENT '日期',
  43. `hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '时间KEY值 1~24',
  44. `mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家id',
  45. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '归属渠道',
  46. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  47. `reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  48. `reg_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '注册天数',
  49. `reg_hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间key 1~24',
  50. `game_reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  51. `game_reg_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '注册天数',
  52. `game_reg_hour_key` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间key 1~24',
  53. `login_cnt` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '打开次数',
  54. `sum_money` decimal(12,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计充值',
  55. `sum_real_money` decimal(12,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计真实充值',
  56. `order_cnt` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  57. PRIMARY KEY (`id`) USING BTREE,
  58. UNIQUE KEY `dh_date_mem_app_device_unique` (`date`,`hour_key`,`mem_id`,`app_id`) USING BTREE,
  59. KEY `dh_mem_index` (`mem_id`) USING BTREE,
  60. KEY `dh_game_index` (`app_id`) USING BTREE
  61. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='每时统计表';
  62. /*Table structure for table `log_log_day_mem_202111` */
  63. DROP TABLE IF EXISTS `log_log_day_mem_202111`;
  64. CREATE TABLE `log_log_day_mem_202111` (
  65. `id` int(11) NOT NULL AUTO_INCREMENT,
  66. `date` date NOT NULL COMMENT '日期',
  67. `mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  68. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '归属渠道',
  69. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  70. `reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  71. `reg_days` int(11) NOT NULL DEFAULT '0' COMMENT '注册天数',
  72. `role_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创角天数',
  73. `device_id` varchar(64) NOT NULL DEFAULT '' COMMENT '手机设备码',
  74. `device_cnt` int(11) NOT NULL DEFAULT '1' COMMENT '登陆的设备个数',
  75. `login_cnt` int(11) NOT NULL DEFAULT '1' COMMENT '登陆次数',
  76. `sum_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '累计充值',
  77. `sum_real_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '累计真实充值',
  78. `first_pay_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '第一笔充值时间',
  79. `last_pay_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '最近充值时间',
  80. `last_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '最近充值金额',
  81. `order_cnt` int(20) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  82. `order_suc_cnt` int(20) unsigned NOT NULL DEFAULT '0' COMMENT '支付成功订单数量',
  83. `last_login_ip` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家最近登陆ip',
  84. `auth_cnt` int(11) NOT NULL DEFAULT '0' COMMENT '授权登陆次数',
  85. `is_cpa` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否计算cpa 1 否 2是',
  86. `is_auth` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否第三方注册 1 否 2是',
  87. `reg_app_id` int(11) NOT NULL DEFAULT '0' COMMENT '注册游戏ID',
  88. `is_new_app` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否游戏新增注册玩家 1 否 2是',
  89. `is_new_role` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否游戏新增角色 1 否 2是',
  90. PRIMARY KEY (`id`) USING BTREE,
  91. UNIQUE KEY `ldm_date_mem_app_unique` (`date`,`mem_id`,`app_id`) USING BTREE,
  92. KEY `ldm_ip_index` (`last_login_ip`) USING BTREE,
  93. KEY `ldm_mem_index` (`mem_id`) USING BTREE
  94. ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='玩家每日';
  95. /*Table structure for table `log_log_day_mem_switch_202111` */
  96. DROP TABLE IF EXISTS `log_log_day_mem_switch_202111`;
  97. CREATE TABLE `log_log_day_mem_switch_202111` (
  98. `id` int(11) NOT NULL AUTO_INCREMENT,
  99. `date` date NOT NULL COMMENT '日期',
  100. `mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  101. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '归属渠道',
  102. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  103. `reg_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家注册时间',
  104. `reg_days` int(11) NOT NULL DEFAULT '0' COMMENT '注册天数',
  105. `role_days` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创角天数',
  106. `device_id` varchar(64) NOT NULL DEFAULT '' COMMENT '手机设备码',
  107. `device_cnt` int(11) NOT NULL DEFAULT '1' COMMENT '登陆的设备个数',
  108. `login_cnt` int(11) NOT NULL DEFAULT '1' COMMENT '登陆次数',
  109. `sum_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '累计充值',
  110. `sum_real_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '累计真实充值',
  111. `first_pay_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '第一笔充值时间',
  112. `last_pay_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '最近充值时间',
  113. `last_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '最近充值金额',
  114. `order_cnt` int(20) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  115. `order_suc_cnt` int(20) unsigned NOT NULL DEFAULT '0' COMMENT '支付成功订单数量',
  116. `last_login_ip` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家最近登陆ip',
  117. `auth_cnt` int(11) NOT NULL DEFAULT '0' COMMENT '授权登陆次数',
  118. `is_cpa` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否计算cpa 1 否 2是',
  119. `is_auth` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否第三方注册 1 否 2是',
  120. `reg_app_id` int(11) NOT NULL DEFAULT '0' COMMENT '注册游戏ID',
  121. `is_new_app` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否游戏新增注册玩家 1 否 2是',
  122. `is_new_role` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否游戏新增角色 1 否 2是',
  123. PRIMARY KEY (`id`) USING BTREE,
  124. UNIQUE KEY `ldm_date_mem_app_unique` (`date`,`mem_id`,`app_id`) USING BTREE,
  125. KEY `ldm_ip_index` (`last_login_ip`) USING BTREE,
  126. KEY `ldm_mem_index` (`mem_id`) USING BTREE
  127. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='玩家每日';
  128. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  129. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  130. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  131. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;