CmFile.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using Newtonsoft.Json;
  6. namespace FMSAdmin.Entities {
  7. public partial class CmFile {
  8. public CmFile() {
  9. CmAnnouncement = new HashSet<CmAnnouncement>();
  10. CmGuideline = new HashSet<CmGuideline>();
  11. FmsAccidentCmFile1 = new HashSet<FmsAccident>();
  12. FmsAccidentCmFile2 = new HashSet<FmsAccident>();
  13. FmsAccidentCmFile3 = new HashSet<FmsAccident>();
  14. FmsAccidentCmFile4 = new HashSet<FmsAccident>();
  15. FmsConstructionCmFile = new HashSet<FmsConstruction>();
  16. FmsConstructionCmFile1 = new HashSet<FmsConstruction>();
  17. FmsConstructionCmFileNavigation = new HashSet<FmsConstruction>();
  18. FmsDrawingHistory = new HashSet<FmsDrawingHistory>();
  19. FmsManualHistory = new HashSet<FmsManualHistory>();
  20. FmsMaterial = new HashSet<FmsMaterial>();
  21. FmsMaterialPurchaseOrder = new HashSet<FmsMaterialPurchaseOrder>();
  22. FmsReport = new HashSet<FmsReport>();
  23. FmsWorkResultFile = new HashSet<FmsWorkResultFile>();
  24. //FmsContract = new HashSet<FmsContract>();
  25. Sites = new HashSet<CmSite>();
  26. Equipments = new HashSet<FmsEquipment>();
  27. FmsEquipmentHistory = new HashSet<FmsEquipmentHistory>();
  28. BemsReportHistory = new HashSet<BemsReportHistory>();
  29. CmRentalStatus = new HashSet<CmRentalStatus>();
  30. FmsWorkRequest = new HashSet<FmsWorkRequest>();
  31. MonthlyRentalStatus = new HashSet<FmsMonthlyReport>();
  32. OrganizationChartStatus = new HashSet<FmsMonthlyReport>();
  33. MonthlyLayoutStatus = new HashSet<FmsMonthlyReport>();
  34. ParkingManagement = new HashSet<FmsMonthlyReport>();
  35. RentalManagement = new HashSet<FmsMonthlyReport>();
  36. MonthlyPriorityWork = new HashSet<FmsMonthlyReport>();
  37. ImprovementReport = new HashSet<FmsMonthlyReport>();
  38. NextMonthPriorityWork = new HashSet<FmsMonthlyReport>();
  39. Cost = new HashSet<FmsMonthlyReport>();
  40. SurroundingStatus = new HashSet<FmsMonthlyReport>();
  41. FmsDailyReport = new HashSet<FmsDailyReport>();
  42. CmSurvey = new HashSet<CmSurvey>();
  43. }
  44. [Key]
  45. public int SiteId { get; set; }
  46. [Key]
  47. public int FileId { get; set; }
  48. public int FileCategoryId { get; set; }
  49. [StringLength(256)]
  50. public string Name { get; set; }
  51. public int? FileSize { get; set; }
  52. [Column(TypeName = "datetime")]
  53. public DateTime? CreatedDate { get; set; }
  54. [StringLength(128)]
  55. public string ContentType { get; set; }
  56. [NotMapped]
  57. public string Url { get; set; }
  58. [NotMapped]
  59. public string Path { get; set; }
  60. [NotMapped]
  61. public bool IsUpload { get; set; }
  62. [NotMapped]
  63. public bool IsDelete { get; set; }
  64. [ForeignKey("FileCategoryId")]
  65. public virtual CmFileCategory FileCategory { get; set; }
  66. [ForeignKey("SiteId")]
  67. public virtual CmSite Site { get; set; }
  68. [InverseProperty("CmFile")]
  69. public virtual CmFacilityFile CmFacilityFile { get; set; }
  70. [InverseProperty("CmFile")]
  71. public virtual ICollection<BemsReportHistory> BemsReportHistory { get; set; }
  72. [InverseProperty("CmFile")]
  73. public virtual ICollection<CmAnnouncement> CmAnnouncement { get; set; }
  74. [InverseProperty("CmFile")]
  75. public virtual ICollection<CmGuideline> CmGuideline { get; set; }
  76. [InverseProperty(nameof(FmsAccident.CmFile1))]
  77. public virtual ICollection<FmsAccident> FmsAccidentCmFile1 { get; set; }
  78. [InverseProperty(nameof(FmsAccident.CmFile2))]
  79. public virtual ICollection<FmsAccident> FmsAccidentCmFile2 { get; set; }
  80. [InverseProperty(nameof(FmsAccident.CmFile3))]
  81. public virtual ICollection<FmsAccident> FmsAccidentCmFile3 { get; set; }
  82. [InverseProperty(nameof(FmsAccident.CmFile4))]
  83. public virtual ICollection<FmsAccident> FmsAccidentCmFile4 { get; set; }
  84. [InverseProperty(nameof(FmsConstruction.CmFile))]
  85. public virtual ICollection<FmsConstruction> FmsConstructionCmFile { get; set; }
  86. [InverseProperty(nameof(FmsConstruction.CmFile1))]
  87. public virtual ICollection<FmsConstruction> FmsConstructionCmFile1 { get; set; }
  88. [InverseProperty(nameof(FmsConstruction.CmFileNavigation))]
  89. public virtual ICollection<FmsConstruction> FmsConstructionCmFileNavigation { get; set; }
  90. [InverseProperty("CmFile")]
  91. public virtual ICollection<FmsDrawingHistory> FmsDrawingHistory { get; set; }
  92. [InverseProperty("CmFile")]
  93. public virtual ICollection<FmsManualHistory> FmsManualHistory { get; set; }
  94. [InverseProperty("CmFile")]
  95. public virtual ICollection<FmsMaterial> FmsMaterial { get; set; }
  96. [InverseProperty("CmFile")]
  97. public virtual ICollection<FmsMaterialPurchaseOrder> FmsMaterialPurchaseOrder { get; set; }
  98. [InverseProperty("CmFile")]
  99. public virtual ICollection<FmsReport> FmsReport { get; set; }
  100. [InverseProperty("CmFile")]
  101. public virtual ICollection<FmsWorkResultFile> FmsWorkResultFile { get; set; }
  102. [InverseProperty(nameof(CmSite.ImageFile))]
  103. public virtual ICollection<CmSite> Sites { get; set; }
  104. [InverseProperty(nameof(FmsEquipment.ImageFile))]
  105. public virtual ICollection<FmsEquipment> Equipments { get; set; }
  106. [InverseProperty("CmFile")]
  107. public virtual ICollection<CmRentalStatus> CmRentalStatus { get; set; }
  108. [InverseProperty("CmFile")]
  109. public virtual ICollection<FmsEquipmentHistory> FmsEquipmentHistory { get; set; }
  110. [InverseProperty("CmFile")]
  111. public virtual ICollection<FmsWorkRequest> FmsWorkRequest { get; set; }
  112. [InverseProperty("CmFile")]
  113. public virtual ICollection<FmsWorkSchedule> FmsWorkSchedule { get; set; }
  114. [InverseProperty("OrganizationChartStatus")]
  115. public virtual ICollection<FmsMonthlyReport> OrganizationChartStatus { get; set; }
  116. [InverseProperty("RentalStatus")]
  117. public virtual ICollection<FmsMonthlyReport> MonthlyRentalStatus { get; set; }
  118. [InverseProperty("LayoutStatus")]
  119. public virtual ICollection<FmsMonthlyReport> MonthlyLayoutStatus { get; set; }
  120. [InverseProperty("ParkingManagement")]
  121. public virtual ICollection<FmsMonthlyReport> ParkingManagement { get; set; }
  122. [InverseProperty("RentalManagement")]
  123. public virtual ICollection<FmsMonthlyReport> RentalManagement { get; set; }
  124. [InverseProperty("MonthlyPriorityWork")]
  125. public virtual ICollection<FmsMonthlyReport> MonthlyPriorityWork { get; set; }
  126. [InverseProperty("ImprovementReport")]
  127. public virtual ICollection<FmsMonthlyReport> ImprovementReport { get; set; }
  128. [InverseProperty("NextMonthPriorityWork")]
  129. public virtual ICollection<FmsMonthlyReport> NextMonthPriorityWork { get; set; }
  130. [InverseProperty("Cost")]
  131. public virtual ICollection<FmsMonthlyReport> Cost { get; set; }
  132. [InverseProperty("SurroundingStatus")]
  133. public virtual ICollection<FmsMonthlyReport> SurroundingStatus { get; set; }
  134. [InverseProperty("CmFile")]
  135. public virtual ICollection<FmsDailyReport> FmsDailyReport { get; set; }
  136. [InverseProperty("CmFile")]
  137. public virtual ICollection<CmSurvey> CmSurvey { get; set; }
  138. }
  139. }