using System.ComponentModel.DataAnnotations.Schema; namespace Distribution.Models { // Immutable snapshot of an invoice's lines at a point in its lifecycle. public class InvoiceVersion : Template { public Guid FK_InvoiceId { get; set; } [ForeignKey("FK_InvoiceId")] public Invoice Invoice { get; set; } public int VersionNumber { get; set; } public InvoiceVersionStage Stage { get; set; } public decimal TotalAmount { get; set; } public Guid CreatedBy { get; set; } public ICollection Items { get; set; } = new List(); } }