using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; #nullable disable // // This is here so CodeMaid doesn't reorganize this document // namespace MP.Data.DatabaseModels { [Table("PromesseODL")] public partial class PODLModel { #region Public Properties [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] 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 = "*"; var allData = KeyRichiesta.Split('_'); if (allData.Length > 0) { answ = allData[0]; } return answ; } } /// /// Navigazione oggetto Machine /// [ForeignKey("IdxMacchina")] public virtual Macchine MachineNav { get; set; } = null!; /// /// Navigazione oggetto Articolo /// [ForeignKey("CodArticolo")] public virtual AnagArticoli ArticoloNav { get; set; } = null!; #endregion Public Properties } }