CmPatrolPos.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace FMSAdmin.Entities
  6. {
  7. public partial class CmPatrolPos
  8. {
  9. public CmPatrolPos()
  10. {
  11. CmPatrolHistoryPos = new HashSet<CmPatrolHistoryPos>();
  12. }
  13. [Key]
  14. public int SiteId { get; set; }
  15. public int BuildingId { get; set; }
  16. public int FloorId { get; set; }
  17. [Key]
  18. public int PosId { get; set; }
  19. [Required]
  20. [StringLength(50)]
  21. public string Name { get; set; }
  22. [StringLength(32)]
  23. public string TagId { get; set; }
  24. [StringLength(1024)]
  25. public string PosDesc { get; set; }
  26. [ForeignKey("SiteId,BuildingId")]
  27. [InverseProperty("CmPatrolPos")]
  28. public virtual CmBuilding CmBuilding { get; set; }
  29. [ForeignKey("SiteId,BuildingId,FloorId")]
  30. [InverseProperty("CmPatrolPos")]
  31. public virtual CmFloor CmFloor { get; set; }
  32. [ForeignKey(nameof(SiteId))]
  33. [InverseProperty(nameof(CmSite.CmPatrolPos))]
  34. public virtual CmSite Site { get; set; }
  35. [InverseProperty("CmPatrolPos")]
  36. public virtual ICollection<CmPatrolHistoryPos> CmPatrolHistoryPos { get; set; }
  37. }
  38. }