Files
KArtSell.Aegis/src/KArtSell.Modules.ModelOperations/Domain/MetricDefinitionVersion.cs
T
kjh2064 dcd1322d41
ci / backend (push) Failing after 12s
ci / frontend (push) Failing after 19s
ci / static (push) Failing after 45s
Initial commit: Add project files
2026-08-02 05:15:36 +09:00

22 lines
823 B
C#

namespace KArtSell.Modules.ModelOperations.Domain;
public sealed record MetricDefinitionVersion(
string MetricCode,
int DefinitionVersion,
string CohortDefinitionHash,
string WindowDefinition,
string AggregationMethod,
string ThresholdContractHash,
DateTimeOffset EffectiveFrom)
{
public void EnsureValid()
{
ArgumentException.ThrowIfNullOrWhiteSpace(MetricCode);
if (DefinitionVersion <= 0) throw new InvalidOperationException("Metric definition version must be positive.");
ArgumentException.ThrowIfNullOrWhiteSpace(CohortDefinitionHash);
ArgumentException.ThrowIfNullOrWhiteSpace(WindowDefinition);
ArgumentException.ThrowIfNullOrWhiteSpace(AggregationMethod);
ArgumentException.ThrowIfNullOrWhiteSpace(ThresholdContractHash);
}
}