Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CompaniesRepository

The Company repository

Hierarchy

Index

Constructors

constructor

Properties

collectionName

collectionName: string

The collection name, used also as controller route name

Protected companyModel

companyModel: Model<ICompany>

The injected CompanyModel model

Protected model

model: Model<ICompany>

The mongoose model for this repository

Methods

create

  • create(item: Company): Promise<ICompany>

delete

  • delete(id: string): Promise<boolean>

find

findOne

get

getByOwnerId

partialUpdate

  • partialUpdate(id: string, item: Partial<Company>): Promise<ICompany>

update

  • update(item: Company): Promise<ICompany>

Generated using TypeDoc