import { IRepositoryBase } from '../interfaces'; export abstract class RepositoryBase implements IRepositoryBase { private readonly _model: any; constructor(model: any) { this._model = model; } public async create(data: any, options?: any): Promise { return this._model.create(data, options); } public async findAll(options: any): Promise { return this._model.findAll(options); } public async findAllWithPagination( options: any, ): Promise<{ count: number; rows: T[] }> { return this._model.findAndCountAll(options); } public async findOne(options: any): Promise { return this._model.findOne(options); } public async findByPk(id: string, options?: any): Promise { return this._model.findByPk(id, options); } update(data: any, options?: any): Promise { return this._model.update(data, options); } }