import { PaginationRequest } from '@/types/common/type';
export interface formParamsType {
  userId?: number | null;
  roleIds?: number[];
  isEnable: boolean;
  email: string;
  mobile: string;
  nickname: string;
  password: string;
  passwordRe: string;
  remark: string;
  sex: string;
  username: string;
  deptId?: null;
  postId?: number[];
}

/** 编辑弹框类型，有新建和编辑两种 */
export enum EditType {
  create = 1,
  edit = 2,
}

export const ROOT_USER = 'root';

export interface OptionsProps {
  value: string | number;
  label: string;
}

export interface QueryParamas {
  realname?: string; // 用户姓名
  mobile?: string; // 手机号
  staffNo?: string; // 工号
  deptId?: number; // 部门
  roleId?: number; // 角色id
}
export type SearchParamsProps = PaginationRequest & { queryParam: QueryParamas };

/* 状态: 0-启用, 1-禁用 */
export enum DisabledEnum {
  NO = 0,
  YES = 1,
}

/* 工号模糊查询组织人员树 用户信息 */
export interface UserItem {
  id: number;
  appAccountId: string;
  appAccountAccountNo: string;
  appAccountAccountName: string;
  idtUserEmail: string;
  idtUserUserEmail: string;
  idtUserMobile: string;
  idtUserWorkNo: string;
  idtUserPinyin: string;
  useTypes: string;
  requestLogActionFlag: number;
  requestLogActionDesc: string;
  createdAt: string;
  updatedTime: string;
  isDeleted: number;
}

/* 组织人员树 */
export interface OrganizationUserTree {
  idtOrgId: string;
  idtOrgName: string;
  idtOrgParentId: string;
  idtOrgOrgCode: string;
  users: UserItem[];
  children: OrganizationUserTree[];
}
