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