2026-04-20 12:24:06 -03:00
|
|
|
namespace SIGCM2.Application.Pricing.ChargeableChars;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-04-21 10:54:47 -03:00
|
|
|
/// PRC-001 — Application service for resolving active chargeable-char config for a ProductType.
|
2026-04-20 12:24:06 -03:00
|
|
|
///
|
2026-04-21 10:54:47 -03:00
|
|
|
/// Priority rule: per-ProductType row overrides global (ProductTypeId IS NULL) for the same Symbol.
|
2026-04-20 12:24:06 -03:00
|
|
|
/// Returns a dictionary keyed by Symbol for O(1) lookup during word-count pricing.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IChargeableCharConfigService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2026-04-21 10:54:47 -03:00
|
|
|
/// Returns the resolved active config for the given ProductType as of the given date.
|
|
|
|
|
/// Per-ProductType rows take priority over global rows for the same Symbol.
|
|
|
|
|
/// Global rows are used as fallback when no per-ProductType row exists for that Symbol.
|
2026-04-20 12:24:06 -03:00
|
|
|
/// Returns an empty dictionary if no config exists at all.
|
|
|
|
|
/// </summary>
|
2026-04-21 10:54:47 -03:00
|
|
|
Task<IReadOnlyDictionary<string, ChargeableCharSnapshot>> GetActiveConfigForProductTypeAsync(
|
|
|
|
|
long productTypeId,
|
2026-04-20 12:24:06 -03:00
|
|
|
DateOnly asOf,
|
|
|
|
|
CancellationToken ct = default);
|
|
|
|
|
}
|