namespace ZB.MOM.WW.ScadaBridge.Commons.Entities.Instances; /// /// Per-instance override of a template-defined native alarm source. The source /// reference is the field that varies per physical instance (Tank01 vs Tank02), /// so per-instance override is the common case. Mirrors /// InstanceAlarmOverride; a null override field leaves the inherited /// value unchanged. /// public class InstanceNativeAlarmSourceOverride { /// Primary key. public int Id { get; set; } /// Foreign key to the owning instance. public int InstanceId { get; set; } /// /// Canonical name of the native alarm source being overridden — matches /// ResolvedNativeAlarmSource.CanonicalName after flattening. /// public string SourceCanonicalName { get; set; } /// Overrides the connection name when set; null = keep inherited. public string? ConnectionNameOverride { get; set; } /// Overrides the source reference when set; null = keep inherited. public string? SourceReferenceOverride { get; set; } /// Overrides the condition filter when set; null = keep inherited. public string? ConditionFilterOverride { get; set; } /// Initializes a new override for the specified source binding. /// Canonical name of the source to override. public InstanceNativeAlarmSourceOverride(string sourceCanonicalName) => SourceCanonicalName = sourceCanonicalName ?? throw new ArgumentNullException(nameof(sourceCanonicalName)); }