40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
namespace MP.Data.DbModels
|
|
{
|
|
[Table("InveSess")]
|
|
public class InventorySessionModel
|
|
{
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int InveSessID { get; set; }
|
|
public string Description { get; set; } = "";
|
|
public string UserCrea { get; set; } = "";
|
|
public int? MagID { get; set; } = null;
|
|
public DateTime DtStart { get; set; } = DateTime.Now;
|
|
public DateTime? DtEnd { get; set; } = null;
|
|
public bool Transferred { get; set; } = false;
|
|
|
|
[NotMapped]
|
|
public bool IsCurrent
|
|
{
|
|
get => (DtEnd == null);
|
|
}
|
|
[NotMapped]
|
|
public bool IsValid
|
|
{
|
|
get => ((DtEnd != null && DtEnd > DtStart));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Navigazione oggetto Magazzino
|
|
/// </summary>
|
|
[ForeignKey("MagID")]
|
|
public virtual AnagMagModel AnagMagNav { get; set; } = null;
|
|
}
|
|
}
|