1. /*
    2. Navicat MySQL Data Transfer
    3. Source Server : qq
    4. Source Server Type : MySQL
    5. Source Server Version : 80016
    6. Source Host : localhost:3306
    7. Source Schema : qqmysql
    8. Target Server Type : MySQL
    9. Target Server Version : 80016
    10. File Encoding : 65001
    11. Date: 12/05/2022 16:46:30
    12. */
    13. SET NAMES utf8mb4;
    14. SET FOREIGN_KEY_CHECKS = 0;
    15. -- ----------------------------
    16. -- Table structure for anam
    17. -- ----------------------------
    18. DROP TABLE IF EXISTS `anam`;
    19. CREATE TABLE `anam` (
    20. `id` int(11) NOT NULL AUTO_INCREMENT,
    21. `qq` int(11) NOT NULL,
    22. `pwd` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    23. `Staid` int(11) NOT NULL,
    24. PRIMARY KEY (`id`) USING BTREE
    25. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    26. -- ----------------------------
    27. -- Records of anam
    28. -- ----------------------------
    29. -- ----------------------------
    30. -- Table structure for animalyearinfo
    31. -- ----------------------------
    32. DROP TABLE IF EXISTS `animalyearinfo`;
    33. CREATE TABLE `animalyearinfo` (
    34. `id` int(11) NOT NULL AUTO_INCREMENT,
    35. `animalyear` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    36. PRIMARY KEY (`id`) USING BTREE
    37. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    38. -- ----------------------------
    39. -- Records of animalyearinfo
    40. -- ----------------------------
    41. INSERT INTO `animalyearinfo` VALUES (1, '龙');
    42. INSERT INTO `animalyearinfo` VALUES (2, '虎');
    43. INSERT INTO `animalyearinfo` VALUES (3, '兔');
    44. INSERT INTO `animalyearinfo` VALUES (4, '鼠');
    45. INSERT INTO `animalyearinfo` VALUES (5, '狗');
    46. INSERT INTO `animalyearinfo` VALUES (6, '牛');
    47. INSERT INTO `animalyearinfo` VALUES (7, '马');
    48. INSERT INTO `animalyearinfo` VALUES (8, '蛇');
    49. INSERT INTO `animalyearinfo` VALUES (9, '猪');
    50. INSERT INTO `animalyearinfo` VALUES (10, '猴');
    51. INSERT INTO `animalyearinfo` VALUES (11, '鸡');
    52. INSERT INTO `animalyearinfo` VALUES (12, '羊');
    53. -- ----------------------------
    54. -- Table structure for bloodtypeinfo
    55. -- ----------------------------
    56. DROP TABLE IF EXISTS `bloodtypeinfo`;
    57. CREATE TABLE `bloodtypeinfo` (
    58. `id` int(11) NOT NULL AUTO_INCREMENT,
    59. `bloodtype` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    60. PRIMARY KEY (`id`) USING BTREE
    61. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    62. -- ----------------------------
    63. -- Records of bloodtypeinfo
    64. -- ----------------------------
    65. INSERT INTO `bloodtypeinfo` VALUES (1, '1');
    66. INSERT INTO `bloodtypeinfo` VALUES (2, 'A型');
    67. INSERT INTO `bloodtypeinfo` VALUES (3, 'B型');
    68. INSERT INTO `bloodtypeinfo` VALUES (4, 'AB型');
    69. INSERT INTO `bloodtypeinfo` VALUES (5, 'O型');
    70. -- ----------------------------
    71. -- Table structure for friendshippolicyinfo
    72. -- ----------------------------
    73. DROP TABLE IF EXISTS `friendshippolicyinfo`;
    74. CREATE TABLE `friendshippolicyinfo` (
    75. `id` int(11) NOT NULL AUTO_INCREMENT,
    76. `friendshippolicy` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    77. PRIMARY KEY (`id`) USING BTREE
    78. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    79. -- ----------------------------
    80. -- Records of friendshippolicyinfo
    81. -- ----------------------------
    82. INSERT INTO `friendshippolicyinfo` VALUES (1, '1');
    83. INSERT INTO `friendshippolicyinfo` VALUES (2, '允许任何人加我为好友');
    84. INSERT INTO `friendshippolicyinfo` VALUES (3, '需要身份验证才能把我加为好友');
    85. INSERT INTO `friendshippolicyinfo` VALUES (4, '不允许任何人加我为好友');
    86. -- ----------------------------
    87. -- Table structure for friendsinfo
    88. -- ----------------------------
    89. DROP TABLE IF EXISTS `friendsinfo`;
    90. CREATE TABLE `friendsinfo` (
    91. `id` int(11) NOT NULL AUTO_INCREMENT,
    92. `hostid` int(11) NOT NULL,
    93. `friendid` int(11) NOT NULL,
    94. PRIMARY KEY (`id`) USING BTREE
    95. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    96. -- ----------------------------
    97. -- Records of friendsinfo
    98. -- ----------------------------
    99. INSERT INTO `friendsinfo` VALUES (1, 10000, 10002);
    100. -- ----------------------------
    101. -- Table structure for messagesinfo
    102. -- ----------------------------
    103. DROP TABLE IF EXISTS `messagesinfo`;
    104. CREATE TABLE `messagesinfo` (
    105. `id` int(11) NOT NULL AUTO_INCREMENT,
    106. `fromuserid` int(11) NOT NULL,
    107. `touserid` int(11) NOT NULL,
    108. `message` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    109. `messagetypeid` int(11) NOT NULL,
    110. `messagestate` int(11) NOT NULL,
    111. `messagedate` datetime NOT NULL,
    112. PRIMARY KEY (`id`) USING BTREE,
    113. INDEX `messagetypeid`(`messagetypeid` ASC) USING BTREE,
    114. CONSTRAINT `messagesinfo_ibfk_1` FOREIGN KEY (`messagetypeid`) REFERENCES `messagetypeinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
    115. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    116. -- ----------------------------
    117. -- Records of messagesinfo
    118. -- ----------------------------
    119. -- ----------------------------
    120. -- Table structure for messagetypeinfo
    121. -- ----------------------------
    122. DROP TABLE IF EXISTS `messagetypeinfo`;
    123. CREATE TABLE `messagetypeinfo` (
    124. `id` int(11) NOT NULL AUTO_INCREMENT,
    125. `messagetype` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    126. PRIMARY KEY (`id`) USING BTREE
    127. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    128. -- ----------------------------
    129. -- Records of messagetypeinfo
    130. -- ----------------------------
    131. INSERT INTO `messagetypeinfo` VALUES (1, '聊天消息');
    132. INSERT INTO `messagetypeinfo` VALUES (2, '抖动窗口消息');
    133. INSERT INTO `messagetypeinfo` VALUES (3, '系统消息');
    134. -- ----------------------------
    135. -- Table structure for questioninfo
    136. -- ----------------------------
    137. DROP TABLE IF EXISTS `questioninfo`;
    138. CREATE TABLE `questioninfo` (
    139. `id` int(11) NOT NULL AUTO_INCREMENT,
    140. `question` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    141. PRIMARY KEY (`id`) USING BTREE
    142. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    143. -- ----------------------------
    144. -- Records of questioninfo
    145. -- ----------------------------
    146. INSERT INTO `questioninfo` VALUES (1, '你母亲的姓名是什么?');
    147. INSERT INTO `questioninfo` VALUES (2, '你父亲的姓名是什么?');
    148. INSERT INTO `questioninfo` VALUES (3, '你高中的班主任姓什么?');
    149. INSERT INTO `questioninfo` VALUES (4, '你的男(女)朋友是谁?');
    150. INSERT INTO `questioninfo` VALUES (5, '你尔今的配偶是谁?');
    151. INSERT INTO `questioninfo` VALUES (6, '你高三的数学老师是谁?');
    152. INSERT INTO `questioninfo` VALUES (7, '你母亲的生日是多少?');
    153. INSERT INTO `questioninfo` VALUES (8, '你父亲的生日是多少?');
    154. INSERT INTO `questioninfo` VALUES (9, '你最讨厌什么样的人?');
    155. INSERT INTO `questioninfo` VALUES (10, '你最喜欢做的事是什么?');
    156. -- ----------------------------
    157. -- Table structure for starinfo
    158. -- ----------------------------
    159. DROP TABLE IF EXISTS `starinfo`;
    160. CREATE TABLE `starinfo` (
    161. `id` int(11) NOT NULL AUTO_INCREMENT,
    162. `star` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    163. PRIMARY KEY (`id`) USING BTREE
    164. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    165. -- ----------------------------
    166. -- Records of starinfo
    167. -- ----------------------------
    168. INSERT INTO `starinfo` VALUES (1, '1');
    169. INSERT INTO `starinfo` VALUES (2, '白羊座');
    170. INSERT INTO `starinfo` VALUES (3, '双鱼座');
    171. INSERT INTO `starinfo` VALUES (4, '双子座');
    172. INSERT INTO `starinfo` VALUES (5, '金牛座');
    173. INSERT INTO `starinfo` VALUES (6, '天蝎座');
    174. INSERT INTO `starinfo` VALUES (7, '处女座');
    175. INSERT INTO `starinfo` VALUES (8, '射手座');
    176. INSERT INTO `starinfo` VALUES (9, '狮子座');
    177. INSERT INTO `starinfo` VALUES (10, '巨蝎座');
    178. INSERT INTO `starinfo` VALUES (11, '天秤座');
    179. INSERT INTO `starinfo` VALUES (12, '水瓶座');
    180. INSERT INTO `starinfo` VALUES (13, '魔羯座');
    181. -- ----------------------------
    182. -- Table structure for stateinfo
    183. -- ----------------------------
    184. DROP TABLE IF EXISTS `stateinfo`;
    185. CREATE TABLE `stateinfo` (
    186. `id` int(11) NOT NULL AUTO_INCREMENT,
    187. `state` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    188. PRIMARY KEY (`id`) USING BTREE
    189. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    190. -- ----------------------------
    191. -- Records of stateinfo
    192. -- ----------------------------
    193. INSERT INTO `stateinfo` VALUES (1, '下线');
    194. INSERT INTO `stateinfo` VALUES (2, '在线');
    195. INSERT INTO `stateinfo` VALUES (3, '工作中');
    196. INSERT INTO `stateinfo` VALUES (4, 'Q我吧');
    197. INSERT INTO `stateinfo` VALUES (5, '隐身');
    198. INSERT INTO `stateinfo` VALUES (6, '离开');
    199. INSERT INTO `stateinfo` VALUES (7, '忙碌');
    200. -- ----------------------------
    201. -- Table structure for userinfo
    202. -- ----------------------------
    203. DROP TABLE IF EXISTS `userinfo`;
    204. CREATE TABLE `userinfo` (
    205. `id` int(11) NOT NULL AUTO_INCREMENT,
    206. `loginpwd` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci ,
    207. `friendshippolicyid` int(11) NOT NULL DEFAULT 1,
    208. `nickname` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci ,
    209. `faceid` int(11) NOT NULL DEFAULT 0,
    210. `sex` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci ,
    211. `age` int(11) NOT NULL,
    212. `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci ,
    213. `bloodtypeid` int(11) NULL DEFAULT 1,
    214. `starid` int(11) NULL DEFAULT 1,
    215. `animalyearid` int(11) NULL DEFAULT 1,
    216. `address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci ,
    217. `stateid` int(11) NULL DEFAULT 1,
    218. `questionid` int(11) NULL DEFAULT NULL,
    219. `answer` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    220. PRIMARY KEY (`id`) USING BTREE,
    221. INDEX `friendshippolicyid`(`friendshippolicyid` ASC) USING BTREE,
    222. INDEX `bloodtypeid`(`bloodtypeid` ASC) USING BTREE,
    223. INDEX `starid`(`starid` ASC) USING BTREE,
    224. INDEX `animalyearid`(`animalyearid` ASC) USING BTREE,
    225. INDEX `stateid`(`stateid` ASC) USING BTREE,
    226. INDEX `questionid`(`questionid` ASC) USING BTREE,
    227. CONSTRAINT `userinfo_ibfk_1` FOREIGN KEY (`friendshippolicyid`) REFERENCES `friendshippolicyinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
    228. CONSTRAINT `userinfo_ibfk_2` FOREIGN KEY (`bloodtypeid`) REFERENCES `bloodtypeinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
    229. CONSTRAINT `userinfo_ibfk_3` FOREIGN KEY (`starid`) REFERENCES `starinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
    230. CONSTRAINT `userinfo_ibfk_4` FOREIGN KEY (`animalyearid`) REFERENCES `animalyearinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
    231. CONSTRAINT `userinfo_ibfk_5` FOREIGN KEY (`stateid`) REFERENCES `stateinfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
    232. CONSTRAINT `userinfo_ibfk_6` FOREIGN KEY (`questionid`) REFERENCES `questioninfo` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
    233. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
    234. -- ----------------------------
    235. -- Records of userinfo
    236. -- ----------------------------
    237. INSERT INTO `userinfo` VALUES (10000, '813813', 1, '蝶恋花', 49, '男', 15, '董', 1, 3, 1, '六里坪', 1, 3, '813');
    238. INSERT INTO `userinfo` VALUES (10001, '520520', 1, '蝶之舞', 1, '女', 17, '郑', 2, 1, 6, '中南海', 1, 5, '王');
    239. SET FOREIGN_KEY_CHECKS = 1;