CF_Student_Mapping.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated from a template.
  4. //
  5. // Manual changes to this file may cause unexpected behavior in your application.
  6. // Manual changes to this file will be overwritten if the code is regenerated.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. namespace EMIS.Entities
  10. {
  11. #pragma warning disable 1573
  12. using System;
  13. using System.Collections.Generic;
  14. using System.ComponentModel.DataAnnotations;
  15. using System.Data.Common;
  16. using System.Data.Entity;
  17. using System.Data.Entity.ModelConfiguration;
  18. using System.Data.Entity.Infrastructure;
  19. using System.ComponentModel.DataAnnotations.Schema;
  20. internal partial class CF_Student_Mapping : EntityTypeConfiguration<CF_Student>
  21. {
  22. public CF_Student_Mapping()
  23. {
  24. this.HasKey(t => t.UserID);
  25. this.ToTable("CF_Student");
  26. this.Property(t => t.UserID).HasColumnName("UserID");
  27. this.Property(t => t.ClassmajorID).HasColumnName("ClassmajorID");
  28. this.Property(t => t.SexID).HasColumnName("SexID");
  29. this.Property(t => t.BirthDate).HasColumnName("BirthDate");
  30. this.Property(t => t.NationID).HasColumnName("NationID");
  31. this.Property(t => t.PoliticsID).HasColumnName("PoliticsID");
  32. this.Property(t => t.CertificatesType).HasColumnName("CertificatesType");
  33. this.Property(t => t.IDNumber).HasColumnName("IDNumber").IsUnicode(false).HasMaxLength(20);
  34. this.Property(t => t.StudentType).HasColumnName("StudentType");
  35. this.Property(t => t.InSchoolStatusID).HasColumnName("InSchoolStatusID");
  36. this.Property(t => t.StudentStatus).HasColumnName("StudentStatus");
  37. this.Property(t => t.StudentCardNo).HasColumnName("StudentCardNo").IsUnicode(false).HasMaxLength(50);
  38. this.Property(t => t.PhotoUrl).HasColumnName("PhotoUrl").IsUnicode(false).HasMaxLength(500);
  39. this.Property(t => t.PlanningGraduateDate).HasColumnName("PlanningGraduateDate");
  40. this.Property(t => t.GraduateDate).HasColumnName("GraduateDate");
  41. this.Property(t => t.GraduateCardNo).HasColumnName("GraduateCardNo").IsUnicode(false).HasMaxLength(50);
  42. this.Property(t => t.ReplaceGraduateNo).HasColumnName("ReplaceGraduateNo").IsUnicode(false).HasMaxLength(50);
  43. this.Property(t => t.DegreeStatus).HasColumnName("DegreeStatus");
  44. this.Property(t => t.GraduationPictureUrl).HasColumnName("GraduationPictureUrl").IsUnicode(false).HasMaxLength(500);
  45. this.Property(t => t.Career).HasColumnName("Career");
  46. this.Property(t => t.IsPhotoComparison).HasColumnName("IsPhotoComparison");
  47. this.Property(t => t.IsProofread).HasColumnName("IsProofread");
  48. this.Property(t => t.Remark).HasColumnName("Remark");
  49. this.Property(t => t.RecordStatus).HasColumnName("RecordStatus");
  50. this.Property(t => t.CreateUserID).HasColumnName("CreateUserID");
  51. this.Property(t => t.CreateTime).HasColumnName("CreateTime");
  52. this.Property(t => t.ModifyUserID).HasColumnName("ModifyUserID");
  53. this.Property(t => t.ModifyTime).HasColumnName("ModifyTime");
  54. this.HasOptional(t => t.CF_Classmajor).WithMany(t => t.CF_Student).HasForeignKey(d => d.ClassmajorID);
  55. this.HasRequired(t => t.Sys_User).WithOptional(t => t.CF_Student);
  56. this.HasMany(t => t.DQP_SOC).WithMany(t => t.CF_Student)
  57. .Map(m =>
  58. {
  59. m.ToTable("DQP_SOC_CF_Student");
  60. m.MapLeftKey("UserID");
  61. m.MapRightKey("SOCID");
  62. });
  63. this.HasMany(t => t.DQP_SOCDetailGroup).WithMany(t => t.CF_Student)
  64. .Map(m =>
  65. {
  66. m.ToTable("DQP_SOCDetailGroup_CF_Student");
  67. m.MapLeftKey("UserID");
  68. m.MapRightKey("SOCDetailGroupID");
  69. });
  70. this.HasMany(t => t.DQP_SOCStaff).WithMany(t => t.CF_Student)
  71. .Map(m =>
  72. {
  73. m.ToTable("DQP_SOCStaff_CF_Student");
  74. m.MapLeftKey("UserID");
  75. m.MapRightKey("SOCStaffID");
  76. });
  77. this.HasMany(t => t.EM_EvaluationSetting).WithMany(t => t.CF_Student)
  78. .Map(m =>
  79. {
  80. m.ToTable("EM_EvaluationSetting_CF_Student");
  81. m.MapLeftKey("UserID");
  82. m.MapRightKey("EvaluationSettingID");
  83. });
  84. this.HasMany(t => t.EM_EvaluationStudentSetting).WithMany(t => t.CF_Student)
  85. .Map(m =>
  86. {
  87. m.ToTable("EM_EvaluationStudentSetting_CF_Student");
  88. m.MapLeftKey("UserID");
  89. m.MapRightKey("EvaluationStudentSettingID");
  90. });
  91. this.HasMany(t => t.EM_ExecutableFreeSelectionCouse).WithMany(t => t.CF_Student)
  92. .Map(m =>
  93. {
  94. m.ToTable("EM_ExecutableFreeSelectionCouseStudent");
  95. m.MapLeftKey("UserID");
  96. m.MapRightKey("ExecutableFreeSelectionCouseID");
  97. });
  98. this.HasMany(t => t.EM_ExecutableOptionalCourse).WithMany(t => t.CF_Student)
  99. .Map(m =>
  100. {
  101. m.ToTable("EM_ExecutableOptionalCourse_CF_Student");
  102. m.MapLeftKey("UserID");
  103. m.MapRightKey("ExecutableOptionalCourseID");
  104. });
  105. this.HasMany(t => t.ER_RetakePlan).WithMany(t => t.CF_Student)
  106. .Map(m =>
  107. {
  108. m.ToTable("ER_RetakePlan_CF_Student");
  109. m.MapLeftKey("UserID");
  110. m.MapRightKey("RetakePlanID");
  111. });
  112. this.HasMany(t => t.ET_StudentDistribute_CF_Student).WithMany(t => t.ET_StudentDistribute_CF_Student)
  113. .Map(m =>
  114. {
  115. m.ToTable("ET_StudentDistribute_CF_Student");
  116. m.MapLeftKey("UserID");
  117. m.MapRightKey("StudentDistributeID");
  118. });
  119. this.HasMany(t => t.ET_StudentNotDistribute).WithMany(t => t.ET_StudentNotDistribute)
  120. .Map(m =>
  121. {
  122. m.ToTable("ET_StudentNotDistribute");
  123. m.MapLeftKey("UserID");
  124. m.MapRightKey("StudentDistributeID");
  125. });
  126. this.HasMany(t => t.EX_ExaminationPlan).WithMany(t => t.CF_Student)
  127. .Map(m =>
  128. {
  129. m.ToTable("EX_ExaminationPlan_CF_Student");
  130. m.MapLeftKey("UserID");
  131. m.MapRightKey("ExaminationPlanID");
  132. });
  133. }
  134. }
  135. }