【研究中2】sql server权限用户设置




--更新时间2023.11.26 21:30   负责人:jerrys


use DBAliCMS






IF EXISTS (select * from sysobjects where name='hkcms_admin')--判断是否存在此表
    DROP TABLE hkcms_admin

CREATE TABLE  hkcms_admin  (
   id  int  identity(1, 1),--id  int primary key identity(1, 1)
   username  varchar(20)   NOT NULL ,-- '登录名称',
   nickname  varchar(50)   NOT NULL DEFAULT '' ,-- '昵称',
   email  varchar(50)   NOT NULL DEFAULT '' ,-- '邮箱',
   password  varchar(32)   NOT NULL ,-- '密码',
   salt  varchar(10)   NOT NULL ,-- '密码盐',
   avatar  varchar(255)   NOT NULL DEFAULT '' ,-- '头像',
   remark  varchar(255)   NOT NULL DEFAULT '' ,-- '备注',
   logintime  datetime DEFAULT NULL ,-- '登录时间',
   loginip  varchar(40)   NOT NULL DEFAULT '' ,-- '登录IP',
   status  varchar(20)   NOT NULL DEFAULT 'normal' ,-- '状态:normal-正常,hidden-禁用',
   create_time  datetime DEFAULT NULL ,-- '创建时间',
   update_time  datetime DEFAULT NULL , -- '更新时间',
   PRIMARY KEY(id)

) --='后台管理员';


IF EXISTS (select * from sysobjects where name='hkcms_admin_log')--判断是否存在此表
    DROP TABLE hkcms_admin_log
CREATE TABLE  hkcms_admin_log  (
   id  int  identity(1, 1),
   admin_id  int NOT NULL ,-- '用户id',
   username  varchar(30)   NOT NULL DEFAULT '' ,-- '用户名',
   useragent  varchar(255)   NOT NULL DEFAULT '' ,-- 'useragent',
   title  varchar(100)   NOT NULL ,-- '标题',
   url  varchar(1500)   NOT NULL ,-- 'URL',
   ip  varchar(20)   NOT NULL ,-- 'IP地址',
   content  text   NOT NULL ,-- '内容',
   create_time  datetime NOT NULL, -- '操作时间',
   PRIMARY KEY(id)
) --='后台操作日志';








IF EXISTS (select * from sysobjects where name='hkcms_auth_group')--判断是否存在此表
    DROP TABLE hkcms_auth_group
CREATE TABLE hkcms_auth_group (
  id int primary key identity(1, 1) ,-- 'ID',
  name varchar(20)  NOT NULL DEFAULT '' ,-- '名称',
  parent_id int NOT NULL DEFAULT '0' ,-- '父级',
  rules text  NOT NULL ,-- '规则',
  remark varchar(255)  NOT NULL DEFAULT '' ,-- '备注',
  status varchar(20)  NOT NULL DEFAULT 'normal' ,-- '状态:normal-正常,hidden-禁用',
  create_time datetime DEFAULT NULL ,-- '创建时间',
  update_time datetime DEFAULT NULL ,-- '更新时间',
  
) --='角色管理';

insert  into hkcms_auth_group values ('超级管理员',0,'*','','normal',GETDATE(),GETDATE());


IF EXISTS (select * from sysobjects where name='hkcms_auth_group_access')--判断是否存在此表
    DROP TABLE hkcms_auth_group_access
CREATE TABLE hkcms_auth_group_access (
  admin_id int primary key identity(1, 1) ,-- '管理员ID',
  group_id int NOT NULL ,-- '角色组ID',
  create_time datetime DEFAULT NULL ,-- '创建时间',
  update_time datetime DEFAULT NULL ,-- '更新时间',
  
) --='权限分组表';

insert  into hkcms_auth_group_access values (1,GETDATE(),GETDATE());


IF EXISTS (select * from sysobjects where name='hkcms_auth_rule')--判断是否存在此表
    DROP TABLE hkcms_auth_rule
