import { PageQueryParam, PageResult } from '../base';

/**
 * 参数id
 */
export interface IdParam {
  id: number | string;
}

/**
 * 用户管理请求参数
 */
export interface EmployeeQueryParam extends PageQueryParam {
  property?: string;
  direction?: string;
}

/**
 * 用户管理分页项类型
 */
export type EmployeePageResult = PageResult<EmployeeItem[]>;

/**
 * 用户管理列表分页列表项
 */
export interface EmployeeItem {
  id: number;
  username: string;
  avatar: string;
  realName: string | null;
  roleId: number;
  roleName: string;
  department: Department;
  enable: number;
  status: number;
  qq: string;
  mobilePhone: string;
  email: string;
  lastLoginIp: any;
  lastLoginTime: string;
}

/**
 * 部门数据项
 */
export interface Department {
  id: number;
  name: string;
  leaderId: number;
  remark: string;
  createTime: string;
  updateTime: string;
}

/**
 * 用户表单提交数据项
 */
export interface EmployeeFormData {
  id?: number | null;
  username: string;
  password: string;
  passwdCheck: string;
  realName: string;
  mobilePhone: string;
  roleId: number | string;
  departmentId: number | string;
  enable: number;
  qq: string;
  email: string;
  avatar: string;
}

export interface EmployeeDetail {
  id: number;
  username: string;
  avatar: string;
  departmentId: number;
  departmentName: string;
  email: string;
  enable: number;
  mobilePhone: string;
  qq: string;
  realName: string;
  role: string;
  roleId: number;
}


/**
 * 修改密码参数
 */
 export interface ChangePwdParam {
  id: number;
  lastPassword: string;
  newPassword: string
}