namespace ScadaLink.Commons.Entities.Templates;

public class TemplateScript
{
    public int Id { get; set; }
    public int TemplateId { get; set; }
    public string Name { get; set; }
    public bool IsLocked { get; set; }
    public string Code { get; set; }
    public string? TriggerType { get; set; }
    public string? TriggerConfiguration { get; set; }
    public string? ParameterDefinitions { get; set; }
    public string? ReturnDefinition { get; set; }
    public TimeSpan? MinTimeBetweenRuns { get; set; }

    public TemplateScript(string name, string code)
    {
        Name = name ?? throw new ArgumentNullException(nameof(name));
        Code = code ?? throw new ArgumentNullException(nameof(code));
    }
}
