chenhj
2025-05-24 58232c4e73eacd83d2ec1ef0c038a35efcc33d0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- ----------------------------
-- 角色和部门关联表  角色1-N部门
-- ----------------------------
 
drop table if exists sys_role_dept;
create table sys_role_dept
(
    role_id bigint not null, -- PostgreSQL 无需指定列长度
    dept_id bigint not null,
    primary key (role_id, dept_id)
);
 
-- ----------------------------
-- 初始化-角色和部门关联表数据
-- ----------------------------
 
insert into sys_role_dept (role_id, dept_id)
values ('2', '100'),
       ('2', '101'),
       ('2', '105');