Просмотр исходного кода

feat(types): 新增书签批注的类型及IsetData的module新增ModelName的类型

lishihao 5 лет назад
Родитель
Сommit
8cd3cb725f
3 измененных файлов с 13 добавлено и 2 удалено
  1. 1 1
      types/package.json
  2. 6 1
      types/src/interface/base.ts
  3. 6 0
      types/src/interface/bill.ts

+ 1 - 1
types/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@sc/types",
-  "version": "1.0.17",
+  "version": "1.0.18",
   "description": "共用类型文件",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",

+ 6 - 1
types/src/interface/base.ts

@@ -115,6 +115,11 @@ export enum CptModelName {
   installationFee = 'installationFee',
 }
 
+// 一般数据的枚举
+export enum ModelName {
+  bookmarks = 'bookmarks', // 书签批注
+}
+
 export enum ActionType {
   ADD = 'add',
   UPDATE = 'update',
@@ -125,7 +130,7 @@ export enum ActionType {
 // 统一subject更新提交数据入口,为撤销功能做准备
 export interface ISetData<T = any> {
   projectID: string; // 考虑到可能会跨项目更新,提高一层
-  module: CptModelName;
+  module: CptModelName | ModelName;
   action: ActionType;
   actionName?: string; // 除了增删改查,还会有更复杂的操作,用这个来区分
   filter?: any; // 查询条件

+ 6 - 0
types/src/interface/bill.ts

@@ -15,6 +15,11 @@ export interface IItemCharacter {
   eigenvalue: IEigenvalue[];
   isChecked: boolean;
 }
+export interface IBookmark {
+  ID: string;
+  type: string;
+  content: string;
+}
 export interface IBill {
   ID: string;
   parentID: string;
@@ -35,6 +40,7 @@ export interface IBill {
   formula?: string; // 基数计算
   formulaValue?: number; // 基数计算的值
   tenderFormulaValue?: number; // 调价基数计算的值
+  bookMark?: IBookmark; // 书签批注
   [key: string]: any; // 剩下的之后补充
 }