FmsFacilityCheckItem.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 FmsFacilityCheckItem
  8. {
  9. public FmsFacilityCheckItem()
  10. {
  11. FmsWorkResultCheckItem = new HashSet<FmsWorkResultCheckItem>();
  12. }
  13. [Key]
  14. public int SiteId { get; set; }
  15. [Key]
  16. public int FacilityCode { get; set; }
  17. [Key]
  18. public int CheckItemId { get; set; }
  19. public int WorkTypeId { get; set; }
  20. public int CycleUnitId { get; set; }
  21. [Required]
  22. [StringLength(100)]
  23. public string Name { get; set; }
  24. public bool IsYesNoResult { get; set; }
  25. public bool? IsUse { get; set; }
  26. [ForeignKey("SiteId,CycleUnitId")]
  27. [InverseProperty("FmsFacilityCheckItem")]
  28. public virtual FmsWorkCodeCycleUnit FmsWorkCodeCycleUnit { get; set; }
  29. [ForeignKey(nameof(WorkTypeId))]
  30. [InverseProperty(nameof(FmsWorkCodeType.FmsFacilityCheckItem))]
  31. public virtual FmsWorkCodeType WorkType { get; set; }
  32. [InverseProperty("FmsFacilityCheckItem")]
  33. public virtual ICollection<FmsWorkResultCheckItem> FmsWorkResultCheckItem { get; set; }
  34. }
  35. }