pos-be/src/modules/transaction/reconciliation/domain/usecases/managers/detail-reconciliation.manag...

56 lines
1.5 KiB
TypeScript

import { Injectable } from '@nestjs/common';
import { BaseDetailManager } from 'src/core/modules/domain/usecase/managers/base-detail.manager';
import { RelationParam } from 'src/core/modules/domain/entities/base-filter.entity';
import { TransactionEntity } from 'src/modules/transaction/transaction/domain/entities/transaction.entity';
@Injectable()
export class DetailReconciliationManager extends BaseDetailManager<TransactionEntity> {
async prepareData(): Promise<void> {
return;
}
async beforeProcess(): Promise<void> {
return;
}
async afterProcess(): Promise<void> {
return;
}
get relations(): RelationParam {
return {
// relation only join (for query purpose)
joinRelations: [],
// relation join and select (relasi yang ingin ditampilkan),
selectRelations: [],
// relation yang hanya ingin dihitung (akan return number)
countRelations: [],
};
}
get selects(): string[] {
return [
`${this.tableName}.id`,
`${this.tableName}.reconciliation_mdr`,
`${this.tableName}.payment_type`,
`${this.tableName}.payment_type_method_id`,
`${this.tableName}.payment_type_method_name`,
`${this.tableName}.payment_type_method_number`,
`${this.tableName}.payment_code_reference`,
`${this.tableName}.payment_date`,
`${this.tableName}.payment_total`,
`${this.tableName}.payment_total_net_profit`,
];
}
get setFindProperties(): any {
return {
id: this.dataId,
};
}
}