update_20210308_mp.sql 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ####################################### MP买量数据源 ##########################################
  2. DROP TABLE IF EXISTS `mp_conf_ext`;
  3. CREATE TABLE `mp_conf_ext` (
  4. `conf_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配置ID',
  5. `is_advertiser` tinyint(2) UNSIGNED NOT NULL DEFAULT '1' COMMENT '是否广告主 1否 2是',
  6. `create_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
  7. `update_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '修改时间',
  8. KEY `mce_confid_index` (`conf_id`) USING BTREE,
  9. KEY `mce_advertiser_index` (`is_advertiser`) USING BTREE
  10. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='账号扩展表';
  11. DROP TABLE IF EXISTS `mp_conf_agent`;
  12. CREATE TABLE `mp_conf_agent` (
  13. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  14. `conf_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配置ID',
  15. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  16. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  17. `advertiser_conf_id` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '关联广告主配置ID',
  18. `create_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
  19. `update_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '修改时间',
  20. PRIMARY KEY (`id`) USING BTREE,
  21. KEY `mce_confid_index` (`conf_id`) USING BTREE,
  22. KEY `mce_app_index` (`app_id`) USING BTREE,
  23. KEY `mce_agent_index` (`agent_id`) USING BTREE
  24. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='账号渠道表';
  25. DROP TABLE IF EXISTS `mp_ad_source`;
  26. CREATE TABLE `mp_ad_source` (
  27. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  28. `conf_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配置ID',
  29. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  30. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  31. `type` varchar(32) NOT NULL DEFAULT '' COMMENT '行为源类型',
  32. `name` varchar(32) NOT NULL DEFAULT '' COMMENT '行为源名称',
  33. `description` varchar(128) NOT NULL DEFAULT '' COMMENT '描述',
  34. `advertiser_conf_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '关联广告主配置ID',
  35. `source_id` varchar(32) NOT NULL DEFAULT '' COMMENT '数据源ID',
  36. `create_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
  37. `update_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '修改时间',
  38. PRIMARY KEY (`id`) USING BTREE,
  39. KEY `mas_conf_type_conf_index` (`conf_id`, `agent_id`, `type`, `advertiser_conf_id`) USING BTREE
  40. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='MP买量广告账号数据源';
  41. DROP TABLE IF EXISTS `h_mpad_report_log`;
  42. CREATE TABLE `h_mpad_report_log` (
  43. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  44. `agent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '渠道ID',
  45. `mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  46. `app_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
  47. `mg_mem_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家游戏ID',
  48. `server_id` varchar(64) NOT NULL DEFAULT '' COMMENT '区服ID',
  49. `role_id` varchar(64) NOT NULL DEFAULT '' COMMENT '角色ID',
  50. `advertiser_app_id` varchar(32) NOT NULL DEFAULT '' COMMENT '广告账号APPID',
  51. `source_id` varchar(32) NOT NULL DEFAULT '' COMMENT '数据源ID',
  52. `url` varchar(128) NOT NULL DEFAULT '' COMMENT '转化行为发生页面的URL',
  53. `action_type` varchar(32) NOT NULL DEFAULT '' COMMENT '预定义的行为类型',
  54. `action_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '行为发生时,客户端的时间点',
  55. `wechat_app_id` varchar(32) NOT NULL DEFAULT '' COMMENT '转化应用APPID',
  56. `wechat_openid` varchar(32) NOT NULL DEFAULT '' COMMENT '转化应用openid',
  57. `action_param_value` varchar(32) NOT NULL DEFAULT '' COMMENT '转化参数值',
  58. `action_param_source` varchar(32) NOT NULL DEFAULT '' COMMENT '转化数据发生的渠道: 1)Biz,代表公众号内各种服务或网页 2)Web,代表非公众号的其他渠道',
  59. `action_param_claim_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '归因方式 0:按点击行为归因 1:按关注行为归因',
  60. `create_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
  61. PRIMARY KEY (`id`) USING BTREE,
  62. KEY `mrl_memid_index` (`mem_id`) USING BTREE,
  63. KEY `mrl_appid_index` (`app_id`) USING BTREE,
  64. KEY `mrl_mgmemid_index` (`mg_mem_id`) USING BTREE,
  65. KEY `mrl_advertiserappid_index` (`advertiser_app_id`) USING BTREE,
  66. KEY `mrl_sourceid_index` (`source_id`) USING BTREE,
  67. KEY `mrl_actiontype_index` (`action_type`) USING BTREE
  68. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='回传记录表';