FmsWorkCodeCycleUnit.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 FmsWorkCodeCycleUnit
  8. {
  9. public FmsWorkCodeCycleUnit()
  10. {
  11. FmsFacilityCheckItem = new HashSet<FmsFacilityCheckItem>();
  12. FmsWorkSchedule = new HashSet<FmsWorkSchedule>();
  13. }
  14. [Key]
  15. public int SiteId { get; set; }
  16. [Key]
  17. public int CycleUnitId { get; set; }
  18. [Required]
  19. [StringLength(24)]
  20. public string Name { get; set; }
  21. [StringLength(200)]
  22. public string Description { get; set; }
  23. [ForeignKey(nameof(SiteId))]
  24. [InverseProperty(nameof(CmSite.FmsWorkCodeCycleUnit))]
  25. public virtual CmSite Site { get; set; }
  26. [InverseProperty("FmsWorkCodeCycleUnit")]
  27. public virtual ICollection<FmsFacilityCheckItem> FmsFacilityCheckItem { get; set; }
  28. [InverseProperty("FmsWorkCodeCycleUnit")]
  29. public virtual ICollection<FmsWorkSchedule> FmsWorkSchedule { get; set; }
  30. }
  31. }