type.ts 765 B

12345678910111213141516171819202122
  1. import { IS_DISABLED } from "@/types/common/constants"
  2. /* V4: 部门树结构 */
  3. export interface DeptTreeItem {
  4. id: number | null,
  5. deptName: string, // 部门名称
  6. parentId: number | null, // 上级部门 id
  7. orderNum: number | undefined, // 排序
  8. createdBy: number, // 创建人
  9. updatedBy: number, // 更新人
  10. createdAt: string, // 创建时间
  11. updatedAt: string, // 更新时间
  12. isDeleted: number, // 0-未删除。 大于 0-已删除
  13. tenantId: number, // 租户 ID
  14. userCount: number, // 组织下的用户数量
  15. }
  16. export type DeptTree = DeptTreeItem & { children: DeptTreeItem[] }
  17. export type addDeptProps = Pick<DeptTreeItem, 'parentId' | 'deptName' | 'orderNum'>
  18. export type editDeptProps = addDeptProps & {id?: DeptTreeItem['id']}