import { ICompilation, ICptItem } from './compilation'; /* eslint-disable camelcase */ export enum ELockInfo { BORROW = 1, // 借用 BUY = 2, // 销售 } export interface IUpgradeInfo { compilationID: string; isUpgrade: boolean; lock?: ELockInfo; [key: string]: any; } // 实体类型 export enum EntityType { // 个人 PERSON = 1, // 企业 ENTERPRISE, } export enum UserType { NORMAL = 'normal', PROFESSIONAL = 'professional', } export interface IContact { userID: string; } export interface IUsed { compilationId: string; } // user 表原始字段 export interface IRawUser { _id?: string; qq?: string; real_name?: string; avatar?: string; position?: string; company?: string; province?: number; company_type?: number; company_scale?: number; 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?: IUpgradeInfo[]; used_list?: IUsed[]; latest_used?: string; [key: string]: any; } // 返回给前端的字段 export interface IUser { ID?: string; qq?: string; realName?: string; avatar?: string; position?: string; company?: string; province?: number; companyType?: number; companyScale?: number; latestLogin?: number; userType?: string; contacts?: IContact[]; isSmsLogin?: number; isLoginValid?: number; ssoID?: string; email?: string; mobile?: string; createTime?: string; isUserActive?: number; upgradeList?: IUpgradeInfo[]; usedList?: IUsed[]; latestUsed?: string; [key: string]: any; } export interface IUserSession extends IUser { enterpriseID: string; // 企业ID } // 最近联系人 export interface IRecentUser extends IUser { recentDate: number; } export interface IBootResult { compilation: ICompilation; complete: boolean; } export interface ILoginResult { userInfo: IUser; cptList: ICptItem; }