using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
// This is here so CodeMaid doesn't reorganize this document
//
namespace WebDoorCreator.Data.DbModels
{
///
/// Tabella dati Orders
///
[Table("Door")]
public class DoorModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int DoorId { get; set; }
///
/// Ordine cui è associata la porta
///
public int OrderId { get; set; }
///
/// Door's Type
///
public int TypeId { get; set; } = 0;
///
/// Codice esterno x riferimento (es ERP)
///
public string DoorExtCode { get; set; } = "";
///
/// Data inserimento ordine
///
public DateTime DateIns { get; set; } = DateTime.Now;
///
/// Codice utente che ha creato
///
public string UserIdIns { get; set; } = "";
///
/// Data (ultima) modifica ordine
///
public DateTime DateMod { get; set; } = DateTime.Now;
///
/// Codice utente che ha creato
///
public string UserIdMod { get; set; } = "";
///
/// Descrizione
///
public string DoorDescript { get; set; } = "";
///
/// Quantity Ordered
///
public int Quantity { get; set; } = 1;
///
/// Unit cost for the door
///
public decimal UnitCost { get; set; } = 0;
[ForeignKey("OrderId")]
public virtual OrderModel? OrderNav { get; set; }
[ForeignKey("TypeId")]
public virtual DoorTypeModel? TypeNav { get; set; }
}
}