Files
ScadaBridge/src/ScadaLink.Commons/Entities/Templates/TemplateScript.cs
T
Joseph Doherty 1eb6e972b0 docs: add XML doc comments across src + Sister Projects section in CLAUDE.md
Bulk CommentChecker pass: fills in <param>/<inheritdoc> tags on public
APIs across all 23 src/ projects so the doc-coverage gate is green. Also
adds a Sister Projects section to CLAUDE.md pointing at the MxAccess
Gateway and OtOpcUa sibling repos, and gitignores local credential
captures (*login*.txt) and the wonder-app-vd03 deploy/ artifacts.
2026-05-28 01:55:24 -04:00

81 lines
2.4 KiB
C#

namespace ScadaLink.Commons.Entities.Templates;
public class TemplateScript
{
/// <summary>
/// The script identifier.
/// </summary>
public int Id { get; set; }
/// <summary>
/// The template identifier this script belongs to.
/// </summary>
public int TemplateId { get; set; }
/// <summary>
/// The script name.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Whether the script is locked for editing.
/// </summary>
public bool IsLocked { get; set; }
/// <summary>
/// The script code.
/// </summary>
public string Code { get; set; }
/// <summary>
/// The trigger type for the script, or null.
/// </summary>
public string? TriggerType { get; set; }
/// <summary>
/// The trigger configuration, or null.
/// </summary>
public string? TriggerConfiguration { get; set; }
/// <summary>
/// The parameter definitions in JSON format, or null.
/// </summary>
public string? ParameterDefinitions { get; set; }
/// <summary>
/// The return type definition in JSON format, or null.
/// </summary>
public string? ReturnDefinition { get; set; }
/// <summary>
/// The minimum time between script runs, or null.
/// </summary>
public TimeSpan? MinTimeBetweenRuns { get; set; }
/// <summary>
/// True when this row was copied from the base template and has not been
/// overridden on the derived template. Changes to the base flow downward
/// for inherited rows; an explicit override flips this to false.
/// Always false on base (non-derived) templates.
/// </summary>
public bool IsInherited { get; set; }
/// <summary>
/// Set on a base script. When true, derived templates may not override
/// the script body — the row is rendered readonly in the derived
/// UI, and any attempt to update it through the API is rejected.
/// </summary>
public bool LockedInDerived { get; set; }
/// <summary>
/// Initializes a new instance of the TemplateScript.
/// </summary>
/// <param name="name">The script name.</param>
/// <param name="code">The script code.</param>
public TemplateScript(string name, string code)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
Code = code ?? throw new ArgumentNullException(nameof(code));
}
}