namespace ScadaLink.Commons.Entities.Templates;

public class Template
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string? Description { get; set; }
    public int? ParentTemplateId { get; set; }
    public ICollection<TemplateAttribute> Attributes { get; set; } = new List<TemplateAttribute>();
    public ICollection<TemplateAlarm> Alarms { get; set; } = new List<TemplateAlarm>();
    public ICollection<TemplateScript> Scripts { get; set; } = new List<TemplateScript>();
    public ICollection<TemplateComposition> Compositions { get; set; } = new List<TemplateComposition>();

    public Template(string name)
    {
        Name = name ?? throw new ArgumentNullException(nameof(name));
    }
}
