smart_bow.sql 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : localhost_3306
  4. Source Server Version : 80020
  5. Source Host : localhost:3306
  6. Source Database : smart_bow
  7. Target Server Type : MYSQL
  8. Target Server Version : 80020
  9. File Encoding : 65001
  10. Date: 2022-12-02 23:32:20
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for admin_user
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `admin_user`;
  17. CREATE TABLE `admin_user` (
  18. `username` varchar(32) NOT NULL,
  19. `password` varchar(32) NOT NULL,
  20. `token` varchar(32) NOT NULL,
  21. PRIMARY KEY (`username`)
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  23. -- ----------------------------
  24. -- Table structure for game10_score
  25. -- ----------------------------
  26. DROP TABLE IF EXISTS `game10_score`;
  27. CREATE TABLE `game10_score` (
  28. `userID` int NOT NULL,
  29. `score` int NOT NULL,
  30. `update_time` timestamp NOT NULL,
  31. PRIMARY KEY (`userID`)
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  33. -- ----------------------------
  34. -- Table structure for game11_score
  35. -- ----------------------------
  36. DROP TABLE IF EXISTS `game11_score`;
  37. CREATE TABLE `game11_score` (
  38. `userID` int NOT NULL,
  39. `score` int NOT NULL,
  40. `update_time` timestamp NOT NULL,
  41. PRIMARY KEY (`userID`)
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  43. -- ----------------------------
  44. -- Table structure for game12_score
  45. -- ----------------------------
  46. DROP TABLE IF EXISTS `game12_score`;
  47. CREATE TABLE `game12_score` (
  48. `userID` int NOT NULL,
  49. `score` int NOT NULL,
  50. `update_time` timestamp NOT NULL,
  51. PRIMARY KEY (`userID`)
  52. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  53. -- ----------------------------
  54. -- Table structure for game9_score
  55. -- ----------------------------
  56. DROP TABLE IF EXISTS `game9_score`;
  57. CREATE TABLE `game9_score` (
  58. `userID` int NOT NULL,
  59. `score` int NOT NULL,
  60. `update_time` timestamp NOT NULL,
  61. PRIMARY KEY (`userID`)
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  63. -- ----------------------------
  64. -- Table structure for mac_663axis
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `mac_663axis`;
  67. CREATE TABLE `mac_663axis` (
  68. `mac` varchar(64) NOT NULL,
  69. `attitude` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  70. PRIMARY KEY (`mac`),
  71. UNIQUE KEY `mac` (`mac`) USING BTREE
  72. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  73. -- ----------------------------
  74. -- Table structure for mac_9axis
  75. -- ----------------------------
  76. DROP TABLE IF EXISTS `mac_9axis`;
  77. CREATE TABLE `mac_9axis` (
  78. `mac` varchar(64) NOT NULL,
  79. `attitude` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  80. PRIMARY KEY (`mac`),
  81. UNIQUE KEY `mac` (`mac`) USING BTREE
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  83. -- ----------------------------
  84. -- Table structure for mac_calibrate
  85. -- ----------------------------
  86. DROP TABLE IF EXISTS `mac_calibrate`;
  87. CREATE TABLE `mac_calibrate` (
  88. `mac` varchar(64) NOT NULL,
  89. `gyr` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  90. `mag` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  91. PRIMARY KEY (`mac`),
  92. UNIQUE KEY `mac` (`mac`) USING BTREE
  93. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  94. -- ----------------------------
  95. -- Table structure for room_game_record
  96. -- ----------------------------
  97. DROP TABLE IF EXISTS `room_game_record`;
  98. CREATE TABLE `room_game_record` (
  99. `roomKey` varchar(32) NOT NULL,
  100. `gameType` int NOT NULL,
  101. `p1ID` int NOT NULL,
  102. `p2ID` int NOT NULL,
  103. `gameRes` int NOT NULL,
  104. `settleTime` bigint NOT NULL,
  105. `playerIDSeq` varchar(32) NOT NULL,
  106. PRIMARY KEY (`roomKey`)
  107. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  108. -- ----------------------------
  109. -- Table structure for sb_log
  110. -- ----------------------------
  111. DROP TABLE IF EXISTS `sb_log`;
  112. CREATE TABLE `sb_log` (
  113. `id` int NOT NULL AUTO_INCREMENT,
  114. `uid` int NOT NULL,
  115. `time` timestamp NOT NULL,
  116. `tag` varchar(255) NOT NULL,
  117. `info` varchar(1024) NOT NULL,
  118. PRIMARY KEY (`id`)
  119. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  120. -- ----------------------------
  121. -- Table structure for user_day_active
  122. -- ----------------------------
  123. DROP TABLE IF EXISTS `user_day_active`;
  124. CREATE TABLE `user_day_active` (
  125. `id` int NOT NULL,
  126. `date` date NOT NULL,
  127. PRIMARY KEY (`id`,`date`)
  128. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  129. -- ----------------------------
  130. -- Table structure for user_friend
  131. -- ----------------------------
  132. DROP TABLE IF EXISTS `user_friend`;
  133. CREATE TABLE `user_friend` (
  134. `myID` int NOT NULL,
  135. `friendID` int NOT NULL,
  136. PRIMARY KEY (`myID`,`friendID`)
  137. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  138. -- ----------------------------
  139. -- Table structure for user_friend_request
  140. -- ----------------------------
  141. DROP TABLE IF EXISTS `user_friend_request`;
  142. CREATE TABLE `user_friend_request` (
  143. `myID` int NOT NULL,
  144. `otherID` int NOT NULL,
  145. PRIMARY KEY (`myID`,`otherID`)
  146. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  147. -- ----------------------------
  148. -- Table structure for user_game_record
  149. -- ----------------------------
  150. DROP TABLE IF EXISTS `user_game_record`;
  151. CREATE TABLE `user_game_record` (
  152. `userID` int NOT NULL,
  153. `dateTime` datetime NOT NULL,
  154. `gameType` int NOT NULL,
  155. `duration` int NOT NULL,
  156. PRIMARY KEY (`userID`,`dateTime`),
  157. KEY `userID` (`userID`) USING BTREE
  158. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  159. -- ----------------------------
  160. -- Table structure for user_info
  161. -- ----------------------------
  162. DROP TABLE IF EXISTS `user_info`;
  163. CREATE TABLE `user_info` (
  164. `id` int NOT NULL,
  165. `avatarID` int NOT NULL,
  166. `nickname` varchar(16) NOT NULL,
  167. `gender` int NOT NULL,
  168. `phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  169. `birthday` varchar(10) NOT NULL,
  170. `country` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  171. `state` varchar(10) NOT NULL,
  172. `city` varchar(10) NOT NULL,
  173. `integral` int NOT NULL,
  174. `coin` int NOT NULL,
  175. `diamond` int NOT NULL,
  176. `mac` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  177. `bagList` varchar(2048) NOT NULL,
  178. `deviceList` varchar(2048) NOT NULL,
  179. `timeLimitGameScores` varchar(255) NOT NULL,
  180. `challengeLevels` varchar(255) NOT NULL,
  181. `offlineTime` bigint NOT NULL DEFAULT '0',
  182. `guideRecord` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '占位表示对应的新手引导是否完成',
  183. PRIMARY KEY (`id`)
  184. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  185. -- ----------------------------
  186. -- Table structure for user_login
  187. -- ----------------------------
  188. DROP TABLE IF EXISTS `user_login`;
  189. CREATE TABLE `user_login` (
  190. `id` int NOT NULL AUTO_INCREMENT,
  191. `username` varchar(32) NOT NULL,
  192. `password` varchar(32) NOT NULL,
  193. `token` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  194. `token_timeout` bigint NOT NULL,
  195. PRIMARY KEY (`id`),
  196. UNIQUE KEY `username` (`username`) USING BTREE,
  197. UNIQUE KEY `id` (`id`) USING BTREE
  198. ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;