using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; #nullable disable // // This is here so CodeMaid doesn't reorganize this document // namespace MP.Data.DbModels { public partial class PODLExpModel { #region Public Properties [Key] public int IdxPromessa { get; set; } [MaxLength(50)] public string KeyRichiesta { get; set; } [MaxLength(50)] public string KeyBCode { get; set; } public bool Attivabile { get; set; } = false; public int IdxOdl { get; set; } = 0; [MaxLength(50)] public string CodArticolo { get; set; } = ""; [MaxLength(50)] public string CodGruppo { get; set; } = ""; [MaxLength(50)] public string IdxMacchina { get; set; } public int NumPezzi { get; set; } = 1; public decimal Tcassegnato { get; set; } = 1; public DateTime? DueDate { get; set; } public int Priorita { get; set; } = 1; public int PzPallet { get; set; } = 1; [MaxLength(2500)] public string Note { get; set; } = ""; [MaxLength(50)] public string CodCli { get; set; } = ""; public DateTime InsertDate { get; set; } = DateTime.Now; [MaxLength(500)] public string Recipe { get; set; } = ""; [NotMapped] public string CodFase { get { string answ = "*"; if (!string.IsNullOrEmpty(KeyRichiesta)) { try { var allData = KeyRichiesta.Split('_'); if (allData.Length > 0) { answ = allData[0]; } } catch { } } return answ; } } [NotMapped] public bool IsKit { get => KeyRichiesta.StartsWith("KIT"); } /// /// Navigazione oggetto Machine /// [ForeignKey("IdxMacchina")] public virtual MacchineModel MachineNav { get; set; } = null!; /// /// Navigazione oggetto Articolo /// [ForeignKey("CodArticolo")] public virtual AnagArticoliModel ArticoloNav { get; set; } = null!; public string DescArticolo { get; set; } = ""; public string CodMacchina { get; set; } = ""; public string Nome { get; set; } = ""; #endregion Public Properties } }