CREATE TABLE hkcms_auth_rule (
  id int primary key identity(1, 1) ,-- 'ID',
  parent_id int NOT NULL DEFAULT '0' ,-- '父级',
  name char(80)  NOT NULL unique DEFAULT '' ,-- '规则',
  title char(50)  NOT NULL DEFAULT '' ,-- '标题',
  route char(80)  NOT NULL ,-- '路由',
  app char(20)  NOT NULL DEFAULT '' ,-- '所属应用',
  icon char(50)  NOT NULL DEFAULT '' ,-- '图标',
  remark char(250)  NOT NULL DEFAULT '' ,-- '备注',
  weigh int NOT NULL DEFAULT '0' ,-- '排序',
  type int NOT NULL DEFAULT '1' ,-- '类型:0-权限规则,1-菜单,2-菜单头',
  status varchar(20)  NOT NULL DEFAULT 'normal' ,-- '状态:normal-正常,hidden-禁用',
  is_nav int NOT NULL DEFAULT '0' ,-- '快速导航:1-是,0-否',
  condition char(100)  NOT NULL DEFAULT '' ,-- '附加条件',
  create_time datetime DEFAULT NULL ,-- '创建时间',
  update_time datetime DEFAULT NULL ,-- '更新时间',

)--='菜单规则';

--set IDENTITY_INSERT hkcms_auth_rule ON ----设置标识列可以显示添加数据
--SET IDENTITY_INSERT hkcms_auth_rule OFF ----设置标识列不可以显示添加数据 

