Count the number of documents matching the query.
Optionalquery: FilterQuery<BaseBooking>Create a new entity.
The entity to create.
Create multiple entities.
An array of entities to create.
Optionaloptions: CreateManyOptionsSoft 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.
The ID of the entity to find.
Optionalfields: SelectQuery<BaseBooking>[]Fields to select in the returned entity.
OptionalListQueryOptions: ListQueryOptions<BaseBooking>Options for listing queries.
Find one entity matching the query.
Optionalquery: FilterQuery<BaseBooking>Optionalfields: SelectQuery<BaseBooking>[]OptionalListQueryOptions: ListQueryOptions<BaseBooking>List entities matching the query.
Optionalquery: FilterQuery<BaseBooking>The query to filter documents.
Optionalfields: SelectQuery<BaseBooking>[]Fields to select in the returned entities.
OptionalListQueryOptions: ListQueryOptions<BaseBooking>Options for listing queries.
Retrieve paginated results. Only intended for use with the admin portal for performance reasons.
Optionaloptions: PaginateQueryOptions<BaseBooking>The pagination options
Update an entity by its ID.
The ID of the entity to update.
The partial entity to update.
Optionaloptions: UpdateOptionsUpdate multiple entities matching the filter.
The filter to match documents.
The partial update to apply.
Update a single entity matching the filter.
The filter to match documents.
The partial update to apply.
Optionaloptions: UpdateOneOptionsOptions for updating a single document.
| null>} - A promise that resolves to the updated entity or null if not found.
Upsert a single record based on certain criteria.
The filter to find the record to update or insert.
The entity to upsert.
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.