Skip to content

Commit

Permalink
feat-ModuleActionController-模块及功能删除时,删除对应的权限
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Oct 3, 2024
1 parent bc029bc commit 6bd946c
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
package net.ximatai.muyun.platform.controller;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import net.ximatai.muyun.ability.IChildAbility;
import net.ximatai.muyun.ability.IChildrenAbility;
import net.ximatai.muyun.database.builder.Column;
import net.ximatai.muyun.database.builder.TableWrapper;
import net.ximatai.muyun.model.ChildTableInfo;
import net.ximatai.muyun.model.SortColumn;
import net.ximatai.muyun.platform.ScaffoldForPlatform;

import java.util.List;

@ApplicationScoped
public class ModuleActionController extends ScaffoldForPlatform implements IChildAbility {
public class ModuleActionController extends ScaffoldForPlatform implements IChildAbility, IChildrenAbility {

@Inject
RoleActionController roleActionController;

@Override
public SortColumn getDefatultSortColumn() {
Expand All @@ -35,4 +41,10 @@ public void fitOut(TableWrapper wrapper) {
.addIndex(List.of("id_at_app_module", "v_alias"), true);
}

@Override
public List<ChildTableInfo> getChildren() {
return List.of(
roleActionController.toChildTable("id_at_app_module_action").setAutoDelete()
);
}
}

0 comments on commit 6bd946c

Please sign in to comment.