feat: add invoice versioning models and enums

This commit is contained in:
2026-10-21 12:44:58 +05:30
parent 48f607d623
commit 91959913a8
5 changed files with 67 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
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<InvoiceVersionItem> Items { get; set; } = new List<InvoiceVersionItem>();
}
}