116 lines
3.4 KiB
C#
116 lines
3.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using static EgtBEAMWALL.Core.ConstBeam;
|
|
|
|
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
|
{
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
/// <summary>
|
|
/// Tabella deiu raggruppamenti PROJ in forma di PROD
|
|
/// </summary>
|
|
[Table("ProdList")]
|
|
public class ProdModel
|
|
{
|
|
#region Public Properties
|
|
|
|
public ProdModel()
|
|
{
|
|
ProjListNav = new HashSet<ProjModel>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Chiave univoca DB
|
|
/// </summary>
|
|
[Key, Column("ProdDbId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int ProdDbId { get; set; }
|
|
|
|
[Column("Description")]
|
|
public string Description { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Data Creazione
|
|
/// </summary>
|
|
[Index]
|
|
[Column("DtCreated")]
|
|
public DateTime DtCreated { get; set; }
|
|
|
|
/// <summary>
|
|
/// Stato NEW = creato ma NON salvato
|
|
/// </summary>
|
|
[Column("IsNew")]
|
|
public bool IsNew { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Stato locked, quando aperto da un dispositivo in rete
|
|
/// </summary>
|
|
[Column("Lock")]
|
|
public bool Locked { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Chiave univoca per EgtBM
|
|
/// </summary>
|
|
[Column("Id")]
|
|
[Index]
|
|
public int ProdId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Codice Proj per sync info (Identificativo DB esterno del magazzino in sync)
|
|
/// </summary>
|
|
public int ProjCloudId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Tipologia del progetto (Travi, Pareti, ...)
|
|
/// </summary>
|
|
public BWType PType { get; set; } = BWType.NULL;
|
|
|
|
/// <summary>
|
|
/// Macchina
|
|
/// </summary>
|
|
[Column("Machine")]
|
|
public string Machine { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// ID utente che ha bloccato (NumKey), quando aperto da un dispositivo in rete
|
|
/// </summary>
|
|
[Column("LockedBy")]
|
|
public string LockedBy { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// DataOra ultima operazione di Lock (o di rimozione di lock), quando aperto da un dispositivo in rete
|
|
/// </summary>
|
|
[Column("LockDate")]
|
|
public DateTime LockDate { get; set; } = DateTime.MinValue;
|
|
|
|
/// <summary>
|
|
/// Record attivo (se false == cancellazione logica)
|
|
/// </summary>
|
|
[Index]
|
|
[Column("IsActive")]
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Stato Prodotto = inviato ALMENO UNA VOLTA al supervisore --> NON eliminabile se non in modo logico
|
|
/// </summary>
|
|
[Index]
|
|
[Column("IsProduced")]
|
|
public bool IsProduced { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Stato Archiviato = NON visualizzabile normalmente, già prodotto
|
|
/// </summary>
|
|
[Index]
|
|
[Column("IsArchived")]
|
|
public bool IsArchived { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Collezione oggetti Proj associati (almeno 1 by design)
|
|
/// </summary>
|
|
public virtual ICollection<ProjModel> ProjListNav { get; set; }
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |