import { DataSource, EntityTarget, ObjectLiteral, Repository } from "typeorm"; import { IBasicCompany, IBasicLazyEvent, IPropsDiscountUserOrCompany, IPropsLocalReserve, IPropsQueryVerifyLocalInformation, } from "./interfaces"; import { getDiscountsCodeCompanyInformation, getDiscountsCodeUserInformation, getLocalReservesInformation, getLocalsCompanyInformation, getVerifyLocalsInformation, } from "."; import { getLocalsCompanyInformationTable } from "./filters/LocalsCompanyInformationForTheTable"; export class CustomRepository extends Repository { constructor(target: EntityTarget, dataSource: DataSource) { super(target, dataSource.manager); } async getDiscountsCodeUserWrapper(params: IPropsDiscountUserOrCompany) { return await getDiscountsCodeUserInformation(this, params); } async getDiscountsCodeCompanyWrapper(params: IBasicLazyEvent) { return await getDiscountsCodeCompanyInformation(this, params); } async getLocalsCompanyInformationWrapper(params: IBasicCompany) { return await getLocalsCompanyInformation(this, params); } async getVerifyLocalsInformationWrapper( params: IPropsQueryVerifyLocalInformation, ) { return await getVerifyLocalsInformation(this, params); } async getLocalReservesInformationWrapper(params: IPropsLocalReserve) { return await getLocalReservesInformation(this, params); } async getLocalsCompanyInformationForTheTableWrapper(params: IBasicCompany) { return await getLocalsCompanyInformationTable(this, params); } //! DOC: ¿Necesita implementar un método personalizado aquí? // async anyOtherRepository(args: any) { // // Implementa otro método personalizado aquí // } }