ViewUserAcInfoMap.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. using System.ComponentModel.DataAnnotations.Schema;
  2. using System.Data.Entity.ModelConfiguration;
  3. namespace YZXYH.Repository.Models.Mapping
  4. {
  5. public class ViewUserAcInfoMap : EntityTypeConfiguration<ViewUserAcInfo>
  6. {
  7. public ViewUserAcInfoMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => t.AlumniChapterNo);
  11. // Properties
  12. this.Property(t => t.Id)
  13. .HasMaxLength(50);
  14. this.Property(t => t.Mobile)
  15. .HasMaxLength(15);
  16. this.Property(t => t.Name)
  17. .HasMaxLength(50);
  18. this.Property(t => t.NickName)
  19. .HasMaxLength(50);
  20. this.Property(t => t.Gender)
  21. .IsFixedLength()
  22. .HasMaxLength(1);
  23. this.Property(t => t.Email)
  24. .HasMaxLength(50);
  25. this.Property(t => t.CityNo)
  26. .HasMaxLength(50);
  27. this.Property(t => t.GraduationYear)
  28. .IsFixedLength()
  29. .HasMaxLength(4);
  30. this.Property(t => t.WeChat)
  31. .HasMaxLength(50);
  32. this.Property(t => t.QQ)
  33. .HasMaxLength(15);
  34. this.Property(t => t.Mobile2)
  35. .HasMaxLength(15);
  36. this.Property(t => t.IsAudited)
  37. .IsFixedLength()
  38. .HasMaxLength(1);
  39. this.Property(t => t.IsPublic)
  40. .IsFixedLength()
  41. .HasMaxLength(1);
  42. this.Property(t => t.IsLocked)
  43. .IsFixedLength()
  44. .HasMaxLength(1);
  45. this.Property(t => t.Vip)
  46. .IsFixedLength()
  47. .HasMaxLength(10);
  48. this.Property(t => t.Remark)
  49. .HasMaxLength(250);
  50. this.Property(t => t.UserRole)
  51. .HasMaxLength(50);
  52. this.Property(t => t.Duty)
  53. .HasMaxLength(50);
  54. this.Property(t => t.IsActive)
  55. .IsFixedLength()
  56. .HasMaxLength(1);
  57. this.Property(t => t.IsMember)
  58. .IsFixedLength()
  59. .HasMaxLength(1);
  60. this.Property(t => t.AlumniChapterName)
  61. .HasMaxLength(100);
  62. this.Property(t => t.Class)
  63. .HasMaxLength(20);
  64. this.Property(t => t.AlumniChapterNo)
  65. .IsRequired()
  66. .HasMaxLength(50);
  67. // Table & Column Mappings
  68. this.ToTable("ViewUserAcInfos");
  69. this.Property(t => t.Id).HasColumnName("Id");
  70. this.Property(t => t.Mobile).HasColumnName("Mobile");
  71. this.Property(t => t.Name).HasColumnName("Name");
  72. this.Property(t => t.NickName).HasColumnName("NickName");
  73. this.Property(t => t.Gender).HasColumnName("Gender");
  74. this.Property(t => t.Email).HasColumnName("Email");
  75. this.Property(t => t.Birthday).HasColumnName("Birthday");
  76. this.Property(t => t.CityNo).HasColumnName("CityNo");
  77. this.Property(t => t.GraduationYear).HasColumnName("GraduationYear");
  78. this.Property(t => t.ContactAddress).HasColumnName("ContactAddress");
  79. this.Property(t => t.HomeAddress).HasColumnName("HomeAddress");
  80. this.Property(t => t.Workunit).HasColumnName("Workunit");
  81. this.Property(t => t.WeChat).HasColumnName("WeChat");
  82. this.Property(t => t.QQ).HasColumnName("QQ");
  83. this.Property(t => t.Mobile2).HasColumnName("Mobile2");
  84. this.Property(t => t.DetaileInfo).HasColumnName("DetaileInfo");
  85. this.Property(t => t.IsAudited).HasColumnName("IsAudited");
  86. this.Property(t => t.IsPublic).HasColumnName("IsPublic");
  87. this.Property(t => t.IsLocked).HasColumnName("IsLocked");
  88. this.Property(t => t.Vip).HasColumnName("Vip");
  89. this.Property(t => t.TimeCreate).HasColumnName("TimeCreate");
  90. this.Property(t => t.TimeModify).HasColumnName("TimeModify");
  91. this.Property(t => t.Remark).HasColumnName("Remark");
  92. this.Property(t => t.UserRole).HasColumnName("UserRole");
  93. this.Property(t => t.Duty).HasColumnName("Duty");
  94. this.Property(t => t.IsActive).HasColumnName("IsActive");
  95. this.Property(t => t.IsMember).HasColumnName("IsMember");
  96. this.Property(t => t.AlumniChapterName).HasColumnName("AlumniChapterName");
  97. this.Property(t => t.Class).HasColumnName("Class");
  98. this.Property(t => t.AlumniChapterNo).HasColumnName("AlumniChapterNo");
  99. }
  100. }
  101. }