CmPatrolType.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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 CmPatrolType
  8. {
  9. public CmPatrolType()
  10. {
  11. CmPatrolHistory = new HashSet<CmPatrolHistory>();
  12. CmPatrolHistoryPos = new HashSet<CmPatrolHistoryPos>();
  13. }
  14. [Key]
  15. public int SiteId { get; set; }
  16. [Key]
  17. public int PatrolTypeId { get; set; }
  18. [Required]
  19. [StringLength(50)]
  20. public string Name { get; set; }
  21. public bool? IsUse { get; set; }
  22. [ForeignKey(nameof(SiteId))]
  23. [InverseProperty(nameof(CmSite.CmPatrolType))]
  24. public virtual CmSite Site { get; set; }
  25. [InverseProperty("CmPatrolType")]
  26. public virtual ICollection<CmPatrolHistory> CmPatrolHistory { get; set; }
  27. [InverseProperty("CmPatrolType")]
  28. public virtual ICollection<CmPatrolHistoryPos> CmPatrolHistoryPos { get; set; }
  29. }
  30. }