Add item tracking migrations
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user