forked from mybatis-book/book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
SET FOREIGN_KEY_CHECKS=0; | ||
|
||
-- ---------------------------- | ||
-- Table structure for country | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `country`; | ||
CREATE TABLE `country` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`countryname` varchar(255) DEFAULT NULL, | ||
`countrycode` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_dict | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_dict`; | ||
CREATE TABLE `sys_dict` ( | ||
`id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||
`code` varchar(64) NOT NULL COMMENT '类别', | ||
`name` varchar(64) NOT NULL COMMENT '字典名', | ||
`value` varchar(64) NOT NULL COMMENT '字典值', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_privilege | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_privilege`; | ||
CREATE TABLE `sys_privilege` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限ID', | ||
`privilege_name` varchar(50) DEFAULT NULL COMMENT '权限名称', | ||
`privilege_url` varchar(200) DEFAULT NULL COMMENT '权限URL', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='权限表'; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_role | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_role`; | ||
CREATE TABLE `sys_role` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID', | ||
`role_name` varchar(50) DEFAULT NULL COMMENT '角色名', | ||
`enabled` int(11) DEFAULT NULL COMMENT '有效标志', | ||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人', | ||
`create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='角色表'; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_role_privilege | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_role_privilege`; | ||
CREATE TABLE `sys_role_privilege` ( | ||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', | ||
`privilege_id` bigint(20) DEFAULT NULL COMMENT '权限ID' | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限关联表'; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_user | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_user`; | ||
CREATE TABLE `sys_user` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID', | ||
`user_name` varchar(50) DEFAULT NULL COMMENT '用户名', | ||
`user_password` varchar(50) DEFAULT NULL COMMENT '密码', | ||
`user_email` varchar(50) DEFAULT '[email protected]' COMMENT '邮箱', | ||
`user_info` text COMMENT '简介', | ||
`head_img` blob COMMENT '头像', | ||
`create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=1035 DEFAULT CHARSET=utf8 COMMENT='用户表'; | ||
|
||
-- ---------------------------- | ||
-- Table structure for sys_user_role | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `sys_user_role`; | ||
CREATE TABLE `sys_user_role` ( | ||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', | ||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID' | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色关联表'; | ||
|
||
-- ---------------------------- | ||
-- Table structure for user info | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `user info`; | ||
CREATE TABLE `user info` ( | ||
`id` int(11) NOT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |