CmPatrolSchedule.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 CmPatrolSchedule
  8. {
  9. public CmPatrolSchedule()
  10. {
  11. CmPatrolHistory = new HashSet<CmPatrolHistory>();
  12. }
  13. [Key]
  14. public int SiteId { get; set; }
  15. [Key]
  16. public int ScheduleId { get; set; }
  17. public int PlanId { get; set; }
  18. [Required]
  19. [StringLength(48)]
  20. public string Name { get; set; }
  21. [StringLength(128)]
  22. public string ScheduleDesc { get; set; }
  23. [Column("inDate", TypeName = "datetime")]
  24. public DateTime? InDate { get; set; }
  25. [Column("patrolDateTime", TypeName = "datetime")]
  26. public DateTime PatrolDateTime { get; set; }
  27. [ForeignKey("SiteId,PlanId")]
  28. [InverseProperty("CmPatrolSchedule")]
  29. public virtual CmPatrolPlan CmPatrolPlan { get; set; }
  30. [ForeignKey(nameof(SiteId))]
  31. [InverseProperty(nameof(CmSite.CmPatrolSchedule))]
  32. public virtual CmSite Site { get; set; }
  33. [InverseProperty("S")]
  34. public virtual ICollection<CmPatrolHistory> CmPatrolHistory { get; set; }
  35. }
  36. }