insert into hkcms_auth_rule values (0,'index/dashboard','Dashboard','','','fas fa-tachometer-alt','',5,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (58,'auth','Auth','','','fas fa-user-alt','',17,1,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (34,'auth/rule','Menu','auth.rule/index','','far fa-circle','',20,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (35,'auth/rule/index','View','auth.rule/index','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (35,'auth/rule/add','Add','auth.rule/add','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (35,'auth/rule/edit','Edit','auth.rule/edit','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (35,'auth/rule/del','Delete','auth.rule/del','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());


insert into hkcms_auth_rule values (34,'auth/admin','Admin','auth.admin/index','','far fa-circle','',18,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (34,'auth/group','Group','auth.group/index','','far fa-circle','',19,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (34,'auth/adminlog','Admin log','auth.adminlog/index','','far fa-circle','',21,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (57,'appcenter','Application','','','fas fa-th','',31,1,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (58,'cms/model','Model','cms.model/index','','fas fa-database','',16,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (0,'cms/category','Category','cms.category/index','','fas fa-list','',7,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (0,'cms/content/index','Content','cms.content/index','','fas fa-file','',6,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (35,'auth/rule/batches','Batch edit','auth.rule/batches','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (108,'routine/config','Site config','routine.config/index','','fas fa-globe','',11,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (42,'auth/adminlog/index','View','auth.adminlog/index','','far fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (58,'routine/attachment','Attachment','routine.Attachment/index','','fas fa-folder','',15,1,'normal',1,'',GETDATE(),GETDATE());


insert into hkcms_auth_rule values (50,'routine/config/edit','Edit','routine.config/edit','','far fa-circle','',20,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (0,'cms/recommend','Site module','cms.recommend/index','','fas fa-cubes','',8,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (0,'more','More','','','far fa-circle','',30,2,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (0,'setting','Setting','','','far fa-circle','',9,2,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (40,'auth/admin/edit','Edit','auth.admin/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (40,'auth/admin/index','View','auth.admin/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (40,'auth/admin/add','Add','auth.admin/admin','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (40,'auth/admin/del','Delete','auth.admin/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (40,'auth/admin/batches','Batch edit','auth.admin/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (41,'auth/group/index','View','auth.group/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (41,'auth/group/add','Add','auth.group/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (41,'auth/group/edit','Edit','auth.group/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (41,'auth/group/del','Delete','auth.group/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (41,'auth/group/batches','Batch edit','auth.group/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (42,'auth/adminlog/del','Delete','auth.adminlog/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (52,'common/upload','Upload','','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (52,'routine/attachment/del','Delete','routine.attachment/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (52,'routine/attachment/index','View','routine.attachment/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/index','View','cms.model/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/add','Add','cms.model/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/edit','Edit','cms.model/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/del','Delete','cms.model/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (745,'cms/modelfield/index','Model field view','cms.model_field/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/modelfield/add','Model field add','cms.model_field/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/modelfield/edit','Model field edit','cms.model_field/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/modelfield/del','Model field delete','cms.model_field/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/batches','Batch edit','cms.model/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/modelfield/batches','Model field batch edit','cms.model_field/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (55,'cms/recommend/index','View','cms.recommend/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (55,'cms/recommend/add','Add','cms.recommend/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (55,'cms/recommend/edit','Edit','cms.recommend/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (55,'cms/recommend/del','Delete','cms.recommend/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (55,'cms/recommend/batches','Batch edit','cms.recommend/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/index','View','cms.category/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/add','Add','cms.category/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/del','Delete','cms.category/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/edit','Edit','cms.category/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/batches','Batch edit','cms.category/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/recycle','Recycle','cms.category/recycle','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/destroy','Destroy','cms.category/destroy','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/restore','Restore','cms.category/restore','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (43,'appcenter/index','Local','','','fa fa-cloud-download-alt','',32,1,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (43,'appcenter/online','Online','','','fas fa-cloud','',33,1,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/auth','Column auth','cms.ategory/auth','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/modelfield/fieldcategory', 'Designated column', 'cms.model_field/fieldcategory', '','fas fa-circle', '', 0, 0, 'normal', 0, '', GETDATE(),GETDATE());
insert into hkcms_auth_rule values (46,'cms/category/fields','Extended field','cms/category/fields','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/export','Model export','cms.model/export','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/import','Model import','cms.model/import','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (45,'cms/model/copy','Model copy','cms.model/copy','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (52,'routine/attachment/edit','Edit','routine.attachment/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (108,'routine/seo/index','SEO Setting','routine.Seo/index','','fas fa-link','',12,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (108,'cms/flags','Flag','cms.flags/index','','fas fa-file-alt','',13,1,'normal',1,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (58,'config','Configure','','','fas fa-cog','',10,1,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (107,'cms/flags/index','View','cms.flag/index','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (107,'cms/flags/add','Add','cms.flags/add','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (107,'cms/flags/edit','Edit','cms.flags/edit','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (107,'cms/flags/del','Delete','cms.flags/del','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());
insert into hkcms_auth_rule values (107,'cms/flags/batches','Batch edit','cms.flags/batches','','fas fa-circle','',0,0,'normal',0,'',GETDATE(),GETDATE());

/*
insert into hkcms_auth_rule values (114,52,'routine/attachment/water','Watermark','routine.attachment/water','','fas fa-tint','',0,0,'normal',1,'',1658593132,1658593132);
insert into hkcms_auth_rule values (115,52,'routine/attachment/thumb','Thumbnail','routine.attachment/thumb','','far fa-image','',0,0,'normal',1,'',1658593175,1658593175);
insert into hkcms_auth_rule values (116,0,'index/clearcache','Clean cache','','','fas fa-circle','',5,0,'normal',0,'',1594779897,1617268812);
insert into hkcms_auth_rule values (117,108,'tags/index','Tags manage','','','fas fa-tags','',15,1,'normal',1,'',1666665197,1666665361);
insert into hkcms_auth_rule values (118,117,'tags/add','Add','','','far fa-circle','',100,0,'normal',0,'',1666665197,1666665197);
insert into hkcms_auth_rule values (119,117,'tags/edit','Edit','','','far fa-circle','',100,0,'normal',0,'',1666665197,1666665197);
insert into hkcms_auth_rule values (120,117,'tags/delete','Delete','','','far fa-circle','',100,0,'normal',0,'',1666665197,1666665197);
insert into hkcms_auth_rule values (123,58,'user','Member','','','fas fa-user-tie','',100,1,'normal',0,'',1669370924,1669371783);
insert into hkcms_auth_rule values (124,123,'user/user','Member','user.user/index','','far fa-user-circle','',0,1,'normal',1,'',1669370924,1669371278);
insert into hkcms_auth_rule values (125,124,'user/user/index','View','user.user/index','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (126,124,'user/user/edit','Edit','user.user/edit','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (127,124,'user/user/del','Delete','user.user/del','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (128,124,'user/user/batches','Batch edit','user.user/batches','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (129,123,'user/group','Member group','user.group/index','','fas fa-users','',0,1,'normal',1,'',1669370924,1669371795);
insert into hkcms_auth_rule values (130,129,'user/group/index','View','user.group/index','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (131,129,'user/group/edit','Edit','user.group/edit','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (132,129,'user/group/add','Add','user.group/add','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (133,129,'user/group/del','Delete','user.group/del','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (134,129,'user/group/batches','Batch edit','user.group/batches','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (135,123,'user/rule','Member rule','user.rule/index','','fas fa-user-lock','',0,1,'normal',1,'',1669370924,1669371418);
insert into hkcms_auth_rule values (136,135,'user/rule/index','View','user.rule/index','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (137,135,'user/rule/edit','Edit','user.rule/edit','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (138,135,'user/rule/add','Add','user.rule/add','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (139,135,'user/rule/del','Delete','user.rule/del','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669370924);
insert into hkcms_auth_rule values (140,135,'user/rule/batches','Batch edit','user.rule/batches','','fas fa-circle','',0,0,'normal',0,'',1669370924,1669371448);
insert into hkcms_auth_rule values (141,50,'routine/lang','Lang management','routine.Lang','','fas fa-language','',100,0,'normal',1,'',1682150648,1682151957);
insert into hkcms_auth_rule values (142,141,'routine/lang/index','View','routine.Lang/index','','fas fa-circle','',100,0,'normal',0,'',1682150953,1682150953);
insert into hkcms_auth_rule values (143,141,'routine/lang/add','Add','routine.Lang/add','','fas fa-circle','',100,0,'normal',0,'',1682151046,1682151046);
insert into hkcms_auth_rule values (144,141,'routine/lang/edit','Edit','routine.Lang/edit','','fas fa-circle','',100,0,'normal',0,'',1682151102,1682151102);
insert into hkcms_auth_rule values (145,141,'routine/lang/del','Delete','routine.Lang/del','','fas fa-circle','',100,0,'normal',0,'',1682151166,1682152133);
insert into hkcms_auth_rule values (146,141,'routine/lang/batches','Batch edit','routine.Lang/batches','','fas fa-circle','',100,0,'normal',0,'',1682151621,1682151621);
insert into hkcms_auth_rule values (147,141,'routine/lang/setdefault','Set default','routine.Lang/setDefault','','fas fa-circle','',100,0,'normal',0,'',1682151785,1682152199);
insert into hkcms_auth_rule values (148,50,'routine/config/index','View','routine.config/index','','fas fa-circle','',10,0,'normal',0,'',1682152458,1682152494);
insert into hkcms_auth_rule values (149,50,'routine/config/add','Add','routine.config/edit','','fas fa-circle','',30,0,'normal',0,'',1682152809,1682152816);

*/

【研究中2】sql server权限用户设置_第1张图片

IF EXISTS (select * from sysobjects where name='hkcms_auth_rule')--判断是否存在此表
    DROP TABLE hkcms_auth_rule
CREATE TABLE hkcms_auth_rule (
  id int primary key identity(1, 1) ,-- 'ID',
  parent_id int NOT NULL DEFAULT '0' ,-- '父级',
  name char(80)  NOT NULL unique DEFAULT '' ,-- '规则',
  title char(50)  NOT NULL DEFAULT '' ,-- '标题',
  route char(80)  NOT NULL ,-- '路由',
  app char(20)  NOT NULL DEFAULT '' ,-- '所属应用',
  icon char(50)  NOT NULL DEFAULT '' ,-- '图标',
  remark char(250)  NOT NULL DEFAULT '' ,-- '备注',
  weigh int NOT NULL DEFAULT '0' ,-- '排序',
  type int NOT NULL DEFAULT '1' ,-- '类型:0-权限规则,1-菜单,2-菜单头',
  status varchar(20)  NOT NULL DEFAULT 'normal' ,-- '状态:normal-正常,hidden-禁用',
  is_nav int NOT NULL DEFAULT '0' ,-- '快速导航:1-是,0-否',
  condition char(100)  NOT NULL DEFAULT '' ,-- '附加条件',
  create_time datetime DEFAULT NULL ,-- '创建时间',
  update_time datetime DEFAULT NULL ,-- '更新时间',

)--='菜单规则';

你可能感兴趣的:(java,数据库,sql)