Prechádzať zdrojové kódy

refactor(types): compilation & enterprise

qinlaiqiao 4 rokov pred
rodič
commit
492eaa79f3

+ 1 - 0
types/src/interface/compilation.ts

@@ -63,6 +63,7 @@ export enum versionType {
 }
 
 export enum LockInfo {
+  DEFAULT = 0, // 默认值
   BORROW = 1, // 借用
   BUY = 2, // 销售
 }

+ 21 - 8
types/src/interface/enterprise.ts

@@ -6,14 +6,25 @@ export enum Relationship {
   IRRELEVANT = 'irrelevant',
 }
 
+export enum MemberRole {
+  ADMIN = 'admin',
+  STAFF = 'staff',
+}
+
+export enum MemberStatus {
+  NORMAL = 'normal',
+  DISABLED = 'disabled',
+  UNCONFIRMED = 'unconfirmed',
+}
+
 export interface IMember {
-  ID: string;
+  userID: string;
   memberName: string;
   position: string;
-  role: 'admin' | 'staff';
-  status: 'normal' | 'disabled' | 'unconfirmed';
+  role: MemberRole;
+  status: MemberStatus;
   cptList: string[];
-  createProject: 'yes' | 'no';
+  createProject: boolean;
   projectView: 'self' | 'all';
   editProject: 'self' | 'all';
   exportProject: 'disabled' | 'self' | 'all';
@@ -28,11 +39,13 @@ export interface IEnterprise {
   licenceNum: number;
   proCptList: IProCptItem[];
   usedCptList: string[];
-  enterpriseName: string;
+  // 公司名称
+  name: string;
   logo: string;
-  enterpriseLocation: string[];
-  enterpriseType: string;
-  enterpriseScale: string;
+  location: string[];
+  // 公司类型
+  type: string;
+  scale: string;
   createTime: number;
   passwordCheck: 'no' | 'weak' | 'normal' | 'strong' | 'super';
   subdomain: string;