@mini2/core
Version:
Mini Express Framework - Lightweight and modular Express.js framework with TypeScript support
9 lines • 479 B
TypeScript
export interface IRepository<IdentifierType, ModelType> {
findAll(): Promise<ModelType[]>;
findById(id: IdentifierType): Promise<ModelType | null>;
create(item: ModelType): Promise<ModelType>;
update(id: IdentifierType, item: Partial<ModelType>): Promise<ModelType>;
delete(id: IdentifierType): Promise<void>;
findPaginated(query: Partial<ModelType>, page: number, limit: number): Promise<ModelType[]>;
}
//# sourceMappingURL=repository.interface.d.ts.map