Skip to content

Commit

Permalink
示例建表语句优化 (hhyo#2194)
Browse files Browse the repository at this point in the history
* 示例建表语句优化

* 去除bom,恢复首行渲染
  • Loading branch information
weideguo authored Nov 7, 2023
1 parent e25bd54 commit 2a42d5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/docs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MySQL数据库设计规范(仅供参考)
# MySQL数据库设计规范(仅供参考)
## 目录
1. 规范背景与目的
2. 设计规范
Expand Down Expand Up @@ -110,19 +110,19 @@ MySQL数据库与 Oracle、 SQL Server 等数据库相比,有其内核上的

CREATE TABLE user (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`user_id` bigint(11) NOT NULL COMMENT 用户id
`user_id` bigint(11) NOT NULL COMMENT '用户id',
`username` varchar(45) NOT NULL COMMENT '真实姓名',
`email` varchar(30) NOT NULL COMMENT 用户邮箱,
`email` varchar(30) NOT NULL COMMENT '用户邮箱',
`nickname` varchar(45) NOT NULL COMMENT '昵称',
`avatar` int(11) NOT NULL COMMENT '头像',
`birthday` date NOT NULL COMMENT '生日',
`sex` tinyint(4) DEFAULT '0' COMMENT '性别',
`short_introduce` varchar(150) DEFAULT NULL COMMENT '一句话介绍自己,最多50个汉字',
`user_resume` varchar(300) NOT NULL COMMENT '用户提交的简历存放地址',
`user_register_ip` int NOT NULL COMMENT 用户注册时的源ip,
`create_time` timestamp NOT NULL COMMENT 用户记录创建的时间,
`update_time` timestamp NOT NULL COMMENT 用户资料修改的时间,
`user_review_status` tinyint NOT NULL COMMENT 用户资料审核状态,1为通过,2为审核中,3为未通过,4为还未提交审核,
`user_register_ip` int NOT NULL COMMENT '用户注册时的源ip',
`create_time` timestamp NOT NULL COMMENT '用户记录创建的时间',
`update_time` timestamp NOT NULL COMMENT '用户资料修改的时间',
`user_review_status` tinyint NOT NULL COMMENT '用户资料审核状态,1为通过,2为审核中,3为未通过,4为还未提交审核',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_user_id` (`user_id`),
KEY `idx_username`(`username`),
Expand Down

0 comments on commit 2a42d5c

Please sign in to comment.