tnb_account_tdb.sql 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. -- MySQL dump 10.13 Distrib 5.7.42, for Linux (x86_64)
  2. --
  3. -- Host: 192.168.0.210 Database: tnb_account_tdb
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.36
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `chat_group_info`
  18. --
  19. DROP TABLE IF EXISTS `chat_group_info`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!40101 SET character_set_client = utf8 */;
  22. CREATE TABLE `chat_group_info` (
  23. `id` int(11) NOT NULL AUTO_INCREMENT,
  24. `deleted` bit(1) NOT NULL,
  25. `create_time` datetime(6) NOT NULL,
  26. `update_time` datetime(6) NOT NULL,
  27. `group_id` bigint(20) NOT NULL,
  28. `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  29. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  30. `profile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  31. `owner_id` bigint(20) NOT NULL,
  32. PRIMARY KEY (`id`)
  33. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  34. /*!40101 SET character_set_client = @saved_cs_client */;
  35. --
  36. -- Table structure for table `chat_group_member`
  37. --
  38. DROP TABLE IF EXISTS `chat_group_member`;
  39. /*!40101 SET @saved_cs_client = @@character_set_client */;
  40. /*!40101 SET character_set_client = utf8 */;
  41. CREATE TABLE `chat_group_member` (
  42. `id` int(11) NOT NULL AUTO_INCREMENT,
  43. `deleted` bit(1) NOT NULL,
  44. `create_time` datetime(6) NOT NULL,
  45. `update_time` datetime(6) NOT NULL,
  46. `group_id` bigint(20) NOT NULL,
  47. `user_id` bigint(20) NOT NULL,
  48. `nickname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  49. `owner` bit(1) DEFAULT NULL,
  50. `disturb` bit(1) DEFAULT NULL,
  51. PRIMARY KEY (`id`)
  52. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  53. /*!40101 SET character_set_client = @saved_cs_client */;
  54. --
  55. -- Table structure for table `chat_group_notice`
  56. --
  57. DROP TABLE IF EXISTS `chat_group_notice`;
  58. /*!40101 SET @saved_cs_client = @@character_set_client */;
  59. /*!40101 SET character_set_client = utf8 */;
  60. CREATE TABLE `chat_group_notice` (
  61. `id` int(11) NOT NULL AUTO_INCREMENT,
  62. `deleted` bit(1) NOT NULL,
  63. `create_time` datetime(6) NOT NULL,
  64. `update_time` datetime(6) NOT NULL,
  65. `notice_id` int(11) NOT NULL,
  66. `group_id` int(11) NOT NULL,
  67. `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  68. `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  69. `top` bit(1) NOT NULL,
  70. `confirmed` bit(1) NOT NULL,
  71. `create_by` bigint(20) NOT NULL,
  72. PRIMARY KEY (`id`)
  73. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  74. /*!40101 SET character_set_client = @saved_cs_client */;
  75. --
  76. -- Table structure for table `msg_email_account`
  77. --
  78. DROP TABLE IF EXISTS `msg_email_account`;
  79. /*!40101 SET @saved_cs_client = @@character_set_client */;
  80. /*!40101 SET character_set_client = utf8 */;
  81. CREATE TABLE `msg_email_account` (
  82. `id` int(11) NOT NULL AUTO_INCREMENT,
  83. `deleted` bit(1) NOT NULL DEFAULT b'0',
  84. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  85. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  86. `smtp` varchar(255) NOT NULL,
  87. `username` varchar(255) NOT NULL,
  88. `password` varchar(255) NOT NULL,
  89. `personal` varchar(255) NOT NULL,
  90. `default_sender` bit(1) NOT NULL,
  91. PRIMARY KEY (`id`),
  92. UNIQUE KEY `username` (`username`)
  93. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
  94. /*!40101 SET character_set_client = @saved_cs_client */;
  95. --
  96. -- Table structure for table `msg_login_attempts`
  97. --
  98. DROP TABLE IF EXISTS `msg_login_attempts`;
  99. /*!40101 SET @saved_cs_client = @@character_set_client */;
  100. /*!40101 SET character_set_client = utf8 */;
  101. CREATE TABLE `msg_login_attempts` (
  102. `id` int(11) NOT NULL AUTO_INCREMENT,
  103. `deleted` bit(1) NOT NULL,
  104. `create_time` datetime(6) NOT NULL,
  105. `update_time` datetime(6) NOT NULL,
  106. `login_id` varchar(255) DEFAULT NULL,
  107. `user_id` bigint(20) NOT NULL,
  108. `login_type` int(11) DEFAULT NULL,
  109. `user_agent` text,
  110. `login_ip` varchar(255) DEFAULT NULL,
  111. `login_at` datetime(6) DEFAULT NULL,
  112. `plat` int(11) DEFAULT NULL,
  113. `succeed` bit(1) DEFAULT NULL,
  114. `remember_me` bit(1) DEFAULT NULL,
  115. PRIMARY KEY (`id`),
  116. UNIQUE KEY `login_id` (`login_id`),
  117. KEY `user_id` (`user_id`) USING BTREE
  118. ) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COMMENT='用户登录记录';
  119. /*!40101 SET character_set_client = @saved_cs_client */;
  120. --
  121. -- Table structure for table `oauth_access_token`
  122. --
  123. DROP TABLE IF EXISTS `oauth_access_token`;
  124. /*!40101 SET @saved_cs_client = @@character_set_client */;
  125. /*!40101 SET character_set_client = utf8 */;
  126. CREATE TABLE `oauth_access_token` (
  127. `token_id` varchar(255) DEFAULT NULL COMMENT '加密的access_token的值',
  128. `token` longblob COMMENT 'OAuth2AccessToken.java对象序列化后的二进制数据',
  129. `authentication_id` varchar(255) DEFAULT NULL COMMENT '加密过的username,client_id,scope',
  130. `user_name` varchar(255) DEFAULT NULL COMMENT '登录的用户名',
  131. `client_id` varchar(255) DEFAULT NULL COMMENT '客户端ID',
  132. `authentication` longblob COMMENT 'OAuth2Authentication.java对象序列化后的二进制数据',
  133. `refresh_token` varchar(255) DEFAULT NULL COMMENT '加密的refresh_token的值'
  134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='访问令牌';
  135. /*!40101 SET character_set_client = @saved_cs_client */;
  136. --
  137. -- Table structure for table `oauth_approvals`
  138. --
  139. DROP TABLE IF EXISTS `oauth_approvals`;
  140. /*!40101 SET @saved_cs_client = @@character_set_client */;
  141. /*!40101 SET character_set_client = utf8 */;
  142. CREATE TABLE `oauth_approvals` (
  143. `userId` varchar(255) DEFAULT NULL COMMENT '登录的用户名',
  144. `clientId` varchar(255) DEFAULT NULL COMMENT '客户端ID',
  145. `scope` varchar(255) DEFAULT NULL COMMENT '申请的权限范围',
  146. `status` varchar(10) DEFAULT NULL COMMENT '状态(Approve或Deny)',
  147. `expiresAt` datetime DEFAULT NULL COMMENT '过期时间',
  148. `lastModifiedAt` datetime DEFAULT NULL COMMENT '最终修改时间'
  149. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='授权记录';
  150. /*!40101 SET character_set_client = @saved_cs_client */;
  151. --
  152. -- Table structure for table `oauth_client_details`
  153. --
  154. DROP TABLE IF EXISTS `oauth_client_details`;
  155. /*!40101 SET @saved_cs_client = @@character_set_client */;
  156. /*!40101 SET character_set_client = utf8 */;
  157. CREATE TABLE `oauth_client_details` (
  158. `client_id` varchar(255) NOT NULL COMMENT '客户端 ID',
  159. `resource_ids` varchar(255) DEFAULT NULL COMMENT '客户端可访问的资源服务器集合, 使用 '','' 分隔多个资源',
  160. `client_secret` varchar(255) DEFAULT NULL COMMENT '客户端密匙',
  161. `scope` varchar(255) DEFAULT NULL COMMENT '客户端可访问的资源服务器范围, 空值表示可访问资源服务器上的所有资源',
  162. `authorized_grant_types` varchar(255) DEFAULT NULL COMMENT '客户端支持的 OAuth2.0 授权类型',
  163. `web_server_redirect_uri` varchar(255) DEFAULT NULL COMMENT '授权服务器认证通过后重定向到客户端的 URI',
  164. `authorities` varchar(255) DEFAULT NULL COMMENT '客户端拥有的 Spring Security 权限, 使用 '','' 分隔多个权限',
  165. `access_token_validity` int(11) DEFAULT NULL COMMENT '访问令牌有效时间值(单位:秒)',
  166. `refresh_token_validity` int(11) DEFAULT NULL COMMENT '更新令牌有效时间值(单位:秒)',
  167. `additional_information` varchar(255) DEFAULT NULL COMMENT '预留字段',
  168. `autoapprove` varchar(255) DEFAULT NULL COMMENT '用户是否自动 Approval 操作'
  169. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端信息';
  170. /*!40101 SET character_set_client = @saved_cs_client */;
  171. --
  172. -- Table structure for table `oauth_client_token`
  173. --
  174. DROP TABLE IF EXISTS `oauth_client_token`;
  175. /*!40101 SET @saved_cs_client = @@character_set_client */;
  176. /*!40101 SET character_set_client = utf8 */;
  177. CREATE TABLE `oauth_client_token` (
  178. `token_id` varchar(255) DEFAULT NULL COMMENT '加密的access_token值',
  179. `token` longblob COMMENT 'OAuth2AccessToken.java对象序列化后的二进制数据',
  180. `authentication_id` varchar(255) DEFAULT NULL COMMENT '加密过的username,client_id,scope',
  181. `user_name` varchar(255) DEFAULT NULL COMMENT '登录的用户名',
  182. `client_id` varchar(255) DEFAULT NULL COMMENT '客户端ID'
  183. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  184. /*!40101 SET character_set_client = @saved_cs_client */;
  185. --
  186. -- Table structure for table `oauth_code`
  187. --
  188. DROP TABLE IF EXISTS `oauth_code`;
  189. /*!40101 SET @saved_cs_client = @@character_set_client */;
  190. /*!40101 SET character_set_client = utf8 */;
  191. CREATE TABLE `oauth_code` (
  192. `code` varchar(255) DEFAULT NULL COMMENT '授权码(未加密)',
  193. `authentication` varbinary(255) DEFAULT NULL COMMENT 'AuthorizationRequestHolder.java对象序列化后的二进制数据'
  194. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='授权码';
  195. /*!40101 SET character_set_client = @saved_cs_client */;
  196. --
  197. -- Table structure for table `oauth_refresh_token`
  198. --
  199. DROP TABLE IF EXISTS `oauth_refresh_token`;
  200. /*!40101 SET @saved_cs_client = @@character_set_client */;
  201. /*!40101 SET character_set_client = utf8 */;
  202. CREATE TABLE `oauth_refresh_token` (
  203. `token_id` varchar(255) DEFAULT NULL COMMENT '加密过的refresh_token的值',
  204. `token` longblob COMMENT 'OAuth2RefreshToken.java对象序列化后的二进制数据 ',
  205. `authentication` longblob COMMENT 'OAuth2Authentication.java对象序列化后的二进制数据'
  206. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='更新令牌';
  207. /*!40101 SET character_set_client = @saved_cs_client */;
  208. --
  209. -- Table structure for table `oauth_user_oauth_app`
  210. --
  211. DROP TABLE IF EXISTS `oauth_user_oauth_app`;
  212. /*!40101 SET @saved_cs_client = @@character_set_client */;
  213. /*!40101 SET character_set_client = utf8 */;
  214. CREATE TABLE `oauth_user_oauth_app` (
  215. `id` int(11) NOT NULL AUTO_INCREMENT,
  216. `deleted` bit(1) NOT NULL,
  217. `create_time` datetime(6) NOT NULL,
  218. `update_time` datetime(6) NOT NULL,
  219. `user_id` bigint(20) NOT NULL,
  220. `app_name` varchar(255) NOT NULL,
  221. `home_url` varchar(255) NOT NULL,
  222. `client_id` varchar(255) NOT NULL,
  223. PRIMARY KEY (`id`)
  224. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  225. /*!40101 SET character_set_client = @saved_cs_client */;
  226. --
  227. -- Table structure for table `user_account`
  228. --
  229. DROP TABLE IF EXISTS `user_account`;
  230. /*!40101 SET @saved_cs_client = @@character_set_client */;
  231. /*!40101 SET character_set_client = utf8 */;
  232. CREATE TABLE `user_account` (
  233. `id` int(11) NOT NULL AUTO_INCREMENT,
  234. `deleted` bit(1) NOT NULL DEFAULT b'0',
  235. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  236. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  237. `user_id` bigint(20) NOT NULL COMMENT '用户 ID, 全局唯一',
  238. `account_type` tinyint(11) NOT NULL COMMENT '帐号类型, AccountType 枚举类',
  239. `username` varchar(255) NOT NULL COMMENT '用户名, 全局唯一',
  240. `mobile` varchar(13) DEFAULT NULL COMMENT '手机号, 全局唯一',
  241. `email` varchar(255) DEFAULT NULL COMMENT '邮箱, 全局唯一',
  242. `encoded_password` varchar(255) DEFAULT NULL,
  243. `salt` varchar(255) DEFAULT NULL,
  244. `create_at` datetime(6) NOT NULL COMMENT '帐号创建时间',
  245. `role` varchar(255) DEFAULT NULL,
  246. `enabled` bit(1) NOT NULL COMMENT 'spring-security 字段',
  247. `locked` bit(1) NOT NULL COMMENT 'spring-security 字段',
  248. `screen_name` varchar(255) DEFAULT NULL,
  249. `avatar_url` varchar(255) DEFAULT NULL,
  250. `notify` bit(1) DEFAULT NULL,
  251. PRIMARY KEY (`id`),
  252. UNIQUE KEY `user_id` (`user_id`) USING BTREE,
  253. UNIQUE KEY `username` (`username`) USING BTREE,
  254. UNIQUE KEY `email` (`email`) USING BTREE,
  255. UNIQUE KEY `mobile` (`mobile`) USING BTREE,
  256. UNIQUE KEY `index_screen_name` (`screen_name`),
  257. KEY `account_type` (`account_type`)
  258. ) ENGINE=InnoDB AUTO_INCREMENT=2057872 DEFAULT CHARSET=utf8mb4 COMMENT='用户帐号';
  259. /*!40101 SET character_set_client = @saved_cs_client */;
  260. --
  261. -- Table structure for table `user_contact`
  262. --
  263. DROP TABLE IF EXISTS `user_contact`;
  264. /*!40101 SET @saved_cs_client = @@character_set_client */;
  265. /*!40101 SET character_set_client = utf8 */;
  266. CREATE TABLE `user_contact` (
  267. `id` int(11) NOT NULL AUTO_INCREMENT,
  268. `deleted` bit(1) NOT NULL DEFAULT b'0',
  269. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  270. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  271. `friend_id` bigint(20) NOT NULL,
  272. `remark_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注名',
  273. `status` int(10) NOT NULL COMMENT '关系状态',
  274. `owner` bigint(20) NOT NULL,
  275. PRIMARY KEY (`id`),
  276. KEY `user_id` (`owner`) USING BTREE,
  277. KEY `friend_id` (`friend_id`)
  278. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='联系人';
  279. /*!40101 SET character_set_client = @saved_cs_client */;
  280. --
  281. -- Table structure for table `user_contact_record`
  282. --
  283. DROP TABLE IF EXISTS `user_contact_record`;
  284. /*!40101 SET @saved_cs_client = @@character_set_client */;
  285. /*!40101 SET character_set_client = utf8 */;
  286. CREATE TABLE `user_contact_record` (
  287. `id` int(11) NOT NULL AUTO_INCREMENT,
  288. `deleted` bit(1) NOT NULL DEFAULT b'0',
  289. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  290. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  291. `apply_id` bigint(20) DEFAULT NULL,
  292. `apply_user` bigint(20) NOT NULL,
  293. `applied_user` bigint(20) NOT NULL,
  294. `friend_status` int(10) DEFAULT NULL,
  295. `apply_status` int(10) NOT NULL,
  296. `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  297. PRIMARY KEY (`id`),
  298. KEY `user_id` (`apply_user`) USING BTREE,
  299. KEY `friend_id` (`applied_user`)
  300. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='联系人申请记录';
  301. /*!40101 SET character_set_client = @saved_cs_client */;
  302. --
  303. -- Table structure for table `user_message`
  304. --
  305. DROP TABLE IF EXISTS `user_message`;
  306. /*!40101 SET @saved_cs_client = @@character_set_client */;
  307. /*!40101 SET character_set_client = utf8 */;
  308. CREATE TABLE `user_message` (
  309. `id` int(11) NOT NULL AUTO_INCREMENT,
  310. `deleted` bit(1) NOT NULL DEFAULT b'0',
  311. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  312. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  313. `msg_type` int(11) DEFAULT NULL,
  314. `message_id` bigint(20) NOT NULL,
  315. `title` varchar(255) NOT NULL,
  316. `content` varchar(255) NOT NULL,
  317. `unread` bit(1) NOT NULL,
  318. `user_id` bigint(20) NOT NULL,
  319. PRIMARY KEY (`id`)
  320. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='用户消息';
  321. /*!40101 SET character_set_client = @saved_cs_client */;
  322. --
  323. -- Table structure for table `user_profile`
  324. --
  325. DROP TABLE IF EXISTS `user_profile`;
  326. /*!40101 SET @saved_cs_client = @@character_set_client */;
  327. /*!40101 SET character_set_client = utf8 */;
  328. CREATE TABLE `user_profile` (
  329. `id` int(11) NOT NULL AUTO_INCREMENT,
  330. `deleted` bit(1) NOT NULL DEFAULT b'0',
  331. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  332. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  333. `user_id` bigint(20) NOT NULL,
  334. `gender` varchar(255) NOT NULL,
  335. `signature` varchar(255) DEFAULT NULL COMMENT '用户自我介绍',
  336. `following` int(11) NOT NULL,
  337. `follower` int(11) NOT NULL,
  338. PRIMARY KEY (`id`),
  339. UNIQUE KEY `user_id` (`user_id`) USING BTREE
  340. ) ENGINE=InnoDB AUTO_INCREMENT=263920 DEFAULT CHARSET=utf8mb4 COMMENT='用户信息';
  341. /*!40101 SET character_set_client = @saved_cs_client */;
  342. --
  343. -- Table structure for table `user_registry`
  344. --
  345. DROP TABLE IF EXISTS `user_registry`;
  346. /*!40101 SET @saved_cs_client = @@character_set_client */;
  347. /*!40101 SET character_set_client = utf8 */;
  348. CREATE TABLE `user_registry` (
  349. `id` int(11) NOT NULL AUTO_INCREMENT,
  350. `deleted` bit(1) NOT NULL DEFAULT b'0',
  351. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  352. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  353. `enabled` bit(1) NOT NULL COMMENT '是否开放注册',
  354. `rule` varchar(255) NOT NULL COMMENT '开放注册规则',
  355. `captcha_code` varchar(255) NOT NULL,
  356. `verify_code` varchar(255) NOT NULL,
  357. `enable_code` bit(1) NOT NULL,
  358. `domain` varchar(255) NOT NULL,
  359. PRIMARY KEY (`id`),
  360. UNIQUE KEY `user_id` (`enabled`) USING BTREE
  361. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='帐号开放注册规则';
  362. /*!40101 SET character_set_client = @saved_cs_client */;
  363. --
  364. -- Table structure for table `user_relation`
  365. --
  366. DROP TABLE IF EXISTS `user_relation`;
  367. /*!40101 SET @saved_cs_client = @@character_set_client */;
  368. /*!40101 SET character_set_client = utf8 */;
  369. CREATE TABLE `user_relation` (
  370. `id` int(11) NOT NULL AUTO_INCREMENT,
  371. `deleted` bit(1) NOT NULL,
  372. `create_time` datetime(6) NOT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  373. `update_time` datetime(6) NOT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  374. `user_id` bigint(20) NOT NULL,
  375. `following_id` bigint(20) NOT NULL,
  376. PRIMARY KEY (`id`)
  377. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户关系';
  378. /*!40101 SET character_set_client = @saved_cs_client */;
  379. --
  380. -- Table structure for table `user_vip`
  381. --
  382. DROP TABLE IF EXISTS `user_vip`;
  383. /*!40101 SET @saved_cs_client = @@character_set_client */;
  384. /*!40101 SET character_set_client = utf8 */;
  385. CREATE TABLE `user_vip` (
  386. `id` int(11) NOT NULL AUTO_INCREMENT,
  387. `deleted` bit(1) NOT NULL DEFAULT b'0',
  388. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  389. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  390. `user_id` bigint(20) NOT NULL COMMENT '用户 ID',
  391. `expire_at` bigint(20) NOT NULL COMMENT 'VIP 用户过期时间',
  392. PRIMARY KEY (`id`),
  393. UNIQUE KEY `user_id` (`user_id`) USING BTREE
  394. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='小会员用户';
  395. /*!40101 SET character_set_client = @saved_cs_client */;
  396. --
  397. -- Table structure for table `user_vip_plan`
  398. --
  399. DROP TABLE IF EXISTS `user_vip_plan`;
  400. /*!40101 SET @saved_cs_client = @@character_set_client */;
  401. /*!40101 SET character_set_client = utf8 */;
  402. CREATE TABLE `user_vip_plan` (
  403. `id` int(11) NOT NULL AUTO_INCREMENT,
  404. `deleted` bit(1) NOT NULL DEFAULT b'0',
  405. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  406. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  407. `plan_id` int(11) NOT NULL,
  408. `name` varchar(255) NOT NULL,
  409. `price` double NOT NULL,
  410. `duration` int(11) NOT NULL,
  411. PRIMARY KEY (`id`),
  412. UNIQUE KEY `owner` (`plan_id`) USING BTREE
  413. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='小会员计划';
  414. /*!40101 SET character_set_client = @saved_cs_client */;
  415. --
  416. -- Table structure for table `user_wallet_bill`
  417. --
  418. DROP TABLE IF EXISTS `user_wallet_bill`;
  419. /*!40101 SET @saved_cs_client = @@character_set_client */;
  420. /*!40101 SET character_set_client = utf8 */;
  421. CREATE TABLE `user_wallet_bill` (
  422. `id` int(11) NOT NULL AUTO_INCREMENT,
  423. `deleted` bit(1) NOT NULL DEFAULT b'0',
  424. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  425. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  426. `type` int(11) NOT NULL COMMENT '1 - 收入, 2 - 支出',
  427. `quantity` double NOT NULL,
  428. `create_at` datetime(6) NOT NULL,
  429. `owner` bigint(20) NOT NULL,
  430. PRIMARY KEY (`id`)
  431. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='用户钱包账单';
  432. /*!40101 SET character_set_client = @saved_cs_client */;
  433. --
  434. -- Table structure for table `user_wallet_charge`
  435. --
  436. DROP TABLE IF EXISTS `user_wallet_charge`;
  437. /*!40101 SET @saved_cs_client = @@character_set_client */;
  438. /*!40101 SET character_set_client = utf8 */;
  439. CREATE TABLE `user_wallet_charge` (
  440. `id` int(11) NOT NULL AUTO_INCREMENT,
  441. `deleted` bit(1) NOT NULL DEFAULT b'0',
  442. `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  443. `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  444. `charge_id` bigint(20) NOT NULL,
  445. `quantity` double NOT NULL,
  446. `owner` bigint(20) NOT NULL,
  447. `status` int(11) NOT NULL,
  448. PRIMARY KEY (`id`),
  449. UNIQUE KEY `owner` (`charge_id`) USING BTREE
  450. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='用户钱包充值';
  451. /*!40101 SET character_set_client = @saved_cs_client */;
  452. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  453. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  454. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  455. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  456. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  457. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  458. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  459. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  460. -- Dump completed on 2024-12-15 22:47:20