ViewUserIndustryBranchInfoMap.cs 4.7 KB

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