import { MenuVO } from '@/api/interface/system/menu'
import { PermissionsVO } from './permissions'
/**
 * 查询参数
 */
export type RoleQuery = PageQuery & {
  roleName?: string
  status?: string
}

/**
 * 接收后端返回信息
 */
export interface RoleVO extends BaseEntity {
  roleId: string
  orgId?: string
  name: string
  code: string
  isLock: string
  category: string
  orderNum: number
  remark?: string
}

/**
 * 传入后端的表单信息
 */
export interface RoleBO {
  roleId: string
  orgId?: string
  name: string
  code: string
  isLock: string
  category: string
  orderNum: number
  remark?: string
  status?: string
}

/**
 * 传入已选菜单
 */
export interface RoleMenuBO {
  roleId: string
  menuIds: string[]
}

/**
 * 接收已有菜单
 */
export interface RoleMenuVO {
  treeMenus: Menu.MenuOptions[]
  hasMenus: string[]
}

/**
 * 传入已选权限
 */
export interface RolePermBO {
  roleId: string
  permIds: string[]
}

/**
 * 接收已有权限
 */
export interface RolePermVO {
  allPermissions: PermissionsVO[]
  hasPermissions: string[]
}
