namespace ZB.MOM.WW.ScadaBridge.Commons.Entities.Templates; public class Template { /// /// The unique identifier for the template. /// public int Id { get; set; } /// /// The name of the template. /// public string Name { get; set; } /// /// Optional description of the template. /// public string? Description { get; set; } /// /// The identifier of the parent template, if this template inherits from another. /// public int? ParentTemplateId { get; set; } /// /// The identifier of the folder containing this template. /// public int? FolderId { get; set; } /// /// Collection of attributes defined in this template. /// public ICollection Attributes { get; set; } = new List(); /// /// Collection of alarms defined in this template. /// public ICollection Alarms { get; set; } = new List(); /// /// Collection of scripts defined in this template. /// public ICollection Scripts { get; set; } = new List(); /// /// Collection of compositions defined in this template. /// public ICollection Compositions { get; set; } = new List(); /// /// Collection of native alarm source bindings defined in this template /// (read-only mirrors of OPC UA A&C / MxAccess Gateway alarm feeds). /// public ICollection NativeAlarmSources { get; set; } = new List(); /// /// True when this template was auto-derived to back a TemplateComposition /// slot. Derived templates inherit from a base (see ), /// are owned by their composition row (see ), /// and are hidden from the main template tree by default. /// public bool IsDerived { get; set; } /// /// Back-reference to the that owns this /// derived template. Non-null only when ; cascade- /// delete when the composition is removed. Always null on base templates. /// public int? OwnerCompositionId { get; set; } /// /// Initializes a new instance of the Template with the specified name. /// /// The name of the template. public Template(string name) { Name = name ?? throw new ArgumentNullException(nameof(name)); } }