agent_full_20220101_01.sql 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : local_mysql8
  4. Source Server Type : MySQL
  5. Source Server Version : 80019
  6. Source Host : mysql:3306
  7. Source Schema : sg_agent_tmp
  8. Target Server Type : MySQL
  9. Target Server Version : 80019
  10. File Encoding : 65001
  11. Date: 01/01/2022 23:15:26
  12. */
  13. -- ----------------------------
  14. -- Table structure for ag_agent
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `ag_agent`;
  17. CREATE TABLE `ag_agent` (
  18. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  19. `uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'UID',
  20. `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名,全小写化',
  21. `nick` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '昵称',
  22. `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '密码,经过md5加密',
  23. `salt` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '盐',
  24. `otp_secret` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'otp密码',
  25. `created_at` datetime DEFAULT NULL,
  26. `updated_at` datetime DEFAULT NULL,
  27. `agent_level` smallint NOT NULL DEFAULT '-999' COMMENT '代理级别,顶级是1,-999无任何代理',
  28. `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额,单位元',
  29. `note` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  30. `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态:1=开放;2=冻结',
  31. `frozen` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '冻结金额,单位元',
  32. `withdraw_pwd` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '提现密码,明文',
  33. `parent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '父级UID',
  34. `own_app_uids` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '拥有的APP UID结合,多个半角逗号分隔开',
  35. `parent_uids` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '父级UID集合,多个半角逗号分割开',
  36. `child_uids` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '子级UID集合,多个半角逗号分隔开',
  37. `commission_ratio` smallint unsigned NOT NULL DEFAULT '0' COMMENT '分成比例,单位%',
  38. `commission_diff_ratio` smallint unsigned NOT NULL DEFAULT '0' COMMENT '本代理上级计算分成比例,单位%',
  39. `jdata` json DEFAULT NULL COMMENT 'json数据,包含各种规则,不单独占用root节点',
  40. `last_login_ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '上次登陆IP',
  41. `last_login_at` datetime DEFAULT NULL COMMENT '上次登陆时间',
  42. `deduction_switch` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '扣量开关:0=关闭; 1=开启',
  43. PRIMARY KEY (`id`) USING BTREE,
  44. UNIQUE KEY `UNQ_uid` (`uid`) USING BTREE,
  45. UNIQUE KEY `UNQ_username` (`username`) USING BTREE
  46. ) ENGINE=InnoDB AUTO_INCREMENT=3667 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理用户';
  47. -- ----------------------------
  48. -- Table structure for ag_agent_attrs
  49. -- ----------------------------
  50. DROP TABLE IF EXISTS `ag_agent_attrs`;
  51. CREATE TABLE `ag_agent_attrs` (
  52. `id` int unsigned NOT NULL AUTO_INCREMENT,
  53. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '关联管理员uid',
  54. `created_at` datetime DEFAULT NULL,
  55. `updated_at` datetime DEFAULT NULL,
  56. `order_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计订单数',
  57. `order_success` int unsigned NOT NULL DEFAULT '0' COMMENT '累计成功订单数',
  58. `order_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '累计失败订单数',
  59. `order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计订单金额',
  60. `order_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计成功金额',
  61. `dau_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计日活',
  62. `dau_android` int unsigned NOT NULL DEFAULT '0' COMMENT '累计android日活',
  63. `dau_ios` int unsigned NOT NULL DEFAULT '0' COMMENT '累加ios日活',
  64. `dau_h5` int unsigned NOT NULL DEFAULT '0' COMMENT '累加h5日活',
  65. `android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计android订单数',
  66. `android_success` int unsigned NOT NULL DEFAULT '0' COMMENT '累计android成功订单数',
  67. `android_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '累计android失败订单数',
  68. `android_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计android总金额',
  69. `android_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计android成功订单金额',
  70. `ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计ios订单数',
  71. `ios_success` int unsigned NOT NULL DEFAULT '0' COMMENT '累计ios成功订单数',
  72. `ios_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '累计ios失败订单数',
  73. `ios_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计ios总金额',
  74. `ios_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计ios成功订单金额',
  75. `h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计h5订单数',
  76. `h5_success` int unsigned NOT NULL DEFAULT '0' COMMENT '累计h5成功订单数',
  77. `h5_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '累计h5失败订单数',
  78. `h5_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计h5总金额',
  79. `h5_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计h5成功订单金额',
  80. `deduction_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计渠道扣量后的总订单数',
  81. `deduction_success` int unsigned NOT NULL DEFAULT '0' COMMENT '累计渠道扣量后的成功订单数',
  82. `deduction_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '累计渠道扣量后的失败单数',
  83. `deduction_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计渠道扣量后的总金额',
  84. `deduction_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计渠道扣量后的成功金额',
  85. `commission_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计代理提成金额',
  86. `withdraw_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计提现金额',
  87. `users_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计用户数量',
  88. `users_android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计android用户数量',
  89. `users_ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计ios用户数量',
  90. `users_h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '累计h5用户数量',
  91. `users_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '累计扣量用户数量',
  92. `users_android_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '累计扣量android用户数量',
  93. `users_ios_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '累计扣量ios用户数量',
  94. `users_h5_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '累计扣量h5用户数量',
  95. `td_date` date DEFAULT NULL COMMENT '今日日期Y-m-d',
  96. `td_order_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日订单数',
  97. `td_order_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日成功订单数',
  98. `td_order_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日失败订单数',
  99. `td_order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日订单金额',
  100. `td_order_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日成功金额',
  101. `td_dau_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日日活',
  102. `td_dau_android` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android日活',
  103. `td_dau_ios` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios日活',
  104. `td_dau_h5` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5日活',
  105. `td_android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android订单数',
  106. `td_android_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android成功订单数',
  107. `td_android_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android失败订单数',
  108. `td_android_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日android总金额',
  109. `td_android_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日android成功订单金额',
  110. `td_ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios订单数',
  111. `td_ios_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios成功订单数',
  112. `td_ios_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios失败订单数',
  113. `td_ios_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日ios总金额',
  114. `td_ios_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日ios成功订单金额',
  115. `td_h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5订单数',
  116. `td_h5_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5成功订单数',
  117. `td_h5_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5失败订单数',
  118. `td_h5_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日h5总金额',
  119. `td_h5_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日h5成功订单金额',
  120. `td_deduction_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的总订单数',
  121. `td_deduction_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的成功订单数',
  122. `td_deduction_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的失败单数',
  123. `td_deduction_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日渠道扣量后的总金额',
  124. `td_deduction_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日渠道扣量后的成功金额',
  125. `td_commission_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日代理提成金额',
  126. `td_users_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日用户数量',
  127. `td_users_android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android用户数量',
  128. `td_users_ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios用户数量',
  129. `td_users_h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5用户数量',
  130. `td_users_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量用户数量',
  131. `td_users_android_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量android用户数量',
  132. `td_users_ios_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量ios用户数量',
  133. `td_users_h5_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量h5用户数量',
  134. PRIMARY KEY (`id`) USING BTREE,
  135. UNIQUE KEY `UNQ_uid` (`agent_uid`) USING BTREE COMMENT '唯一UID',
  136. KEY `INDX_TODAY` (`agent_uid`,`td_date`) USING BTREE COMMENT '某人今天的数据'
  137. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理扩展属性';
  138. -- ----------------------------
  139. -- Table structure for ag_agent_attrs_day
  140. -- ----------------------------
  141. DROP TABLE IF EXISTS `ag_agent_attrs_day`;
  142. CREATE TABLE `ag_agent_attrs_day` (
  143. `id` int unsigned NOT NULL AUTO_INCREMENT,
  144. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '关联管理员uid',
  145. `created_at` datetime DEFAULT NULL,
  146. `updated_at` datetime DEFAULT NULL,
  147. `is_used` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否被每日计划任务使用过',
  148. `td_date` date DEFAULT NULL COMMENT '今日日期Y-m-d',
  149. `td_order_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日订单数',
  150. `td_order_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日成功订单数',
  151. `td_order_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日失败订单数',
  152. `td_order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日订单金额',
  153. `td_order_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日成功金额',
  154. `td_dau_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日日活',
  155. `td_dau_android` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android日活',
  156. `td_dau_ios` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios日活',
  157. `td_dau_h5` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5日活',
  158. `td_android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android订单数',
  159. `td_android_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android成功订单数',
  160. `td_android_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android失败订单数',
  161. `td_android_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日android总金额',
  162. `td_android_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日android成功订单金额',
  163. `td_ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios订单数',
  164. `td_ios_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios成功订单数',
  165. `td_ios_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios失败订单数',
  166. `td_ios_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日ios总金额',
  167. `td_ios_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日ios成功订单金额',
  168. `td_h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5订单数',
  169. `td_h5_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5成功订单数',
  170. `td_h5_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5失败订单数',
  171. `td_h5_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日h5总金额',
  172. `td_h5_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日h5成功订单金额',
  173. `td_deduction_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的总订单数',
  174. `td_deduction_success` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的成功订单数',
  175. `td_deduction_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '今日渠道扣量后的失败单数',
  176. `td_deduction_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日渠道扣量后的总金额',
  177. `td_deduction_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日渠道扣量后的成功金额',
  178. `td_commission_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日代理提成金额',
  179. `td_users_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日用户数量',
  180. `td_users_android_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日android用户数量',
  181. `td_users_ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日ios用户数量',
  182. `td_users_h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT '今日h5用户数量',
  183. `td_users_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量用户数量',
  184. `td_users_android_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量android用户数量',
  185. `td_users_ios_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量ios用户数量',
  186. `td_users_h5_deduction` int unsigned NOT NULL DEFAULT '0' COMMENT '今日扣量h5用户数量',
  187. PRIMARY KEY (`id`) USING BTREE,
  188. KEY `INDX_TODAY` (`agent_uid`,`td_date`) USING BTREE COMMENT '某人今天的数据'
  189. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理扩展属性每日日志';
  190. -- ----------------------------
  191. -- Table structure for ag_agent_bank_info
  192. -- ----------------------------
  193. DROP TABLE IF EXISTS `ag_agent_bank_info`;
  194. CREATE TABLE `ag_agent_bank_info` (
  195. `id` int unsigned NOT NULL AUTO_INCREMENT,
  196. `created_at` datetime DEFAULT NULL,
  197. `updated_at` datetime DEFAULT NULL,
  198. `uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'hash唯一ID',
  199. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '代理uid',
  200. `bank_account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '卡号',
  201. `bank_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '持卡人姓名',
  202. `bank_mark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '开户行',
  203. `type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '1银行卡;2USTD;3支付宝',
  204. `ustd_network` char(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '充币网络',
  205. `ustd_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '充币地址',
  206. `alipay_account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付宝账号',
  207. `alipay_username` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付宝姓名',
  208. PRIMARY KEY (`id`) USING BTREE,
  209. UNIQUE KEY `uid` (`uid`) USING BTREE,
  210. KEY `user_bank_info_uid` (`uid`) USING BTREE COMMENT '替代自增ID,查询'
  211. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户提现绑定信息';
  212. -- ----------------------------
  213. -- Table structure for ag_agent_log
  214. -- ----------------------------
  215. DROP TABLE IF EXISTS `ag_agent_log`;
  216. CREATE TABLE `ag_agent_log` (
  217. `id` int unsigned NOT NULL AUTO_INCREMENT,
  218. `created_at` datetime DEFAULT NULL,
  219. `updated_at` datetime DEFAULT NULL,
  220. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '代理UID',
  221. `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名',
  222. `nick` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '昵称',
  223. `subject` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主题',
  224. `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '模块',
  225. `action` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '动作',
  226. `svalue` varchar(3600) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '关联操作值',
  227. `db_data` json DEFAULT NULL COMMENT '前后数据对比',
  228. `ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ipv4',
  229. `ip_address` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ip地址解析名称',
  230. `ua` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  231. PRIMARY KEY (`id`) USING BTREE,
  232. KEY `INDX_username` (`username`) USING BTREE,
  233. KEY `INDX_module_action` (`module`,`action`) USING BTREE
  234. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理人员操作日志';
  235. -- ----------------------------
  236. -- Records of ag_agent_log
  237. -- ----------------------------
  238. BEGIN;
  239. COMMIT;
  240. -- ----------------------------
  241. -- Table structure for ag_announce
  242. -- ----------------------------
  243. DROP TABLE IF EXISTS `ag_announce`;
  244. CREATE TABLE `ag_announce` (
  245. `id` int unsigned NOT NULL AUTO_INCREMENT,
  246. `uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '唯一UID',
  247. `created_at` datetime DEFAULT NULL,
  248. `updated_at` datetime DEFAULT NULL,
  249. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  250. `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态,1=开放;2=隐藏',
  251. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '正文内容',
  252. `type` smallint unsigned NOT NULL DEFAULT '1' COMMENT '类型,1=代理首页;2=提现',
  253. PRIMARY KEY (`id`) USING BTREE,
  254. UNIQUE KEY `UNQ_uid` (`uid`) USING BTREE
  255. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='站内公告';
  256. -- ----------------------------
  257. -- Records of ag_announce
  258. -- ----------------------------
  259. INSERT INTO `ag_announce` VALUES (1, '1', NULL, '2021-12-27 18:57:26', '提现公告', 1, '提现内容!@!#232\n请注意坐姿,否则会得肩周炎!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!', 2);
  260. INSERT INTO `ag_announce` VALUES (2, '2', NULL, '2021-12-21 23:20:11', '代理中心首页广告', 1, '1.这里好好玩 这里是代理中心首页广告哦\n2.这个公告没有格式的吗', 1);
  261. INSERT INTO `ag_announce` VALUES (3, 'yq2nqr', '2021-12-22 03:31:43', '2021-12-22 03:32:54', '代理公告2', 2, '代理公告2', 1);
  262. -- ----------------------------
  263. -- Table structure for ag_app
  264. -- ----------------------------
  265. DROP TABLE IF EXISTS `ag_app`;
  266. CREATE TABLE `ag_app` (
  267. `id` int unsigned NOT NULL AUTO_INCREMENT,
  268. `uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'UID',
  269. `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名称',
  270. `android_url` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'android下载地址、',
  271. `ios_url` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ios下载地址',
  272. `android_version` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'android版本',
  273. `ios_version` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ios版本',
  274. `android_enable` tinyint unsigned NOT NULL DEFAULT '1' COMMENT 'android是否启用,1=启用;0=禁用',
  275. `ios_enable` tinyint unsigned NOT NULL DEFAULT '1' COMMENT 'ios是否启用,1=启用;0=禁用',
  276. `squad` int NOT NULL DEFAULT '1000' COMMENT '排序,降序',
  277. `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态,1=开放;2=隐藏',
  278. `icon_url` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '图标icon',
  279. `created_at` datetime DEFAULT NULL,
  280. `updated_at` datetime DEFAULT NULL,
  281. PRIMARY KEY (`id`) USING BTREE,
  282. UNIQUE KEY `UNX_uid` (`uid`) USING BTREE
  283. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='应用';
  284. INSERT INTO `ag_app` VALUES (1, 'ObNRb5', '抖窥', 'https://www.google.com', '', '1.0.0', '1.0.0', 0, 0, 1000, 2, '//test-chituma.oss-cn-hangzhou.aliyuncs.com/files/local/535534/AI1zQW5O.png', '2022-01-02 03:49:56', '2022-01-02 03:49:56');
  285. -- ----------------------------
  286. -- Table structure for ag_app_deduction_rule
  287. -- ----------------------------
  288. DROP TABLE IF EXISTS `ag_app_deduction_rule`;
  289. CREATE TABLE `ag_app_deduction_rule` (
  290. `id` int unsigned NOT NULL AUTO_INCREMENT,
  291. `deduction_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '扣量类型:cps,cpa',
  292. `deduction_rule` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '扣量规则:1=订单扣量;2=价格扣量',
  293. `app_uid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'app_uid',
  294. `deduction_price` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '扣量价格',
  295. `deduction_pro` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '扣量比例',
  296. `uid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  297. `deduction_method` tinyint unsigned DEFAULT '0' COMMENT '扣量方式:1=首单扣量\n\n;2=回充扣量',
  298. `jdata` json DEFAULT NULL COMMENT 'cps扣量规则',
  299. `created_at` datetime DEFAULT NULL,
  300. `updated_at` datetime DEFAULT NULL,
  301. PRIMARY KEY (`id`) USING BTREE
  302. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='扣量总规则表';
  303. -- ----------------------------
  304. -- Records of ag_app_deduction_rule
  305. -- ----------------------------
  306. INSERT INTO `ag_app_deduction_rule` VALUES (2, 'cpa', 0, 'eskhf', '', '20-1,20-2', 'Bq7dGJ', 1, NULL, '2021-12-03 03:51:25', '2021-12-03 03:51:25');
  307. INSERT INTO `ag_app_deduction_rule` VALUES (4, 'cps', 2, 'lbQz8E', '8-1000', '3-1', 'Nb3mqR', 1, '{\"deduction_price\": [{\"max_price\": \"1000\", \"min_price\": \"8\"}], \"deduction_number\": [{\"number\": \"3\", \"deduction\": \"1\"}]}', '2021-12-22 21:07:39', '2021-12-29 02:43:37');
  308. INSERT INTO `ag_app_deduction_rule` VALUES (5, 'cpa', 0, 'a809qX', '', '80', '2GY1GD', 1, NULL, '2021-12-22 21:30:34', '2021-12-22 21:31:04');
  309. INSERT INTO `ag_app_deduction_rule` VALUES (6, 'cpa', 0, 'lbQz8E', '', '3-1', 'zbmabp', 1, NULL, '2021-12-22 21:31:17', '2021-12-29 18:36:54');
  310. INSERT INTO `ag_app_deduction_rule` VALUES (7, 'cps', 2, 'lbQz8E', '20-222,333-44444', '2-2,5-1', 'Bqzpbg', 2, '{\"deduction_price\": [{\"max_price\": \"222\", \"min_price\": \"20\"}, {\"max_price\": \"44444\", \"min_price\": \"333\"}], \"deduction_number\": [{\"number\": \"2\", \"deduction\": \"2\"}, {\"number\": \"5\", \"deduction\": \"1\"}]}', '2021-12-28 01:00:56', '2021-12-31 03:18:18');
  311. -- ----------------------------
  312. -- Table structure for ag_balance_log
  313. -- ----------------------------
  314. DROP TABLE IF EXISTS `ag_balance_log`;
  315. CREATE TABLE `ag_balance_log` (
  316. `id` int unsigned NOT NULL AUTO_INCREMENT,
  317. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  318. `updated_at` datetime DEFAULT NULL,
  319. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '代理UID',
  320. `curr_balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当前余额,单位元,可以允许为负数,方便排查问题',
  321. `prev_balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次余额,单位元,可以允许为负数,方便排查问题',
  322. `diff_balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '两次差额(当前减去上次),单位元,可以为负数',
  323. `change_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '改变事件备注',
  324. `curr_frozen` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当前冻结资金,单元元',
  325. `prev_frozen` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次冻结资金,单位元',
  326. PRIMARY KEY (`id`) USING BTREE,
  327. KEY `INDX_agent_uid` (`agent_uid`) USING BTREE
  328. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='现金余额变动和冻结资金变动日志';
  329. -- ----------------------------
  330. -- Table structure for ag_cache
  331. -- ----------------------------
  332. DROP TABLE IF EXISTS `ag_cache`;
  333. CREATE TABLE `ag_cache` (
  334. `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  335. `value` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  336. `expiration` int NOT NULL,
  337. UNIQUE KEY `ag_cache_key_unique` (`key`) USING BTREE
  338. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  339. -- ----------------------------
  340. -- Records of ag_cache
  341. -- ----------------------------
  342. BEGIN;
  343. COMMIT;
  344. -- ----------------------------
  345. -- Table structure for ag_channel
  346. -- ----------------------------
  347. DROP TABLE IF EXISTS `ag_channel`;
  348. CREATE TABLE `ag_channel` (
  349. `id` int unsigned NOT NULL AUTO_INCREMENT,
  350. `uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'hash唯一ID',
  351. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '渠道名称',
  352. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '代理商',
  353. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '母包应用UID',
  354. `android_url` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'android下载地址',
  355. `ios_url` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ios下载地址',
  356. `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  357. `created_at` datetime DEFAULT NULL,
  358. `updated_at` datetime DEFAULT NULL,
  359. PRIMARY KEY (`id`) USING BTREE,
  360. UNIQUE KEY `UNQ_uid` (`uid`) USING BTREE,
  361. KEY `INDX_agent_uid` (`agent_uid`) USING BTREE
  362. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='渠道表';
  363. -- ----------------------------
  364. -- Table structure for ag_commission_log
  365. -- ----------------------------
  366. DROP TABLE IF EXISTS `ag_commission_log`;
  367. CREATE TABLE `ag_commission_log` (
  368. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  369. `created_at` datetime DEFAULT NULL,
  370. `updated_at` datetime DEFAULT NULL,
  371. `date` date DEFAULT NULL COMMENT '按Y-m-d日期记录',
  372. `channel_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '用户充钱的那个渠道UID',
  373. `root_agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin NOT NULL DEFAULT '' COMMENT '用户充钱那个渠道的代理UID',
  374. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '每层抽成的代理UID',
  375. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '母包应用UID',
  376. `order_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'APP应用内的订单编号',
  377. `order_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单实际金额',
  378. `commission_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提成金额',
  379. `commission_curr_ratio` smallint unsigned NOT NULL DEFAULT '0' COMMENT '当前agent_uid当时从order_money按此提成比例抽成',
  380. PRIMARY KEY (`id`) USING BTREE,
  381. KEY `INDX_date_agent` (`date`,`agent_uid`) USING BTREE COMMENT '计算某一个代理的单次提成金额'
  382. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='从渠道用户开始,每层代理的提成日志';
  383. -- ----------------------------
  384. -- Table structure for ag_config
  385. -- ----------------------------
  386. DROP TABLE IF EXISTS `ag_config`;
  387. CREATE TABLE `ag_config` (
  388. `id` int unsigned NOT NULL AUTO_INCREMENT,
  389. `created_at` timestamp NULL DEFAULT NULL,
  390. `updated_at` timestamp NULL DEFAULT NULL,
  391. `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名称',
  392. `sgroup` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组',
  393. `skey` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '键名',
  394. `svalue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '键值',
  395. `default_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '默认值',
  396. `remark` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '提示备注',
  397. `value_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'string' COMMENT '值类型',
  398. `tag_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'input' COMMENT '表单标签tag名,比如input, select, checkbox',
  399. `tag_attr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '表单标签扩展属性, mulit, readonly, disabled',
  400. `tag_check` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '表单标签检查,比如max:200|in:1,2,3',
  401. `tag_vlist` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标签值列表',
  402. `squad` int NOT NULL DEFAULT '1000' COMMENT '排序',
  403. PRIMARY KEY (`id`) USING BTREE,
  404. UNIQUE KEY `IDX_group_key` (`sgroup`,`skey`) USING BTREE
  405. ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统配置';
  406. -- ----------------------------
  407. -- Records of ag_config
  408. -- ----------------------------
  409. INSERT INTO `ag_config` VALUES (12, NULL, '2021-12-21 23:27:37', '后台名称', 'sys', 'web_name', '代理系统后台', '', '后台名称', 'string', 'input', '', '', '', 1000);
  410. INSERT INTO `ag_config` VALUES (13, NULL, '2021-12-27 01:50:07', '优惠订单(前几单不扣)', 'sys', 'preferential_order', '1', '', '优惠订单(前几单不扣)', 'string', 'input', '', '', '', 1000);
  411. INSERT INTO `ag_config` VALUES (14, NULL, '2021-12-22 16:17:26', '会员扣量设置开关', 'sys', 'user_deduction_switch', '1', '', '会员扣量设置开关', 'string', 'input', '', '', '', 1000);
  412. INSERT INTO `ag_config` VALUES (15, NULL, '2021-12-22 16:17:26', 'CPA扣量开关', 'sys', 'cpa_deduction_switch', '1', '', '', 'string', 'input', '', '', '', 1000);
  413. INSERT INTO `ag_config` VALUES (16, NULL, NULL, '提现最低金额', 'sys', 'withdraw_min_money', '1000', '', '', 'string', 'input', '', '', '', 1000);
  414. INSERT INTO `ag_config` VALUES (17, NULL, '2021-12-30 02:52:24', 'usdt汇率', 'sys', 'usdt_rate', '8.88', '', '', 'string', 'input', '', '', '', 1000);
  415. INSERT INTO `ag_config` VALUES (18, NULL, '2021-12-27 19:07:11', 'usdt地址', 'sys', 'usdt_address', 'ERC20,TRC20,BSC', '', '', 'string', 'input', '', '', '', 1000);
  416. INSERT INTO `ag_config` VALUES (19, NULL, '2021-12-24 21:56:20', '提现密码', 'sys', 'withdraw_pwd', '888888', '', '', 'string', 'input', '', '', '', 1000);
  417. INSERT INTO `ag_config` VALUES (20, '2021-12-09 22:12:09', '2021-12-09 22:12:09', 'servicese_link', 'sys', 'servicese_link', 'http://www.google.com', '', '', 'string', 'input', '', '', '', 1000);
  418. INSERT INTO `ag_config` VALUES (21, NULL, NULL, '优惠订单(前几单下载不扣)', 'sys', 'preferential_user', '1', '0', '优惠订单(前几单下载不扣)', 'string', 'input', '', '', '', 1000);
  419. INSERT INTO `ag_config` VALUES (23, NULL, '2021-12-28 03:37:33', 'usdt提现最低U', 'sys', 'withdraw_min_usdt', '100', '', '', 'string', 'input', '', '', '', 1000);
  420. -- ----------------------------
  421. -- Table structure for ag_failed_jobs
  422. -- ----------------------------
  423. DROP TABLE IF EXISTS `ag_failed_jobs`;
  424. CREATE TABLE `ag_failed_jobs` (
  425. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  426. `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  427. `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  428. `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  429. `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  430. `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  431. PRIMARY KEY (`id`) USING BTREE
  432. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  433. -- ----------------------------
  434. -- Table structure for ag_jobs
  435. -- ----------------------------
  436. DROP TABLE IF EXISTS `ag_jobs`;
  437. CREATE TABLE `ag_jobs` (
  438. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  439. `queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  440. `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  441. `attempts` tinyint unsigned NOT NULL,
  442. `reserved_at` int unsigned DEFAULT NULL,
  443. `available_at` int unsigned NOT NULL,
  444. `created_at` int unsigned NOT NULL,
  445. PRIMARY KEY (`id`) USING BTREE,
  446. KEY `ag_jobs_queue_index` (`queue`) USING BTREE
  447. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  448. -- ----------------------------
  449. -- Records of ag_jobs
  450. -- ----------------------------
  451. BEGIN;
  452. COMMIT;
  453. -- ----------------------------
  454. -- Table structure for ag_manager
  455. -- ----------------------------
  456. DROP TABLE IF EXISTS `ag_manager`;
  457. CREATE TABLE `ag_manager` (
  458. `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  459. `created_at` datetime DEFAULT NULL,
  460. `updated_at` datetime DEFAULT NULL,
  461. `manager_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '管理员ID',
  462. `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  463. `nick` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT ' 昵称',
  464. `locked_at` datetime DEFAULT NULL,
  465. `role_id` int NOT NULL DEFAULT '0' COMMENT '角色ID',
  466. `role_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色名称',
  467. `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码',
  468. `salt` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盐',
  469. `email` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邮箱',
  470. `login_at` datetime DEFAULT NULL COMMENT '最近一次登录时间',
  471. `otp_secret` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'OTP一次性密钥',
  472. PRIMARY KEY (`id`) USING BTREE,
  473. UNIQUE KEY `UNQ_manager_uid` (`manager_uid`) USING BTREE COMMENT '唯一UID'
  474. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理员';
  475. -- ----------------------------
  476. -- Records of ag_manager
  477. -- ----------------------------
  478. INSERT INTO `ag_manager` VALUES (1, '2021-11-19 06:15:03', '2022-01-02 03:47:00', 'ObNRb5', 'adminboss', '超管admin', NULL, 1, '超管', 'ea453ae708f545acd9e95335b152f3ea', 'cTYcEH', '', NULL, 'MYSS54JCU3CCQM44');
  479. INSERT INTO `ag_manager` VALUES (2, '2022-01-02 03:47:18', '2022-01-02 03:47:18', 'Bq7dGJ', 'sg_jim', 'sg_jim', NULL, 1, '超管', 'a4c4fa6ec7c62374c8619ddc3d5f01de', 'dDcybQ', '', NULL, 'JGOUTAJ2LSIR2WUD');
  480. INSERT INTO `ag_manager` VALUES (3, '2022-01-02 03:47:31', '2022-01-02 03:47:31', 'yq2nqr', 'sg_jony', 'sg_jony', NULL, 1, '超管', 'b5b9fd0fbfa5a6d20c1fe3edeb4ac100', 'FrV264', '', NULL, 'G3AXUABO5O5K36CO');
  481. INSERT INTO `ag_manager` VALUES (4, '2022-01-02 03:47:47', '2022-01-02 03:47:47', 'Nb3mqR', 'sg_peter', 'sg_peter', NULL, 1, '超管', '429056af5993cd437d37aa98be88d46b', '41JdJ4', '', NULL, '6JHXAS7GWR4IA6GF');
  482. INSERT INTO `ag_manager` VALUES (5, '2022-01-02 03:48:02', '2022-01-02 03:48:02', '2GY1GD', 'sg_json', 'sg_json', NULL, 1, '超管', '00ff5bb6af4d8099a74e1d2f04600cc4', 'ERPOCy', '', NULL, '6VKK5MTULHEFTK2Y');
  483. INSERT INTO `ag_manager` VALUES (6, '2022-01-02 03:48:13', '2022-01-02 03:48:13', 'zbmabp', 'sg_morry', 'sg_morry', NULL, 1, '超管', '090f86b816ecdb2aa14f3689d8019124', '90V64R', '', NULL, 'GHNA3EGOEENY5YOK');
  484. INSERT INTO `ag_manager` VALUES (7, '2022-01-02 03:48:23', '2022-01-02 03:48:23', 'Bqzpbg', 'sg_bill', 'sg_bill', NULL, 1, '超管', '00047f68e86269d492604ae19f2173ba', 'EK55Qj', '', NULL, 'CS7I4CLY25B6A4PE');
  485. -- ----------------------------
  486. -- Table structure for ag_manager_log
  487. -- ----------------------------
  488. DROP TABLE IF EXISTS `ag_manager_log`;
  489. CREATE TABLE `ag_manager_log` (
  490. `id` int unsigned NOT NULL AUTO_INCREMENT,
  491. `created_at` datetime DEFAULT NULL,
  492. `updated_at` datetime DEFAULT NULL,
  493. `manager_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '管理员id',
  494. `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '账号',
  495. `nick` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '昵称',
  496. `subject` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主题',
  497. `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '模块',
  498. `action` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '动作',
  499. `svalue` varchar(3600) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '关联操作值',
  500. `db_data` json DEFAULT NULL COMMENT '前后数据对比',
  501. `ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ipv4',
  502. `ip_address` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'ip地址解析名称',
  503. `ua` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  504. PRIMARY KEY (`id`) USING BTREE,
  505. KEY `INDX_username` (`username`) USING BTREE,
  506. KEY `INDX_module_action` (`module`,`action`) USING BTREE
  507. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理员操作日志';
  508. -- ----------------------------
  509. -- Table structure for ag_migrations
  510. -- ----------------------------
  511. DROP TABLE IF EXISTS `ag_migrations`;
  512. CREATE TABLE `ag_migrations` (
  513. `id` int unsigned NOT NULL AUTO_INCREMENT,
  514. `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  515. `batch` int NOT NULL,
  516. PRIMARY KEY (`id`) USING BTREE
  517. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  518. -- ----------------------------
  519. -- Records of ag_migrations
  520. -- ----------------------------
  521. INSERT INTO `ag_migrations` VALUES (1, '2014_10_12_000000_create_users_table', 1);
  522. INSERT INTO `ag_migrations` VALUES (2, '2014_10_12_100000_create_password_resets_table', 1);
  523. INSERT INTO `ag_migrations` VALUES (3, '2019_08_19_000000_create_failed_jobs_table', 1);
  524. INSERT INTO `ag_migrations` VALUES (4, '2020_05_26_130058_create_jobs_table', 1);
  525. INSERT INTO `ag_migrations` VALUES (5, '2020_05_26_130059_create_notifications_table', 1);
  526. INSERT INTO `ag_migrations` VALUES (6, '2020_05_26_130100_create_sessions_table', 1);
  527. INSERT INTO `ag_migrations` VALUES (7, '2020_05_26_130103_create_cache_table', 1);
  528. -- ----------------------------
  529. -- Table structure for ag_notifications
  530. -- ----------------------------
  531. DROP TABLE IF EXISTS `ag_notifications`;
  532. CREATE TABLE `ag_notifications` (
  533. `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  534. `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  535. `notifiable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  536. `notifiable_id` bigint unsigned NOT NULL,
  537. `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  538. `read_at` timestamp NULL DEFAULT NULL,
  539. `created_at` timestamp NULL DEFAULT NULL,
  540. `updated_at` timestamp NULL DEFAULT NULL,
  541. PRIMARY KEY (`id`) USING BTREE,
  542. KEY `ag_notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`) USING BTREE
  543. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  544. -- ----------------------------
  545. -- Records of ag_notifications
  546. -- ----------------------------
  547. BEGIN;
  548. COMMIT;
  549. -- ----------------------------
  550. -- Table structure for ag_password_resets
  551. -- ----------------------------
  552. DROP TABLE IF EXISTS `ag_password_resets`;
  553. CREATE TABLE `ag_password_resets` (
  554. `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  555. `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  556. `created_at` timestamp NULL DEFAULT NULL,
  557. KEY `ag_password_resets_email_index` (`email`) USING BTREE
  558. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  559. -- ----------------------------
  560. -- Records of ag_password_resets
  561. -- ----------------------------
  562. BEGIN;
  563. COMMIT;
  564. -- ----------------------------
  565. -- Table structure for ag_permission_resource
  566. -- ----------------------------
  567. DROP TABLE IF EXISTS `ag_permission_resource`;
  568. CREATE TABLE `ag_permission_resource` (
  569. `id` int unsigned NOT NULL AUTO_INCREMENT,
  570. `parent_id` int unsigned NOT NULL DEFAULT '0' COMMENT '父级id',
  571. `operate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作',
  572. `squad` int NOT NULL DEFAULT '1000' COMMENT '排序',
  573. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  574. PRIMARY KEY (`id`) USING BTREE,
  575. KEY `IDX_parent_id` (`parent_id`) USING BTREE
  576. ) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='权限资源';
  577. -- ----------------------------
  578. -- Records of ag_permission_resource
  579. -- ----------------------------
  580. BEGIN;
  581. COMMIT;
  582. -- ----------------------------
  583. -- Table structure for ag_permission_role
  584. -- ----------------------------
  585. DROP TABLE IF EXISTS `ag_permission_role`;
  586. CREATE TABLE `ag_permission_role` (
  587. `id` smallint unsigned NOT NULL AUTO_INCREMENT,
  588. `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  589. `permissions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '权限资源',
  590. `squad` smallint NOT NULL DEFAULT '1000' COMMENT '排序',
  591. `created_at` datetime DEFAULT NULL,
  592. `updated_at` datetime DEFAULT NULL,
  593. PRIMARY KEY (`id`) USING BTREE
  594. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='权限角色';
  595. -- ----------------------------
  596. -- Records of ag_permission_role
  597. -- ----------------------------
  598. INSERT INTO `ag_permission_role` VALUES (1, '超管', '-1', 1213, '2020-01-22 23:49:11', '2020-02-27 16:23:16');
  599. -- ----------------------------
  600. -- Table structure for ag_sessions
  601. -- ----------------------------
  602. DROP TABLE IF EXISTS `ag_sessions`;
  603. CREATE TABLE `ag_sessions` (
  604. `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  605. `user_id` bigint unsigned DEFAULT NULL,
  606. `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  607. `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  608. `payload` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  609. `last_activity` int NOT NULL,
  610. UNIQUE KEY `ag_sessions_id_unique` (`id`) USING BTREE
  611. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  612. -- ----------------------------
  613. -- Records of ag_sessions
  614. -- ----------------------------
  615. BEGIN;
  616. COMMIT;
  617. -- ----------------------------
  618. -- Table structure for ag_share_urls
  619. -- ----------------------------
  620. DROP TABLE IF EXISTS `ag_share_urls`;
  621. CREATE TABLE `ag_share_urls` (
  622. `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  623. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '母包应用uid',
  624. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标题',
  625. `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '落地页面',
  626. `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '封面',
  627. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态.1=开放;2=隐藏',
  628. `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  629. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  630. `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  631. PRIMARY KEY (`id`) USING BTREE
  632. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理分享url地址';
  633. -- ----------------------------
  634. -- Table structure for ag_statistics_active
  635. -- ----------------------------
  636. DROP TABLE IF EXISTS `ag_statistics_active`;
  637. CREATE TABLE `ag_statistics_active` (
  638. `id` int unsigned NOT NULL AUTO_INCREMENT,
  639. `created_at` datetime DEFAULT NULL,
  640. `updated_at` datetime DEFAULT NULL,
  641. `date` date DEFAULT NULL COMMENT '日期,Y-m-d',
  642. `total` int unsigned NOT NULL DEFAULT '0' COMMENT '总计',
  643. `android` int unsigned NOT NULL DEFAULT '0' COMMENT 'android设备',
  644. `ios` int unsigned NOT NULL DEFAULT '0' COMMENT 'ios设备',
  645. `h5` int unsigned NOT NULL DEFAULT '0' COMMENT 'h5设备',
  646. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '代理UID,空字符=官方',
  647. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '母包UID',
  648. `channel_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '渠道UID',
  649. PRIMARY KEY (`id`) USING BTREE,
  650. KEY `IDX_agent` (`date`,`agent_uid`) USING BTREE COMMENT '根据代理是否为空字符串,查询所有或者特定某1个代理数据'
  651. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='统计用户日活-所有和渠道维度';
  652. -- ----------------------------
  653. -- Table structure for ag_statistics_new_users
  654. -- ----------------------------
  655. DROP TABLE IF EXISTS `ag_statistics_new_users`;
  656. CREATE TABLE `ag_statistics_new_users` (
  657. `id` int unsigned NOT NULL AUTO_INCREMENT,
  658. `created_at` datetime DEFAULT NULL,
  659. `updated_at` datetime DEFAULT NULL,
  660. `date` date DEFAULT NULL COMMENT '日期,Y-m-d',
  661. `total` int unsigned NOT NULL DEFAULT '0' COMMENT '总计',
  662. `android` int unsigned NOT NULL DEFAULT '0' COMMENT 'android设备',
  663. `ios` int unsigned NOT NULL DEFAULT '0' COMMENT 'ios设备',
  664. `h5` int unsigned NOT NULL DEFAULT '0' COMMENT 'h5设备',
  665. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '代理UID,空字符串=官方',
  666. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '母包UID',
  667. `channel_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '渠道UID,空字符串=官方',
  668. `deduction_total` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的总计',
  669. `deduction_android` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的android设备',
  670. `deduction_ios` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的ios设备',
  671. `deduction_h5` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的h5设备',
  672. PRIMARY KEY (`id`) USING BTREE,
  673. KEY `IDX_agent` (`date`,`agent_uid`) USING BTREE COMMENT '根据代理是否为空字符串,查询所有或者特定某1个代理数据'
  674. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='统计新增用户, 记录所有以及渠道维度';
  675. -- ----------------------------
  676. -- Table structure for ag_statistics_pay
  677. -- ----------------------------
  678. DROP TABLE IF EXISTS `ag_statistics_pay`;
  679. CREATE TABLE `ag_statistics_pay` (
  680. `id` int unsigned NOT NULL AUTO_INCREMENT,
  681. `created_at` datetime DEFAULT NULL,
  682. `updated_at` datetime DEFAULT NULL,
  683. `date` date NOT NULL COMMENT '日期,Y-m-d',
  684. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '代理UID, 当空字符串=官方,null=所有',
  685. `mom_app_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '母包UID',
  686. `channel_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '渠道UID, 当空字符串=官方,null=所有',
  687. `order_total` int unsigned NOT NULL DEFAULT '0' COMMENT '订单总数量',
  688. `order_success` int unsigned NOT NULL DEFAULT '0' COMMENT '成功订单数',
  689. `order_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '失败订单数',
  690. `order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  691. `order_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单成功金额',
  692. `android_total` int unsigned NOT NULL DEFAULT '0' COMMENT 'android订单数',
  693. `android_success` int unsigned NOT NULL DEFAULT '0' COMMENT 'android成功订单数',
  694. `android_failed` int unsigned NOT NULL DEFAULT '0' COMMENT 'android失败订单数',
  695. `android_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'android总金额',
  696. `android_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'android成功订单金额',
  697. `ios_total` int unsigned NOT NULL DEFAULT '0' COMMENT 'ios订单数',
  698. `ios_success` int unsigned NOT NULL DEFAULT '0' COMMENT 'ios成功订单数',
  699. `ios_failed` int unsigned NOT NULL DEFAULT '0' COMMENT 'ios失败订单数',
  700. `ios_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'ios总金额',
  701. `ios_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'ios成功订单金额',
  702. `h5_total` int unsigned NOT NULL DEFAULT '0' COMMENT 'h5订单数',
  703. `h5_success` int unsigned NOT NULL DEFAULT '0' COMMENT 'h5成功订单数',
  704. `h5_failed` int unsigned NOT NULL DEFAULT '0' COMMENT 'h5失败订单数',
  705. `h5_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'h5总金额',
  706. `h5_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'h5成功订单金额',
  707. `deduction_total` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的总订单数',
  708. `deduction_success` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的成功订单数',
  709. `deduction_failed` int unsigned NOT NULL DEFAULT '0' COMMENT '渠道扣量后的失败单数',
  710. `deduction_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '渠道扣量后的总金额',
  711. `deduction_success_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '渠道扣量后的成功金额',
  712. PRIMARY KEY (`id`) USING BTREE,
  713. KEY `IDX_agent` (`date`,`agent_uid`) USING BTREE COMMENT '根据代理查询,查询所有或者某一个代理'
  714. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='统计支付相关,所有和渠道维度';
  715. -- ----------------------------
  716. -- Table structure for ag_withdrawal_log
  717. -- ----------------------------
  718. DROP TABLE IF EXISTS `ag_withdrawal_log`;
  719. CREATE TABLE `ag_withdrawal_log` (
  720. `id` int unsigned NOT NULL AUTO_INCREMENT,
  721. `uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'hash唯一ID',
  722. `created_at` datetime DEFAULT NULL,
  723. `updated_at` datetime DEFAULT NULL,
  724. `paid_at` datetime DEFAULT NULL COMMENT '打款时间',
  725. `status` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '状态1=拒绝;2=申请中;3=已打款;4=拒接并扣除',
  726. `agent_uid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '关联代理uid',
  727. `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '提现金额(元)',
  728. `before_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '提现前余额(元)',
  729. `after_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '提现后余额(元)',
  730. `bank_account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '卡号',
  731. `bank_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '持卡人姓名',
  732. `bank_mark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '开户行',
  733. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  734. `type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '1银行卡;2USTD;3支付宝',
  735. `ustd_network` char(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '充币网络',
  736. `ustd_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '充币地址',
  737. `alipay_account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付宝账号',
  738. `alipay_username` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付宝姓名',
  739. `usdt_rate` decimal(5,2) unsigned NOT NULL DEFAULT '1.00' COMMENT 'usdt汇率',
  740. PRIMARY KEY (`id`) USING BTREE,
  741. UNIQUE KEY `UNQ_uid` (`uid`) USING BTREE,
  742. KEY `INDX_agent_uid` (`agent_uid`) USING BTREE COMMENT '根据代理UID查'
  743. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提现记录';