V4.4.sql 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. -- 2020-07-06 10:00
  2. -- 陪玩游戏配置表
  3. CREATE TABLE `friendship`.`play_game_config` (
  4. `id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  5. `game_cover` varchar(256) NULL COMMENT '游戏封面',
  6. `game_name` varchar(16) NULL COMMENT '游戏名称',
  7. `create_time` timestamp(0) NULL COMMENT '创建时间',
  8. `status` tinyint(2) NULL COMMENT '状态',
  9. PRIMARY KEY (`id`)
  10. ) ENGINE = InnoDB AUTO_INCREMENT = 10001000 COMMENT = '系统技能游戏配置表';
  11. -- 陪玩师注册表
  12. CREATE TABLE `friendship`.`play_user_registered` (
  13. `id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  14. `user_id` bigint(20) NULL COMMENT '用户id',
  15. `game_id` bigint(10) NULL COMMENT '认证的游戏id',
  16. `user_game_screen_shot` varchar(256) NULL COMMENT '用户游戏段位截图',
  17. `user_game_level` varchar(32) NULL COMMENT '用户游戏段位',
  18. `user_game_image_status` tinyint(2) NULL COMMENT '用户本人形象资料审核状态',
  19. `create_time` timestamp(0) NULL COMMENT '申请时间',
  20. `update_time` timestamp(0) NULL COMMENT '更新时间',
  21. `verify_status` tinyint(2) NULL COMMENT '审核状态',
  22. `service_status` tinyint(2) NULL COMMENT '服务状态(接单中/暂停接单)',
  23. `service_title` varchar(32) NULL COMMENT '服务标题',
  24. `price` integer(10) NULL COMMENT '游戏价格/局',
  25. `game_cover` varchar(255) NULL COMMENT '技能封面图',
  26. PRIMARY KEY (`id`)
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 10001001 COMMENT = '陪玩师认证信息表';
  28. -- 陪玩订单表
  29. CREATE TABLE `friendship`.`play_orders` (
  30. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  31. `user_id` bigint(20) NULL COMMENT '用户id',
  32. `game_id` bigint(10) NULL COMMENT '陪玩的游戏id',
  33. `play_user_id` bigint(20) NULL COMMENT '陪玩师id',
  34. `service_start_time` timestamp(0) NULL COMMENT '陪玩开始时间',
  35. `service_end_time` timestamp(0) NULL COMMENT '陪玩结束时间',
  36. `number_of_board` int(4) NULL COMMENT '游戏局数',
  37. `ramark` varchar(128) NULL COMMENT '备注信息',
  38. `total_beans` int(10) NULL COMMENT '所需U豆数',
  39. `status` tinyint(2) NULL COMMENT '订单状态',
  40. PRIMARY KEY (`id`)
  41. ) ENGINE = InnoDB AUTO_INCREMENT = 10001100 COMMENT = '陪玩订单表';
  42. -- 陪玩用户形象卡
  43. CREATE TABLE `friendship`.`play_user_image_card` (
  44. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '形象卡id',
  45. `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
  46. `status` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
  47. `type` tinyint(4) NULL DEFAULT NULL COMMENT '类型',
  48. `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
  49. `verify_date` timestamp(0) NULL DEFAULT NULL COMMENT '审核时间',
  50. `verify_user_id` bigint(20) NULL DEFAULT NULL COMMENT '审核人id',
  51. `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
  52. `is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '视频是否撑满全屏',
  53. PRIMARY KEY (`id`) USING BTREE,
  54. INDEX `idx_user_id`(`user_id`, `id`, `type`, `is_fill`) USING BTREE COMMENT '用户id创建索引'
  55. ) ENGINE = InnoDB AUTO_INCREMENT = 100100540 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '陪玩用户形象卡数据表\n' ROW_FORMAT = Dynamic;
  56. -- 陪玩用户图片形象卡
  57. CREATE TABLE `friendship`.`play_user_image_card_pictures` (
  58. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  59. `image_card_id` bigint(20) NOT NULL COMMENT '形象卡id',
  60. `user_id` bigint(20) NOT NULL COMMENT '用户id',
  61. `src` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'url地址',
  62. `status` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
  63. `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
  64. `seq` int(10) NULL DEFAULT NULL COMMENT '序号',
  65. `verify_date` timestamp(0) NULL DEFAULT NULL COMMENT '审核时间',
  66. `verify_user_id` bigint(20) NULL DEFAULT NULL COMMENT '审核人id',
  67. `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
  68. PRIMARY KEY (`id`) USING BTREE,
  69. UNIQUE INDEX `userIdSeq`(`user_id`, `seq`) USING BTREE COMMENT '用户id序号创建索引'
  70. ) ENGINE = InnoDB AUTO_INCREMENT = 350 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '陪玩用户形象卡照片数据表\n' ROW_FORMAT = Dynamic;
  71. -- 陪玩用户视频形象卡
  72. CREATE TABLE `friendship`.`play_user_image_card_video` (
  73. `image_card_id` bigint(20) NOT NULL COMMENT '形象卡id',
  74. `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
  75. `src` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
  76. `status` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
  77. `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
  78. `seq` int(10) NULL DEFAULT NULL COMMENT '序号',
  79. `cover_image_src` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面地址',
  80. `verify_date` timestamp(0) NULL DEFAULT NULL COMMENT '审核时间',
  81. `verify_user_id` bigint(20) NULL DEFAULT NULL COMMENT '审核人id',
  82. `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '更新时间',
  83. PRIMARY KEY (`image_card_id`) USING BTREE
  84. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '陪玩用户视频形象卡' ROW_FORMAT = Dynamic;
  85. -- 房间信息
  86. CREATE TABLE `friendship`.`live_room` (
  87. `id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  88. `user_id` bigint(20) NULL COMMENT '用户',
  89. `room_id` bigint(20) NULL COMMENT '房间号',
  90. `room_title` varchar(126) NULL COMMENT '房间标题',
  91. `recommended_location` tinyint(2) NULL COMMENT '房间推荐位置',
  92. `live_status` tinyint(2) NULL COMMENT '直播状态',
  93. `create_time` timestamp(0) NULL COMMENT '创建时间',
  94. PRIMARY KEY (`id`)
  95. ) ENGINE = InnoDB AUTO_INCREMENT = 10001000 COMMENT = '房间信息';