import abc from datetime import datetime from app.models import CampaignBatch from app.strategies.types import QuotaAllocation, QuotaStrategyType class QuotaAllocationStrategy(abc.ABC): """ Abstract base class for email campaign quota allocation strategies. Defines the contract for allocating available quota among competing campaign batches for a specific (domain_id, provider) pair. """ strategy_type: QuotaStrategyType @abc.abstractmethod def allocate_quota( self, batches: list[CampaignBatch], available_quota: int, current_time: datetime, ) -> list[QuotaAllocation]: """Allocate available quota to campaign batches."""