Przeglądaj źródła

Revert "Add field (isDeleted)"

This reverts commit 6a505a488a9ce2efba8075b2ede2fbf8142fb2e0.
Shun Miyazawa 1 rok temu
rodzic
commit
5f4ba68d8f

+ 0 - 11
apps/app/src/features/openai/server/models/ai-assistant.ts

@@ -45,7 +45,6 @@ interface AiAssistant {
   pages: Ref<IPage>[]
   sharingScope: AiAssistantSharingScope
   learningScope: AiAssistantLearningScope
-  isDeleted: boolean
 }
 
 interface AiAssistantDocument extends AiAssistant, Document {}
@@ -123,20 +122,10 @@ const schema = new Schema<AiAssistantDocument>(
       enum: Object.values(AiAssistantLearningScope),
       required: true,
     },
-    isDeleted: {
-      type: Boolean,
-      default: false,
-      required: true,
-    },
   },
   {
     timestamps: true,
   },
 );
 
-schema.methods.markAsDeleted = async function(): Promise<void> {
-  this.isDeleted = true;
-  await this.save();
-};
-
 export default getOrCreateModel<AiAssistantDocument, AiAssistantModel>('AiAssistant', schema);