-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsys_role.sql
More file actions
21 lines (18 loc) · 1.1 KB
/
sys_role.sql
File metadata and controls
21 lines (18 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
create table sys_role
(
id bigint auto_increment comment '主键'
primary key,
role_name varchar(50) not null comment '名称',
status_id tinyint default 1 not null comment '状态(1:正常,0:禁用)',
sort int default 1 not null comment '排序',
remark varchar(255) not null comment '备注',
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
constraint role_name
unique (role_name)
)
comment '角色信息';
create index name_status_index
on hertzdb.sys_role (role_name, status_id);
INSERT INTO sys_role (id, role_name, status_id, sort, remark, create_time, update_time) VALUES (1, '超级管理员', 1, 1, '全部权限', current_timestamp, null);
INSERT INTO sys_role (id, role_name, status_id, sort, remark, create_time, update_time) VALUES (3, '演示角色', 1, 1, '仅有查看功能', current_timestamp, null);