Soft delete an entity by its ID. This operation marks the entity as deleted without permanently destroying the record.
The ID of the entity to delete. @returns- A promise that resolves to the deleted entity or null if not found.
Destroy an entity by its ID (permanently deletes it).
The ID of the entity to destroy.
Find an entity by its ID.
Find one entity matching the query.
List entities matching the query.
Update an entity by its ID.
Update a single entity matching the filter.
| null>} - A promise that resolves to the updated entity or null if not found.
Upsert a single record based on certain criteria.
The return types of this method align with the MongoDB UpdateResult interface
models.baseModel.Saved<T>['_id'] if the document did not exist (an upsert took place).null if the document did exist before the upsert operation.
The name of the model.