V4.7.sql 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. -- 2020-08-19 动态评论表
  2. CREATE TABLE `friendship`.`dynamic_comment` (
  3. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  4. `dynamic_id` bigint(20) NOT NULL COMMENT '动态id',
  5. `user_id` bigint(20) NULL COMMENT '评论的用户id',
  6. `content` varchar(140) NULL COMMENT '评论的内容',
  7. `create_time` timestamp(0) NULL COMMENT '创建时间',
  8. PRIMARY KEY (`id`)
  9. ) COMMENT = '动态评论表';
  10. -- 2020-08-19 动态评论点赞表
  11. CREATE TABLE `friendship`.`dynamic_comment_like_detail` (
  12. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  13. `dynamic_comment_id` bigint(20) NULL COMMENT '动态评论id',
  14. `user_id` bigint(20) NULL COMMENT '用户id',
  15. `create_time` timestamp(0) NULL COMMENT '点赞时间',
  16. PRIMARY KEY (`id`)
  17. ) COMMENT = '动态评论点赞表';
  18. -- 工会
  19. CREATE TABLE `friendship`.`club` (
  20. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '工会id',
  21. `user_id` bigint(20) NOT NULL COMMENT '会长id',
  22. `club_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工会名字',
  23. `wechat_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信名字',
  24. `club_des` varchar(140) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工会介绍',
  25. `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
  26. `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
  27. `verify_user_id` bigint(20) NULL DEFAULT NULL COMMENT '审核用户id',
  28. `verify_time` timestamp(0) NULL DEFAULT NULL COMMENT '审核时间',
  29. `status` tinyint(2) NULL DEFAULT NULL COMMENT '状态',
  30. `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'logo地址',
  31. `code` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邀请码',
  32. PRIMARY KEY (`id`) USING BTREE
  33. ) ENGINE = InnoDB AUTO_INCREMENT = 10000000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工会' ROW_FORMAT = Dynamic;
  34. -- 工会成员
  35. CREATE TABLE `friendship`.`club_user` (
  36. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  37. `club_id` bigint(20) NULL COMMENT '工会id',
  38. `user_id` bigint(20) NULL COMMENT '用户id',
  39. `request_join_time` timestamp(0) NULL COMMENT '申请加入的时间',
  40. `refuse_time` timestamp(0) NULL COMMENT '拒绝时间',
  41. `pass_time` timestamp(0) NULL COMMENT '审核通过时间',
  42. `status` tinyint(2) NULL COMMENT '状态',
  43. `out_club_time` timestamp(0) NULL COMMENT '退出工会时间',
  44. PRIMARY KEY (`id`)
  45. ) ENGINE = InnoDB AUTO_INCREMENT = 10001000;
  46. -- 工会账户
  47. CREATE TABLE `friendship`.`club_account` (
  48. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  49. `club_id` bigint(20) NULL DEFAULT NULL COMMENT '工会id',
  50. `income_total` double(10, 2) NULL DEFAULT NULL COMMENT '总收益(单位元)',
  51. `with_draw_total` double(10, 2) NULL DEFAULT NULL COMMENT '总提现(单位元)',
  52. `balance` double(10, 2) NULL DEFAULT NULL COMMENT '余额(单位元)',
  53. `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更细腻时间',
  54. PRIMARY KEY (`id`) USING BTREE
  55. ) ENGINE = InnoDB AUTO_INCREMENT = 10001000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  56. -- 工会账户详情表
  57. CREATE TABLE `friendship`.`club_account_detail` (
  58. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  59. `club_id` bigint(20) NULL DEFAULT NULL COMMENT '工会id',
  60. `user_id` bigint(20) NULL DEFAULT NULL COMMENT '获取收入的用户id',
  61. `trade_beans` int(10) NULL DEFAULT 0 COMMENT '交易豆子',
  62. `before_balance` double(20, 2) NULL DEFAULT 0.00 COMMENT '交易前余额',
  63. `trade_money` double(10, 2) NULL DEFAULT 0.00 COMMENT '交易金额',
  64. `after_balance` double(20, 2) NULL DEFAULT 0.00 COMMENT '交易后的余额',
  65. `create_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  66. `des` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  67. `type` tinyint(2) NULL DEFAULT NULL COMMENT '类型',
  68. PRIMARY KEY (`id`) USING BTREE
  69. ) ENGINE = InnoDB AUTO_INCREMENT = 24714 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工会账户详情表' ROW_FORMAT = Dynamic;
  70. ) ENGINE = InnoDB AUTO_INCREMENT = 24714 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工会账户详情表' ROW_FORMAT = Dynamic;
  71. -- 2020-08-24 收集头条监测信息
  72. CREATE TABLE `friendship`.`byte_dance_monitoring` (
  73. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  74. `aid` varchar(64) NULL COMMENT '广告计划id',
  75. `aid_name` varchar(64) NULL COMMENT '广告计划名称',
  76. `advertiser_id` varchar(64) NULL COMMENT '广告主id',
  77. `cid` varchar(64) NULL COMMENT '广告创意 id,长整型',
  78. `cid_name` varchar(64) NULL COMMENT '广告创意名称',
  79. `campaign_id` varchar(64) NULL COMMENT '广告组 id',
  80. `campaign_name` varchar(64) NULL COMMENT '广告组名称',
  81. `imei` varchar(64) NULL COMMENT '安卓的设备 ID 的 md5 摘要,32位',
  82. `idfa` varchar(64) NULL COMMENT 'IOS 6+的设备id字段,32位',
  83. `androidid` varchar(64) NULL COMMENT '安卓id原值的md5,32位',
  84. `oaid` varchar(64) NULL COMMENT 'Android Q及更高版本的设备号,32位',
  85. `os` varchar(64) NULL COMMENT '操作系统平台安卓:0,IOS:1,其他:3',
  86. `ip` varchar(64) NULL COMMENT 'ip',
  87. `ua` varchar(64) NULL COMMENT 'ua',
  88. `ts` varchar(64) NULL COMMENT '客户端发生广告点击事件的时间,以毫秒为单位时间戳',
  89. `callback_url` varchar(140) NULL COMMENT '直接把调用事件回传接口的url生成出来,广告主可以直接使用',
  90. `model` varchar(64) NULL COMMENT '手机型号代码',
  91. PRIMARY KEY (`id`)
  92. )COMMENT = '头条监测信息表';
  93. -- 2020-08-27 17:27 闯奇排重接口接收数据
  94. CREATE TABLE `friendship`.`ad_chuangqi` (
  95. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  96. `oaid` varchar(64) NULL COMMENT 'Android Q及更高版本的设备号,32位',
  97. `imei` varchar(64) NULL COMMENT '安卓的设备 ID 的 md5 摘要,32位',
  98. `idfa` varchar(64) NULL COMMENT 'IOS 6+的设备id字段,32位',
  99. `androidid` varchar(64) NULL COMMENT '安卓id原值的md5,32位',
  100. `create_time` timestamp(0) NULL COMMENT '创建时间',
  101. PRIMARY KEY (`id`)
  102. )COMMENT = '闯奇排重接口接收数据';
  103. -- 2020-08-31 16:22 广告推广用户的设备信息
  104. CREATE TABLE `friendship`.`advert_promote_user_device` (
  105. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  106. `a_id` bigint(20) NULL COMMENT '广告组ID',
  107. `d_id` bigint(20) NULL COMMENT '广告计划ID',
  108. `track_id` bigint(20) NULL COMMENT 'b站用于追踪来源广告的追 踪ID',
  109. `imei` varchar(64) NULL COMMENT 'imei',
  110. `oaid` varchar(64) NULL COMMENT 'oaid',
  111. `idfa` varchar(64) NULL COMMENT 'IOS 6+的设备id字段,32位',
  112. `android_id` varchar(64) NULL COMMENT '安卓id原值的md5,32位',
  113. `os` tinyint(2) NULL COMMENT '操作系统平台安卓:0,IOS:1,其他:3',
  114. `ip` varchar(64) NULL COMMENT '设备ip地址',
  115. `ad_channel` tinyint(2) NULL COMMENT '广告渠道',
  116. `create_time` timestamp(0) NULL COMMENT '创建时间',
  117. `callback` varchar(400) null comment 'callbackurl',
  118. PRIMARY KEY (`id`)
  119. )COMMENT = '广告推广用户的设备信息';
  120. -- 2020-09-02 14:43 用户绑定的微信信息表
  121. CREATE TABLE `friendship`.`user_wechat_info` (
  122. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  123. `user_id` bigint(20) NULL COMMENT '用户id',
  124. `open_id` bigint(20) NULL COMMENT '微信openid',
  125. `wx_nick_name` varchar(32) NULL COMMENT '微信昵称',
  126. `wx_head_img` varchar(255) NULL COMMENT '微信头像',
  127. `create_time` timestamp(0) NULL COMMENT '创建时间',
  128. PRIMARY KEY (`id`)
  129. )COMMENT = '用户绑定的微信信息表';
  130. -- 2020-09-02 18:09 提现审核日志
  131. CREATE TABLE `friendship`.`with_draw_verify_log` (
  132. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  133. `order_id` bigint(20) NULL COMMENT '订单id',
  134. `operating_time` timestamp(0) NULL COMMENT '操作时间',
  135. `des` varchar(120) NULL COMMENT '状态说明',
  136. PRIMARY KEY (`id`)
  137. )COMMENT = '提现审核日志';