Initial commit: Add project files
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user