using EgwCoreLib.Lux.Data.DbModel.Items;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwCoreLib.Lux.Data.DbModel.Stock
{
//
// This is here so CodeMaid doesn't reorganize this document
//
///
/// Tabelal delle giacenze di magazzino
///
[Table("stock_status")]
public class StockStatusModel
{
///
/// Primary Key AUTO
///
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int StockStatusId { get; set; }
///
/// Riferimento articolo
///
public int ItemID { get; set; } = 0;
///
/// ProductivityRate in giacenza
///
public double QtyAvail { get; set; } = 0;
///
/// Bool per cancellazione logica
///
public bool IsDeleted { get; set; } = false;
///
/// Indica scarto
///
public bool IsRemn { get; set; } = true;
///
/// Posizione logica magazzino (es S.01.03.05)
///
public string Location { get; set; } = "";
#if false
[NotMapped]
public string ItemDtmx
{
get
{
string answ = $"MT99999999W{WMm * 10:000000}H{HMm * 10:000000}L{LMm * 10:000000}";
if (MaterialNav != null)
{
answ = $"MT{MaterialNav.MatId:00000000}W{WMm * 10:000000}H{HMm * 10:000000}L{LMm * 10:000000}";
}
return answ;
}
}
#endif
///
/// Navigation per Item
///
[ForeignKey("ItemID")]
public virtual ItemModel ItemNav { get; set; } = null!;
}
}