/**
 * 统一认证
 */
export enum IAuthTaskType {
  /**
   * 获取token模式
   */
  AUTH_TASK_TOKEN = 0,
  /**
   * token登录模式
   */
  AUTH_TASK_USER = 1,
  /**
   * 登录页面模式
   */
  AUTH_TASK_START_AUTH = 2,
  /**
   * 多因子绑定模式
   */
  AUTH_TASK_BIND = 3,
  /**
   * 多因子解绑模式
   */
  AUTH_TASK_UNBIND = 4,
  /**
   * 个人信息修改模式
   */
  AUTH_TASK_SET_UP = 5,
}


export class AuthUserModel {
  age?: number;
  birthdate?: string;
  code: string = '';
  email?: string;
  orderId: number;
  orgId: string;
  orgName: string;
  phoneNum?: string;
  policeTypeId: string;
  policeTypeName: string;
  profilePhoto?: string;
  realName: string;
  token: string;
  userName: string;
  userNum: string;
  workPhone?: string;
  sysTypeId: string;

  constructor(code: string, orderId: number, orgId: string, orgName: string, policeTypeId: string,
    policeTypeName: string, realName: string, token: string, userName: string, userNum: string,
    sysTypeId: string, age?: number, birthdate?: string, email?: string, phoneNum?: string,
    profilePhoto?: string, workPhone?: string) {

    this.code = code;
    this.orderId = orderId;
    this.orgId = orgId;
    this.orgName = orgName;
    this.policeTypeId = policeTypeId;
    this.policeTypeName = policeTypeName;
    this.realName = realName;
    this.token = token;
    this.userName = userName;
    this.userNum = userNum;
    this.sysTypeId = sysTypeId;
    this.age = age === undefined ? 0 : age;
    this.birthdate = birthdate === undefined ? '' : birthdate;
    this.email = email === undefined ? '' : email;
    this.phoneNum = phoneNum === undefined ? '' : phoneNum;
    this.profilePhoto = profilePhoto === undefined ? '' : profilePhoto;
    this.workPhone = workPhone === undefined ? '' : workPhone;
  }
}
