refactor
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Application Use Case: GetSponsorshipPricingUseCase
|
||||
*
|
||||
* Retrieves general sponsorship pricing tiers.
|
||||
*/
|
||||
|
||||
import type {
|
||||
IGetSponsorshipPricingPresenter,
|
||||
GetSponsorshipPricingResultDTO,
|
||||
GetSponsorshipPricingViewModel,
|
||||
} from '../presenters/IGetSponsorshipPricingPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
|
||||
export class GetSponsorshipPricingUseCase
|
||||
implements UseCase<void, GetSponsorshipPricingResultDTO, GetSponsorshipPricingViewModel, IGetSponsorshipPricingPresenter>
|
||||
{
|
||||
constructor() {}
|
||||
|
||||
async execute(
|
||||
_input: void,
|
||||
presenter: IGetSponsorshipPricingPresenter,
|
||||
): Promise<void> {
|
||||
presenter.reset();
|
||||
|
||||
const dto: GetSponsorshipPricingResultDTO = {
|
||||
pricing: [
|
||||
{ id: 'tier-bronze', level: 'Bronze', price: 100, currency: 'USD' },
|
||||
{ id: 'tier-silver', level: 'Silver', price: 250, currency: 'USD' },
|
||||
{ id: 'tier-gold', level: 'Gold', price: 500, currency: 'USD' },
|
||||
],
|
||||
};
|
||||
|
||||
presenter.present(dto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user