/* eslint-disable camelcase */ export enum ELockInfo { BORROW = 1, // 借用 BUY = 2, // 销售 } export interface IUpgradeItemInfo { compilationID: string; isUpgrade: boolean; lock?: ELockInfo; } // 实体类型 export enum EntityType { // 个人 PERSON = 1, // 企业 ENTERPRISE = 2, } // 登录类型(与实体类型有语义上的区别) export enum LoginType { PERSON = 'person', ENTERPRISE = 'enterprise', } export enum UserType { NORMAL = 'normal', PROFESSIONAL = 'professional', } export interface IContact { userID: string; } export interface IUsed { compilationId: string; } export interface ISpecifyCptItem { accountType: string; enterpriseID?: string; cptID: string; } // user 表原始字段 export interface IRawUser { _id?: string; qq?: string; real_name?: string; avatar?: string; // 指定的编办 specifyCpt?: string; latest_login?: number; user_type?: string; contacts?: IContact[]; isSmsLogin?: number; isLoginValid?: number; ssoId?: string; email?: string; mobile?: string; create_time?: string; isUserActive?: number; upgrade_list?: IUpgradeItemInfo[]; used_list?: IUsed[]; latest_used?: string; } // 返回给前端的字段 export interface IUser { ID?: string; qq?: string; realName?: string; avatar?: string; // 指定的编办 specifyCpt?: string; latestLogin?: number; userType?: string; contacts?: IContact[]; isSmsLogin?: number; isLoginValid?: number; ssoID?: string; email?: string; mobile?: string; createTime?: string; upgradeList?: IUpgradeItemInfo[]; usedList?: IUsed[]; latestUsed?: string; } // 最近联系人 export interface IRecentUser extends IUser { recentDate: number; } export interface ILoginResult { userID: string; }