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.
ProtectedgetUpdate an entity by its ID.
The ID of the entity to update.
The partial entity to update.
Optionaloptions: UpdateOptionsUpsert 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.