Jelajahi Sumber

feat(types): 新的用户类型

qinlaiqiao 4 tahun lalu
induk
melakukan
ef5d1df1ae
1 mengubah file dengan 68 tambahan dan 0 penghapusan
  1. 68 0
      types/src/interface/user.ts

+ 68 - 0
types/src/interface/user.ts

@@ -95,6 +95,74 @@ export interface IUser {
   defaultEnterprise?: string;
 }
 
+interface IProCptItem {
+  // 编办 ID
+  compilationID: string;
+  // 开通时间
+  upgradeTime: number;
+  // 是否激活
+  activated: boolean;
+  // 备注
+  remark: string;
+  // 截至时间,0 代表无限制
+  deadline: number;
+  // 锁信息 1:借出;2:销售
+  lock: number;
+}
+
+interface IUsedCptItem {
+  // 编办 ID
+  compilationID: string;
+  // 第一次使用的时间
+  firstUseTime: number;
+}
+
+interface IContactItem {
+  // 用户 ID
+  userID: string;
+  // 第一成为联系人的时间
+  firstContactTime: number;
+}
+
+interface IEverydayOnlineTimeItem {
+  // 日期
+  date: number;
+  // 在线时长
+  onlineTime: number;
+}
+
+interface ISummary {
+  // 最后登录时间
+  lastLoginTime: number;
+  // 上次使用的编办
+  lastUsedCpt: string;
+  // 总共在线时长
+  totalOnlineTime: number;
+  // 今天目前的在线时长
+  todayOnlineTime: number;
+  // 每天的在线时长
+  everydayOnlineTime: IEverydayOnlineTimeItem[];
+}
+
+// todo 临时的,用于替代 IUser
+export interface IUserTmp {
+  ID: string;
+  ssoID: string;
+  mobile: string;
+  email: string;
+  qq: string;
+  realName: string;
+  avatar: string;
+  createTime: number;
+  proCptList: IProCptItem[];
+  usedCptList: IUsedCptItem[];
+  contacts: IContactItem[];
+  onlySMSLogin: boolean;
+  abnormalLoginAlert: boolean;
+  defaultEnterprise: string;
+  summaryInfo: ISummary;
+}
+
 // 最近联系人
 export interface IRecentUser extends IUser {
   recentDate: number;