using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace EgtBEAMWALL.DataLayer.DatabaseModels { /// /// Tabella dello stato attività WORK (PROD/SUPERVISORE) /// [Table("StatusMap")] public class StatusMapModel { #region Public Properties /// /// Data evento /// [Column("DtEvent")] public DateTime DtEvent { get; set; } = DateTime.Now; /// /// Indice di revisione informativa (per recupero rapido modifiche) /// [Column("Index")] public int Index { get; set; } = 0; /// /// Id dell'item (diventa chaive secondo il tipo) /// [Column("Id")] public int ItemId { get; set; } = 0; /// /// Tipo oggetto registrato /// [Column("ItemType")] public Core.StatusMapItemType ItemType { get; set; } = Core.StatusMapItemType.ND; /// /// Operazione tracciata /// [Column("Operation")] public Core.StatusMapOpType Operation { get; set; } = Core.StatusMapOpType.ND; /// /// Sessione (es supervisore) /// [Column("Session")] public string Session { get; set; } = ""; [Key, Column("DbId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int StatusId { get; set; } /// /// Valore (free) associato all'evento /// [Column("Val")] public string Val { get; set; } = ""; #endregion Public Properties #region Public Methods public override bool Equals(object obj) { if (!(obj is StatusMapModel item)) return false; if (Index != item.Index) return false; if (DtEvent != item.DtEvent) return false; if (Session != item.Session) return false; if (ItemType != item.ItemType) return false; if (ItemId != item.ItemId) return false; if (Operation != item.Operation) return false; if (Val != item.Val) return false; return true; } public override int GetHashCode() { return base.GetHashCode(); } #endregion Public Methods } }