实现文章与分组管理

This commit is contained in:
2026-06-01 15:31:25 +08:00
parent 32e56b1a0f
commit 0dfbbe5939
15 changed files with 1554 additions and 3 deletions

View File

@@ -128,7 +128,9 @@ insert into permission (name, description, sort) values
('bill', '账单', 13),
('balance_activity', '余额变动', 14),
('proxy', '代理', 15),
('coupon_user', '已发放优惠券', 16);
('coupon_user', '已发放优惠券', 16),
('article', '文档', 17),
('article_group', '文档分组', 18);
-- --------------------------
-- level 2
@@ -215,6 +217,16 @@ insert into permission (parent_id, name, description, sort) values
((select id from permission where name = 'coupon_user' and deleted_at is null), 'coupon_user:read', '读取已发放优惠券列表', 1),
((select id from permission where name = 'coupon_user' and deleted_at is null), 'coupon_user:write', '编辑已发放优惠券', 2);
-- article 子权限
insert into permission (parent_id, name, description, sort) values
((select id from permission where name = 'article' and deleted_at is null), 'article:read', '读取文档列表', 1),
((select id from permission where name = 'article' and deleted_at is null), 'article:write', '编辑文档', 2);
-- article_group 子权限
insert into permission (parent_id, name, description, sort) values
((select id from permission where name = 'article_group' and deleted_at is null), 'article_group:read', '读取文档分组列表', 1),
((select id from permission where name = 'article_group' and deleted_at is null), 'article_group:write', '编辑文档分组', 2);
-- --------------------------
-- level 3
-- --------------------------