23 lines
691 B
TypeScript
23 lines
691 B
TypeScript
import type { Presenter } from '../../../shared/presentation/Presenter';
|
|
import { UpdateMemberPaymentResultDTO } from '../dtos/UpdateMemberPaymentDTO';
|
|
|
|
export class UpdateMemberPaymentPresenter implements Presenter<UpdateMemberPaymentResultDTO, UpdateMemberPaymentResultDTO> {
|
|
private result: UpdateMemberPaymentResultDTO | null = null;
|
|
|
|
reset() {
|
|
this.result = null;
|
|
}
|
|
|
|
present(dto: UpdateMemberPaymentResultDTO) {
|
|
this.result = dto;
|
|
}
|
|
|
|
getResponseModel(): UpdateMemberPaymentResultDTO | null {
|
|
return this.result;
|
|
}
|
|
|
|
get viewModel(): UpdateMemberPaymentResultDTO {
|
|
if (!this.result) throw new Error('Presenter not presented');
|
|
return this.result;
|
|
}
|
|
} |