ViewUserAlumniDirectoryMap.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. using System.ComponentModel.DataAnnotations.Schema;
  2. using System.Data.Entity.ModelConfiguration;
  3. namespace YZXYH.Repository.Models.Mapping
  4. {
  5. public class ViewUserAlumniDirectoryMap : EntityTypeConfiguration<ViewUserAlumniDirectory>
  6. {
  7. public ViewUserAlumniDirectoryMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => new { t.Id, t.Mobile, t.Name, t.Gender, t.IsAudited, t.IsPublic, t.IsLocked });
  11. // Properties
  12. this.Property(t => t.Id)
  13. .IsRequired()
  14. .HasMaxLength(50);
  15. this.Property(t => t.Mobile)
  16. .IsRequired()
  17. .HasMaxLength(15);
  18. this.Property(t => t.Password)
  19. .HasMaxLength(50);
  20. this.Property(t => t.Name)
  21. .IsRequired()
  22. .HasMaxLength(50);
  23. this.Property(t => t.NickName)
  24. .HasMaxLength(50);
  25. this.Property(t => t.Gender)
  26. .IsRequired()
  27. .IsFixedLength()
  28. .HasMaxLength(1);
  29. this.Property(t => t.Class)
  30. .HasMaxLength(20);
  31. this.Property(t => t.Email)
  32. .HasMaxLength(50);
  33. this.Property(t => t.CityNo)
  34. .HasMaxLength(50);
  35. this.Property(t => t.GraduationYear)
  36. .IsFixedLength()
  37. .HasMaxLength(4);
  38. this.Property(t => t.WeChat)
  39. .HasMaxLength(50);
  40. this.Property(t => t.QQ)
  41. .HasMaxLength(15);
  42. this.Property(t => t.Mobile2)
  43. .HasMaxLength(15);
  44. this.Property(t => t.IsAudited)
  45. .IsRequired()
  46. .IsFixedLength()
  47. .HasMaxLength(1);
  48. this.Property(t => t.IsPublic)
  49. .IsRequired()
  50. .IsFixedLength()
  51. .HasMaxLength(1);
  52. this.Property(t => t.IsLocked)
  53. .IsRequired()
  54. .IsFixedLength()
  55. .HasMaxLength(1);
  56. this.Property(t => t.Vip)
  57. .IsFixedLength()
  58. .HasMaxLength(10);
  59. this.Property(t => t.Remark)
  60. .HasMaxLength(250);
  61. this.Property(t => t.AlumniChapterName)
  62. .HasMaxLength(100);
  63. this.Property(t => t.Province)
  64. .HasMaxLength(50);
  65. this.Property(t => t.CityName)
  66. .HasMaxLength(50);
  67. this.Property(t => t.IndustryName)
  68. .HasMaxLength(50);
  69. this.Property(t => t.IndustryType)
  70. .HasMaxLength(50);
  71. this.Property(t => t.FileName)
  72. .HasMaxLength(50);
  73. this.Property(t => t.FilePath)
  74. .HasMaxLength(500);
  75. this.Property(t => t.FileType)
  76. .HasMaxLength(20);
  77. this.Property(t => t.FileNo)
  78. .HasMaxLength(30);
  79. this.Property(t => t.IpAddress)
  80. .HasMaxLength(500);
  81. this.Property(t => t.AlumniChapterNo)
  82. .HasMaxLength(50);
  83. // Table & Column Mappings
  84. this.ToTable("ViewUserAlumniDirectory");
  85. this.Property(t => t.Id).HasColumnName("Id");
  86. this.Property(t => t.Mobile).HasColumnName("Mobile");
  87. this.Property(t => t.Password).HasColumnName("Password");
  88. this.Property(t => t.Name).HasColumnName("Name");
  89. this.Property(t => t.NickName).HasColumnName("NickName");
  90. this.Property(t => t.Gender).HasColumnName("Gender");
  91. this.Property(t => t.Class).HasColumnName("Class");
  92. this.Property(t => t.Email).HasColumnName("Email");
  93. this.Property(t => t.Birthday).HasColumnName("Birthday");
  94. this.Property(t => t.CityNo).HasColumnName("CityNo");
  95. this.Property(t => t.GraduationYear).HasColumnName("GraduationYear");
  96. this.Property(t => t.ContactAddress).HasColumnName("ContactAddress");
  97. this.Property(t => t.HomeAddress).HasColumnName("HomeAddress");
  98. this.Property(t => t.Workunit).HasColumnName("Workunit");
  99. this.Property(t => t.WeChat).HasColumnName("WeChat");
  100. this.Property(t => t.QQ).HasColumnName("QQ");
  101. this.Property(t => t.Mobile2).HasColumnName("Mobile2");
  102. this.Property(t => t.DetaileInfo).HasColumnName("DetaileInfo");
  103. this.Property(t => t.IsAudited).HasColumnName("IsAudited");
  104. this.Property(t => t.IsPublic).HasColumnName("IsPublic");
  105. this.Property(t => t.IsLocked).HasColumnName("IsLocked");
  106. this.Property(t => t.Vip).HasColumnName("Vip");
  107. this.Property(t => t.TimeCreate).HasColumnName("TimeCreate");
  108. this.Property(t => t.TimeModify).HasColumnName("TimeModify");
  109. this.Property(t => t.Remark).HasColumnName("Remark");
  110. this.Property(t => t.AlumniChapterName).HasColumnName("AlumniChapterName");
  111. this.Property(t => t.Province).HasColumnName("Province");
  112. this.Property(t => t.CityName).HasColumnName("CityName");
  113. this.Property(t => t.IndustryName).HasColumnName("IndustryName");
  114. this.Property(t => t.IndustryType).HasColumnName("IndustryType");
  115. this.Property(t => t.FileName).HasColumnName("FileName");
  116. this.Property(t => t.FilePath).HasColumnName("FilePath");
  117. this.Property(t => t.FileType).HasColumnName("FileType");
  118. this.Property(t => t.FileNo).HasColumnName("FileNo");
  119. this.Property(t => t.TimeLastLogin).HasColumnName("TimeLastLogin");
  120. this.Property(t => t.IpAddress).HasColumnName("IpAddress");
  121. this.Property(t => t.AlumniChapterNo).HasColumnName("AlumniChapterNo");
  122. }
  123. }
  124. }