Files
dacli/src/commands/org/index.ts
T

25 lines
784 B
TypeScript

/**
* commands/org/index.ts — org 父命令
*
* JNPF 组织/部门/岗位 (permission/organize + permission/position)
*
* 决策 7: 组织是 P1 权限三角 3 号 (先建组织, 再建用户, 最后建角色赋权)
*
* 子命令:
* list 组织树列表
* tree 树形展示
* create 新建
*/
import { Command } from 'commander'
import { buildOrgListCommand } from './list.ts'
import { buildOrgTreeCommand } from './tree.ts'
import { buildOrgCreateCommand } from './create.ts'
export function buildOrgCommand(): Command {
const cmd = new Command('org').description('组织 (P1 权限三角 3 号, 组织/部门/岗位)')
cmd.addCommand(buildOrgListCommand())
cmd.addCommand(buildOrgTreeCommand())
cmd.addCommand(buildOrgCreateCommand())
return cmd
}