Browse Source

refactor(types): compilation

qinlaiqiao 4 years atrás
parent
commit
180bdd1c4a
1 changed files with 22 additions and 17 deletions
  1. 22 17
      types/src/interface/compilation.ts

+ 22 - 17
types/src/interface/compilation.ts

@@ -1,4 +1,3 @@
-import { ELockInfo } from './user';
 import { TaxType, IGLJCol } from './project';
 import { IFileRef, INumFileRef } from './base';
 
@@ -7,6 +6,7 @@ export interface ICptItem {
   name: string;
   description: string;
 }
+
 export interface IProgramLib extends INumFileRef {
   displayName: string;
 }
@@ -62,25 +62,30 @@ export enum versionType {
   PRO = 'pro', // 专业版
 }
 
+export enum LockInfo {
+  BORROW = 1, // 借用
+  BUY = 2, // 销售
+}
+
 export interface ICompilation {
   ID: string;
   name: string;
-  creator?: string;
-  createTime?: number;
-  releaseTime?: number;
-  rationValuations?: any;
-  billValuations?: IValuation[];
-  isRelease?: boolean;
-  description?: string;
-  overWriteUrl?: string;
-  categoryID?: string;
-  example?: number[];
-  adProjects?: number[];
+  creator: string;
+  createTime: number;
+  releaseTime: number;
+  rationValuations: any;
+  billValuations: IValuation[];
+  isRelease: boolean;
+  description: string;
+  overWriteUrl: string;
+  categoryID: string;
+  example: number[];
+  adProjects: number[];
 
   // 附加
-  version?: versionType; // 版本
-  versionText?: string; // 版本对应的显示文字:免费版,学习版,专业版
-  lockInfo?: ELockInfo; //
+  version: versionType; // 版本
+  versionText: string; // 版本对应的显示文字:免费版,学习版,专业版
+  lockInfo: LockInfo; // 锁信息
 }
 
 export enum ValuationType {
@@ -98,6 +103,6 @@ export interface IProCptItem {
   remark: string;
   // 截至时间,0 代表无限制
   deadline: number;
-  // 锁信息 1:借出;2:销售
-  lock: number;
+  // 锁信息
+  lock: LockInfo;
 }