Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(manager): add note to the mechanism of archive batch
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Sep 15, 2022
1 parent b30eac6 commit 3657864
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions database/managers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ export default abstract class Manager<
}
}

/**
* Destroys or archives the models with the passed IDs.
*
* If the model is a paranoid, they will be archived which can be restored later.
*
* If the model is not paranoid, they will be deleetd permanently.
*/
async archiveBatch(IDs: X[]): Promise<number> {
try {
const destroyCount = await this.model.destroy(<DestroyOptions<T>>{
Expand Down

0 comments on commit 3657864

Please sign in to comment.