Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 570 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 570 Bytes

Goals:

  • The purpose of this package is support to define a simple CRUD Rest API quickly.

Required:

  • = @nestjs/mongoose@10.0.2

  • = mongoose@8.0.1

Supported methods:

  • create
  • findOne
  • findAll
  • paginatedAggregate
  • updateOne
  • deleteOne
  • deleteMany
  • count

Usage:

export class AppRepository extends BaseRepository<
    AppDocument,
    CreateDto,
    UpdateDto
> {
    constructor(
        @InjectModel(App.name)
        private _appModel: Model<AppDocument>
    ) {
        super(_appModel);
    }
}