import { DageFileResponseType } from "@dage/pc-components";

export interface LoginRequest {
  userName: string;
  passWord: string | string[];
}
export interface LoginResponse {
  token: string;
  user: {
    id: number;
    nickName: string;
    realName: string;
    phone: string;
    thumb: string;
    isAdmin: boolean;
    isEnabled: boolean;
  };
}

export interface UpdatePwdRequest {
  newPassword: string | string[];
  oldPassword: string | string[];
}

export enum ResponseStatusCode {
  SUCCESS = 0,
  TOKEN_INVALID = 5001,
  TOKEN_INVALID2 = 5002,
}

export interface IFileTemplateForm {
  name: string;
  isUpload: number;
  file?: DageFileResponseType[];
  suffix?: string[];
}
export interface IFileTemplateFormParams
  extends Omit<IFileTemplateForm, "file" | "suffix"> {
  fileName?: string;
  filePath?: string;
  suffix?: string;
  level: number;
  module: "norm" | "assess";
}
export interface IFileTemplateFormResponse
  extends Required<IFileTemplateFormParams> {
  id: number;
}

export enum YES_OR_NO {
  YES = 1,
  NO = 0,
}

export * from "./log";
export * from "./user";
export * from "./assessment";
