namespace ERPCore.Domain.Entities;

/// <summary>
/// A parent → child arrow on the template canvas. The edge set must form a DAG with
/// at least one entry stage and exactly one terminal stage; that is enforced in
/// <c>ProductionGraphValidator</c> on every save, not by the database (FR-MFG-02).
/// Model: docs/30 Part C.
/// </summary>
public class StageEdge
{
    public int EdgeId { get; set; }

    public int TemplateId { get; set; }
    public ProductionTemplate? Template { get; set; }

    public int ParentStageId { get; set; }
    public TemplateStage? ParentStage { get; set; }

    public int ChildStageId { get; set; }
    public TemplateStage? ChildStage { get; set; }
}
