Skip to content

Commit

Permalink
示例建表语句优化
Browse files Browse the repository at this point in the history
  • Loading branch information
weideguo committed Jun 27, 2023
1 parent 1ef4374 commit 596d277
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/docs.md
Original file line number Diff line number Diff line change
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 596d277

Please sign in to comment.