This commit is contained in:
2025-12-10 12:38:55 +01:00
parent 0f7fe67d3c
commit fbbcf414a4
87 changed files with 11972 additions and 390 deletions

View File

@@ -0,0 +1,39 @@
/**
* 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;
}>>;
}