Add item tracking migrations

This commit is contained in:
2026-10-06 13:30:12 +05:30
parent 92f1aadb81
commit c358764f4e
11 changed files with 9799 additions and 12 deletions
+26
View File
@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
/// <summary>One row per physical serial-tracked unit. Quantity is always 1.</summary>
public class ItemSerialNumber : Template
{
public Guid FK_ItemId { get; set; }
[ForeignKey("FK_ItemId")]
public Item Item { get; set; }
public string SerialNumber { get; set; }
public SerialStatus Status { get; set; } = SerialStatus.InStock;
public Guid? CurrentLocationId { get; set; }
public LocationType? CurrentLocationType { get; set; }
public DateTime ReceivedAt { get; set; }
/// <summary>Snapshotted at receipt when Item.AllowCustomWarrantyPeriod is true; otherwise null and the system default applies when the warranty starts.</summary>
public int? WarrantyPeriodDaysOverride { get; set; }
/// <summary>Set when the serial is sold/delivered: sale date + (override ?? system default). Null while in stock or if Item.HasWarranty is false.</summary>
public DateTime? WarrantyExpiresAt { get; set; }
}
}