yohei0125 4 лет назад
Родитель
Сommit
1fbc05e905
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      packages/app/src/server/models/page-operation.ts

+ 4 - 1
packages/app/src/server/models/page-operation.ts

@@ -1,11 +1,12 @@
+import { getOrCreateModel } from '@growi/core';
 import mongoose, {
   Schema, Model, Document, QueryOptions, FilterQuery,
 } from 'mongoose';
-import { getOrCreateModel } from '@growi/core';
 
 import {
   IPageForResuming, IUserForResuming, IOptionsForResuming,
 } from '~/server/interfaces/page-operation';
+
 import { ObjectIdLike } from '../interfaces/mongoose-utils';
 
 type IObjectId = mongoose.Types.ObjectId;
@@ -39,6 +40,7 @@ export interface IPageOperation {
   user: IUserForResuming,
   options?: IOptionsForResuming,
   incForUpdatingDescendantCount?: number,
+  isFailure: boolean,
 }
 
 export interface PageOperationDocument extends IPageOperation, Document {}
@@ -94,6 +96,7 @@ const schema = new Schema<PageOperationDocument, PageOperationModel>({
   user: { type: userSchemaForResuming, required: true },
   options: { type: optionsSchemaForResuming },
   incForUpdatingDescendantCount: { type: Number },
+  isFailure: { type: Boolean, default: false, required: true },
 });
 
 schema.statics.findByIdAndUpdatePageActionStage = async function(