Skip to content

Commit

Permalink
调整字段类型
Browse files Browse the repository at this point in the history
  • Loading branch information
pumadong committed Sep 19, 2014
1 parent 97925c3 commit 6562820
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions create_privilege.sql
Expand Up @@ -12,11 +12,11 @@
#系统模块表
DROP TABLE IF EXISTS `p_module`;
CREATE TABLE `p_module` (
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT '自增主键' ,
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键' ,
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '系统模块名称' ,
`flag` varchar(20) NOT NULL DEFAULT '' COMMENT '系统模块标记' ,
`url` varchar(300) NOT NULL DEFAULT '' COMMENT '系统访问URL' ,
`sort_no` int(4) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`sort_no` int(11) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' ,
`create_date` datetime NOT NULL COMMENT '记录生成时间' ,
`update_person` varchar(30) NOT NULL DEFAULT '' COMMENT '最后更新人' ,
Expand All @@ -36,13 +36,13 @@ VALUES
DROP TABLE IF EXISTS `p_resource`;

CREATE TABLE `p_resource` (
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT '自增主键' ,
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键' ,
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '菜单资源名称' ,
`url` varchar(300) NOT NULL DEFAULT '' COMMENT '菜单资源URL' ,
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '菜单资源简要描述' ,
`parent_id` int(4) NOT NULL DEFAULT 0 COMMENT '父级id' ,
`parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '父级id' ,
`structure` varchar(20) NOT NULL DEFAULT '' COMMENT '菜单的层级结构' ,
`sort_no` int(4) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`sort_no` int(11) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`module_flag` varchar(20) NOT NULL DEFAULT '' COMMENT '所属系统模块的标记' ,
`create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' ,
`create_date` datetime NOT NULL COMMENT '记录生成时间' ,
Expand All @@ -65,13 +65,13 @@ VALUES
#用户表
DROP TABLE IF EXISTS `p_user`;
CREATE TABLE `p_user` (
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`username` varchar(30) NOT NULL DEFAULT '' COMMENT '登录用户名' ,
`password` varchar(50) NOT NULL DEFAULT '' COMMENT '登录密码' ,
`fullname` varchar(30) NOT NULL DEFAULT '' COMMENT '姓名' ,
`gender` tinyint(1) NOT NULL DEFAULT 1 COMMENT '性别:1男0女' ,
`is_admin` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否管理员:1是0否' ,
`department_id` int(4) NOT NULL DEFAULT 0 COMMENT '外键,所属部门Id' ,
`department_id` int(11) NOT NULL DEFAULT 0 COMMENT '外键,所属部门Id' ,
`is_lock` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否锁定:1是0否' ,
`is_delete` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除:1是0否' ,
`create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' ,
Expand All @@ -92,7 +92,7 @@ INSERT INTO `p_user` VALUES (3, 'test', '63a9f0ea7bb98050796b649e85481845', '创
#角色表
DROP TABLE IF EXISTS `p_role`;
CREATE TABLE `p_role` (
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '角色名称' ,
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '角色描述' ,
`create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' ,
Expand All @@ -107,8 +107,8 @@ COMMENT='角色表'
#角色系统模块关系表
DROP TABLE IF EXISTS `p_role_module`;
CREATE TABLE `p_role_module` (
`role_id` int(4) NOT NULL COMMENT '角色ID' ,
`module_id` int(4) NOT NULL COMMENT '模块ID' ,
`role_id` int(11) NOT NULL COMMENT '角色ID' ,
`module_id` int(11) NOT NULL COMMENT '模块ID' ,
INDEX `idx_role_id` (`role_id`) USING BTREE ,
INDEX `idx_module_id` (`module_id`) USING BTREE
)
Expand All @@ -118,8 +118,8 @@ COMMENT='角色系统模块关系表'
#角色权限资源关系表
DROP TABLE IF EXISTS `p_role_resource`;
CREATE TABLE `p_role_resource` (
`role_id` int(4) NOT NULL COMMENT '角色ID' ,
`resource_id` int(4) NOT NULL COMMENT '资源ID' ,
`role_id` int(11) NOT NULL COMMENT '角色ID' ,
`resource_id` int(11) NOT NULL COMMENT '资源ID' ,
INDEX `idx_role_id` (`role_id`) USING BTREE ,
INDEX `idx_resource_id` (`resource_id`) USING BTREE
)
Expand All @@ -144,8 +144,8 @@ INSERT INTO `p_role_resource` VALUES (2, 2);
#用户角色关系表
DROP TABLE IF EXISTS `p_user_role`;
CREATE TABLE `p_user_role` (
`user_id` int(4) NOT NULL COMMENT '用户ID' ,
`role_id` int(4) NOT NULL COMMENT '角色ID' ,
`user_id` int(11) NOT NULL COMMENT '用户ID' ,
`role_id` int(11) NOT NULL COMMENT '角色ID' ,
INDEX `idx_user_id` (`user_id`) USING BTREE ,
INDEX `idx_role_id` (`role_id`) USING BTREE
)
Expand All @@ -157,12 +157,12 @@ INSERT INTO `p_user_role` VALUES (2, 1);
#部门表
DROP TABLE IF EXISTS `p_department`;
CREATE TABLE `p_department` (
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'UUID主键' ,
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '部门名称' ,
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '部门描述' ,
`parent_id` int(4) NOT NULL DEFAULT 0 COMMENT '父级id' ,
`parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '父级id' ,
`structure` varchar(20) NOT NULL DEFAULT '' COMMENT '部门的层级结构' ,
`sort_no` int(4) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`sort_no` int(11) NOT NULL DEFAULT 0 COMMENT '排序号' ,
`create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' ,
`create_date` datetime NOT NULL COMMENT '记录生成时间' ,
`update_person` varchar(30) NOT NULL DEFAULT '' COMMENT '最后更新人' ,
Expand Down

0 comments on commit 6562820

Please sign in to comment.