CmPatrolGroup.cs 999 B

1234567891011121314151617181920212223242526272829303132
  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 CmPatrolGroup
  8. {
  9. public CmPatrolGroup()
  10. {
  11. CmPatrolGroupUser = new HashSet<CmPatrolGroupUser>();
  12. CmPatrolPlan = new HashSet<CmPatrolPlan>();
  13. }
  14. [Key]
  15. public int SiteId { get; set; }
  16. [Key]
  17. public int PatrolGroupId { get; set; }
  18. [Required]
  19. [StringLength(48)]
  20. public string Name { get; set; }
  21. [ForeignKey(nameof(SiteId))]
  22. [InverseProperty(nameof(CmSite.CmPatrolGroup))]
  23. public virtual CmSite Site { get; set; }
  24. [InverseProperty("CmPatrolGroup")]
  25. public virtual ICollection<CmPatrolGroupUser> CmPatrolGroupUser { get; set; }
  26. [InverseProperty("CmPatrolGroup")]
  27. public virtual ICollection<CmPatrolPlan> CmPatrolPlan { get; set; }
  28. }
  29. }