42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Distribution.Models
|
|
{
|
|
public class Item : Template
|
|
{
|
|
public string Sku { get; set; }
|
|
public string Name { get; set; }
|
|
public string? Description { get; set; }
|
|
|
|
public Guid FK_CategoryId { get; set; }
|
|
[ForeignKey("FK_CategoryId")]
|
|
public Category Category { get; set; }
|
|
|
|
public Guid? FK_SubCategoryId { get; set; }
|
|
[ForeignKey("FK_SubCategoryId")]
|
|
public SubCategory? SubCategory { get; set; }
|
|
|
|
public Guid? FK_BrandId { get; set; }
|
|
[ForeignKey("FK_BrandId")]
|
|
public Brand? Brand { get; set; }
|
|
|
|
public Guid FK_BaseUomId { get; set; }
|
|
[ForeignKey("FK_BaseUomId")]
|
|
public Uom BaseUom { get; set; }
|
|
|
|
public decimal? SalePrice { get; set; }
|
|
|
|
/// <summary>Warehouse quantity threshold below which the item shows up in low-stock alerts; null disables alerting for this item.</summary>
|
|
public decimal? ReorderLevel { get; set; }
|
|
|
|
/// <summary>Cost/purchase price, used to value free-goods scheme redemptions for getSchemeROI.</summary>
|
|
public decimal? CostPrice { get; set; }
|
|
|
|
public SyncSource SyncSource { get; set; } = SyncSource.Manual;
|
|
public int? ExternalErpItemId { get; set; }
|
|
public DateTime? LastSyncedAt { get; set; }
|
|
|
|
public ICollection<UomConversion> Conversions { get; set; } = [];
|
|
}
|
|
}
|