V4.9.sql 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. -- 举报相关信息表
  2. CREATE TABLE `friendship`.`report_and_appeal` (
  3. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  4. `target_id` bigint(20) NULL COMMENT '目标id',
  5. `target_name` varchar(144) NULL COMMENT '目标名',
  6. `report_obj` tinyint(2) NULL COMMENT '举报对象:0用户,1:群聊房间,2:语音房',
  7. `report_type` varchar(64) NULL COMMENT '举报类型',
  8. `report_img_urls` varchar(512) NULL COMMENT '举报图片地址',
  9. `report_des` varchar(255) NULL COMMENT '举报描述',
  10. `report_user_id` bigint(20) NULL COMMENT '举报人id',
  11. `report_time` timestamp(0) NULL COMMENT '举报时间',
  12. `report_status` tinyint(2) NULL COMMENT '举报状态',
  13. `appeal_img_urls` varchar(512) NULL COMMENT '申诉图片地址',
  14. `appeal_des` varchar(255) NULL COMMENT '申诉描述',
  15. `appeal_time` timestamp(0) NULL COMMENT '申诉时间',
  16. `appeal_status` tinyint(2) NULL COMMENT '申诉状态',
  17. `appeal_count` integer(1) NULL COMMENT '申诉次数',
  18. PRIMARY KEY (`id`)
  19. ) ENGINE = InnoDB AUTO_INCREMENT = 10101011 COMMENT = '举报申诉表';
  20. -- 举报申诉历史日志表
  21. CREATE TABLE `friendship`.`report_and_appeal_history` (
  22. `id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
  23. `report_id` bigint(20) NULL COMMENT '举报记录id',
  24. `time` timestamp(0) NULL COMMENT '操作时间',
  25. `des` varchar(144) NULL COMMENT '描述',
  26. PRIMARY KEY (`id`)
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 10001011 COMMENT = '举报申诉历史日志表';
  28. -- ios充值白名单
  29. CREATE TABLE `friendship`.`ios_charge_white_user` (
  30. `id` bigint(10) NOT NULL AUTO_INCREMENT,
  31. `user_id` bigint(20) NOT NULL COMMENT '用户id',
  32. `create_time` timestamp(0) NULL COMMENT '创建时间',
  33. PRIMARY KEY (`id`)
  34. ) COMMENT = 'ios充值白名单,不受充值的限制';
  35. -- ios充值黑名单
  36. CREATE TABLE `friendship`.`ios_charge_black_user` (
  37. `id` bigint(10) NOT NULL AUTO_INCREMENT,
  38. `user_id` bigint(20) NOT NULL COMMENT '用户id',
  39. `create_time` timestamp(0) NULL COMMENT '创建时间',
  40. PRIMARY KEY (`id`)
  41. ) COMMENT = 'ios充值黑名单,受充值的限制';
  42. -- ios设备充值黑名单
  43. CREATE TABLE `friendship`.`ios_charge_black_device` (
  44. `id` bigint(10) NOT NULL AUTO_INCREMENT,
  45. `device_token` varchar(64) NOT NULL COMMENT '用户设备token',
  46. `create_time` timestamp(0) NULL COMMENT '创建时间',
  47. PRIMARY KEY (`id`)
  48. ) COMMENT = 'ios充值设备黑名单,受充值的限制';
  49. -- 用户异常行为记录表
  50. CREATE TABLE `friendship`.`ios_user_exception_history` (
  51. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  52. `user_id` bigint(20) NULL COMMENT '用户id',
  53. `user_exception_des` varchar(64) NULL COMMENT '用户异常行为',
  54. `create_time` timestamp(0) NULL,
  55. PRIMARY KEY (`id`)
  56. ) ENGINE = InnoDB AUTO_INCREMENT = 1000010;
  57. ) ENGINE = InnoDB AUTO_INCREMENT = 1000010;
  58. --用户权限表
  59. CREATE TABLE `friendship`.`user_permissions` (
  60. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  61. `userId` bigint(20) NOT NULL COMMENT '用户id',
  62. `private_chat` tinyint(2) NULL DEFAULT 0 COMMENT '私聊',
  63. `recommend_dynamics` tinyint(2) NULL DEFAULT 0 COMMENT '推荐的动态列表',
  64. `other_user_home_page` tinyint(2) NULL DEFAULT 0 COMMENT '其他用户首页',
  65. `works` tinyint(2) NULL DEFAULT 0 COMMENT '语音心情页',
  66. `topic` tinyint(2) NULL DEFAULT 0 COMMENT '话题',
  67. `send_gift` tinyint(2) NULL DEFAULT 0 COMMENT '送礼',
  68. `create_order` tinyint(2) NULL DEFAULT 0 COMMENT '下单',
  69. `live_room` tinyint(2) NULL DEFAULT 0 COMMENT '直播间',
  70. PRIMARY KEY (`id`)
  71. ) ENGINE = InnoDB AUTO_INCREMENT = 10011101 COMMENT = '用户权限表';
  72. -- 用户日充值表
  73. CREATE TABLE `friendship`.`user_daily_charge_count` (
  74. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  75. `user_id` bigint(20) NULL COMMENT '用户id',
  76. `date` varchar(10) NULL COMMENT '日期字符串',
  77. `charge_total` integer(4) NULL COMMENT '充值金额',
  78. PRIMARY KEY (`id`)
  79. ) ENGINE = InnoDB AUTO_INCREMENT = 10000100 COMMENT = '用户日充值记录表';
  80. -- 2020-10-15 14:54 申诉表
  81. CREATE TABLE `friendship`.`appeal` (
  82. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  83. `report_timestamp` bigint(0) NOT NULL COMMENT '举报记录的时间戳',
  84. `appeal_img_urls` varchar(512) NOT NULL COMMENT '申诉的图片',
  85. `appeal_des` varchar(255) NULL COMMENT '申诉描述',
  86. `appeal_user_id` bigint(20) NULL COMMENT '申诉用户id',
  87. `appeal_time` timestamp(0) NULL COMMENT '申诉时间',
  88. `appeal_status` tinyint(2) NULL COMMENT '申诉状态',
  89. `appeal_count` int(2) NULL DEFAULT 0 COMMENT '申诉次数',
  90. PRIMARY KEY (`id`)
  91. ) ENGINE = InnoDB AUTO_INCREMENT = 10010011 COMMENT = '申诉表';