AlertHistory.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Linq;
  6. using System.Runtime.CompilerServices;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Runtime.Serialization;
  10. using System.ServiceModel;
  11. namespace GDNXFD.Data
  12. {
  13. [DataContract]
  14. [Table("ALERTHISTORY_NEW")]
  15. public class AlertHistory : INotifyPropertyChanged
  16. {
  17. [DataMember]
  18. [Column("ID")]
  19. public long Id { get; set; }
  20. [DataMember]
  21. [Column("ALERTTIME")] //报警时间
  22. public DateTime AlertTime { get; set; }
  23. [DataMember]
  24. [Column("MESSAGETYPE")] //对象类型
  25. public string MessageType { get; set; }
  26. [DataMember]
  27. [Column("OPERATOR")] //操作员
  28. public string ObjectId { get; set; }
  29. [DataMember]
  30. [Column("SNAPID")] //报警内容
  31. public long SnapID { get; set; }
  32. [DataMember]
  33. [Column("ISCONFIRMED")]
  34. public bool IsConfirmed { get; set; }
  35. [DataMember]
  36. [Column("CONFIRMTIME")]
  37. public DateTime? ConfirmTime { get; set; }
  38. [DataMember]
  39. [Column("CONFIRMPERSON")]
  40. public string ConfirmPerson { get; set; }
  41. [DataMember]
  42. [Column("DATAINFO")]
  43. public string DataInfo { get; set; }
  44. //人为选择的首出报警Id
  45. [DataMember]
  46. [Column("ALERTSNAPID")]
  47. public long AlertSnapId { get; set; }
  48. //[DataMember]
  49. //[ForeignKey("FOREIGN_ALERTSNAP")] //报警内容
  50. //public AlertSnap Snap { get; set; }
  51. /// <summary>
  52. /// Property changed event
  53. /// </summary>
  54. public event PropertyChangedEventHandler PropertyChanged;
  55. private void RaisePropertyChanged([CallerMemberName] string caller = "")
  56. {
  57. if (PropertyChanged != null)
  58. {
  59. PropertyChanged(this, new PropertyChangedEventArgs(caller));
  60. }
  61. }
  62. }
  63. }