using ScadaLink.Commons.Types.Enums;

namespace ScadaLink.Commons.Entities.Instances;

public class Instance
{
    public int Id { get; set; }
    public int TemplateId { get; set; }
    public int SiteId { get; set; }
    public int? AreaId { get; set; }
    public string UniqueName { get; set; }
    public InstanceState State { get; set; }
    public ICollection<InstanceAttributeOverride> AttributeOverrides { get; set; } = new List<InstanceAttributeOverride>();
    public ICollection<InstanceAlarmOverride> AlarmOverrides { get; set; } = new List<InstanceAlarmOverride>();
    public ICollection<InstanceConnectionBinding> ConnectionBindings { get; set; } = new List<InstanceConnectionBinding>();

    public Instance(string uniqueName)
    {
        UniqueName = uniqueName ?? throw new ArgumentNullException(nameof(uniqueName));
    }
}
