namespace MeterVault.Core.Domain;
///
/// A price component with a validity range (price history), scoped globally, per energy
/// type, or per meter (SDD ยง5.3 tariff, FR-9). null = open-ended.
///
public sealed class Tariff
{
public int Id { get; set; }
public TariffScope ScopeType { get; set; }
/// energy_type.id or meter.id; null for global scope.
public int? ScopeId { get; set; }
public TariffComponent Component { get; set; }
public double Value { get; set; }
/// e.g. 'EUR/kWh', 'EUR/m3', 'EUR/100L', 'EUR/month'.
public required string Unit { get; set; }
public string Currency { get; set; } = "EUR";
public DateOnly ValidFrom { get; set; }
public DateOnly? ValidTo { get; set; }
public string? Notes { get; set; }
}