39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
/**
|
|
* Repository Interface: ISponsorshipPricingRepository
|
|
*
|
|
* Stores sponsorship pricing configuration for any sponsorable entity.
|
|
* This allows drivers, teams, races, and leagues to define their sponsorship slots.
|
|
*/
|
|
|
|
import type { SponsorshipPricing } from '../value-objects/SponsorshipPricing';
|
|
import type { SponsorableEntityType } from '../entities/SponsorshipRequest';
|
|
|
|
export interface ISponsorshipPricingRepository {
|
|
/**
|
|
* Get pricing configuration for an entity
|
|
*/
|
|
findByEntity(entityType: SponsorableEntityType, entityId: string): Promise<SponsorshipPricing | null>;
|
|
|
|
/**
|
|
* Save or update pricing configuration for an entity
|
|
*/
|
|
save(entityType: SponsorableEntityType, entityId: string, pricing: SponsorshipPricing): Promise<void>;
|
|
|
|
/**
|
|
* Delete pricing configuration for an entity
|
|
*/
|
|
delete(entityType: SponsorableEntityType, entityId: string): Promise<void>;
|
|
|
|
/**
|
|
* Check if entity has pricing configured
|
|
*/
|
|
exists(entityType: SponsorableEntityType, entityId: string): Promise<boolean>;
|
|
|
|
/**
|
|
* Find all entities accepting sponsorship applications
|
|
*/
|
|
findAcceptingApplications(entityType: SponsorableEntityType): Promise<Array<{
|
|
entityId: string;
|
|
pricing: SponsorshipPricing;
|
|
}>>;
|
|
} |