import { ICompilation, ICptItem } from './compilation'; /* 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 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 { enterpriseID?: string; _id?: string; qq?: string; real_name?: string; avatar?: string; // 职位 position?: string; company?: string; province?: number; company_type?: number; company_scale?: number; // 指定的编办 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 { enterpriseID?: string; ID?: string; qq?: string; realName?: string; avatar?: string; // 职位 position?: string; // 公司名 companyName?: string; // 省(个人账户只需要精确到省) companyLocation?: number; // 公司类型 companyType?: number; companyScale?: number; // 指定的编办 specifyCpt?: string; latestLogin?: number; userType?: string; contacts?: IContact[]; isSmsLogin?: number; isLoginValid?: number; ssoID?: string; email?: string; mobile?: string; createTime?: string; isUserActive?: number; upgradeList?: IUpgradeItemInfo[]; usedList?: IUsed[]; latestUsed?: string; } // 最近联系人 export interface IRecentUser extends IUser { recentDate: number; } export interface IBootResult { compilation: ICompilation; complete: boolean; } export interface ILoginResult { userInfo: IUser; cptList: ICptItem; }