using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using static MagMan.Core.Enums; namespace MagMan.Data.Tenant.DbModels { // // This is here so CodeMaid doesn't reorganize this document // /// /// Tabella dei PROJ caricati da EgtBeamWall /// [Table("ProjList")] [Index(nameof(MachineID))] [Index(nameof(KeyNum))] [Index(nameof(DtCreated))] [Index(nameof(DtStartProd))] [Index(nameof(DtLastAction))] [Index(nameof(ProjId))] [Index(nameof(IsActive))] [Index(nameof(IsArchived))] public class ProjModel { #region Public Properties /// /// Chiave univoca su DB /// [Key, Column("ProjDbId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int ProjDbId { get; set; } /// /// ID da modello ext /// [Column("Id")] public int ProjId { get; set; } /// /// Nome file BTL originale /// public string BTLFileName { get; set; } = ""; /// /// Tipologia del progetto (Travi, Pareti, ...) /// public BWType PType { get; set; } = BWType.NULL; /// /// Id macchina (diMagMan) /// public int MachineID { get; set; } = 0; /// /// Key di riferimento per il progetto /// public int KeyNum { get; set; } = 0; /// /// Macchina (Costruttore/Modello) /// public string Machine { get; set; } = ""; /// /// Descrizione progetto (copiata da BTLFileName inizialmente) /// public string ProjDescription { get; set; } = ""; /// /// Data Creazione progetto /// public DateTime DtCreated { get; set; } = DateTime.Now; /// /// Data di schedulazione (prevista) /// public DateTime DtSchedule { get; set; } = DateTime.Today.AddMonths(3); /// /// Data Inizio Produzione /// public DateTime DtStartProd { get; set; } = DateTime.MinValue; /// /// Data ora ultima operazione registrata /// public DateTime DtLastAction { get; set; } = DateTime.MinValue; /// /// ListName del BTL /// public string ListName { get; set; } = ""; /// /// Tempo lavorazione previsto (stima) in minuti /// public double ProcTimeEst { get; set; } = 0; /// /// Tempo lavorazione reale in minuti (parziale o totale se chiuso/completato/archiviato) /// public double ProcTimeReal { get; set; } = 0; /// /// Record attivo (se false == cancellazione logica) /// public bool IsActive { get; set; } = true; /// /// Stato Archiviato = NON visualizzabile normalmente, già prodotto/chiuso /// public bool IsArchived { get; set; } = false; #endregion Public Properties } }