import { IEvent } from '@irontitan/tardis' ; import { IEventEntity } from '../../interfaces/IEventEntity' ; import { IEntityConstructor } from '../../interfaces/IEntityConstructor' ; import { IPaginatedQueryResult } from '../../interfaces/IPaginatedQueryResult' ; export abstract class EventRepository < TEntity extends IEventEntity > { protected readonly _Entity : IEntityConstructor < TEntity > ; constructor ( Entity ) { this . _Entity = Entity ; } abstract async save ( entity , force ? ) ; abstract async findById ( id ) ; protected abstract async existBy ( query ) ; abstract async _runPaginatedQuery ( query , page , size , sort ) ; }