using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class ViewUserAlumniDirectoryMap : EntityTypeConfiguration { public ViewUserAlumniDirectoryMap() { // Primary Key this.HasKey(t => new { t.Id, t.Mobile, t.Name, t.Gender, t.IsAudited, t.IsPublic, t.IsLocked }); // Properties this.Property(t => t.Id) .IsRequired() .HasMaxLength(50); this.Property(t => t.Mobile) .IsRequired() .HasMaxLength(15); this.Property(t => t.Password) .HasMaxLength(50); this.Property(t => t.Name) .IsRequired() .HasMaxLength(50); this.Property(t => t.NickName) .HasMaxLength(50); this.Property(t => t.Gender) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.Class) .HasMaxLength(20); this.Property(t => t.Email) .HasMaxLength(50); this.Property(t => t.CityNo) .HasMaxLength(50); this.Property(t => t.GraduationYear) .IsFixedLength() .HasMaxLength(4); this.Property(t => t.WeChat) .HasMaxLength(50); this.Property(t => t.QQ) .HasMaxLength(15); this.Property(t => t.Mobile2) .HasMaxLength(15); this.Property(t => t.IsAudited) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsPublic) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsLocked) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.Vip) .IsFixedLength() .HasMaxLength(10); this.Property(t => t.Remark) .HasMaxLength(250); this.Property(t => t.AlumniChapterName) .HasMaxLength(100); this.Property(t => t.Province) .HasMaxLength(50); this.Property(t => t.CityName) .HasMaxLength(50); this.Property(t => t.IndustryName) .HasMaxLength(50); this.Property(t => t.IndustryType) .HasMaxLength(50); this.Property(t => t.FileName) .HasMaxLength(50); this.Property(t => t.FilePath) .HasMaxLength(500); this.Property(t => t.FileType) .HasMaxLength(20); this.Property(t => t.FileNo) .HasMaxLength(30); this.Property(t => t.IpAddress) .HasMaxLength(500); this.Property(t => t.AlumniChapterNo) .HasMaxLength(50); // Table & Column Mappings this.ToTable("ViewUserAlumniDirectory"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.Mobile).HasColumnName("Mobile"); this.Property(t => t.Password).HasColumnName("Password"); this.Property(t => t.Name).HasColumnName("Name"); this.Property(t => t.NickName).HasColumnName("NickName"); this.Property(t => t.Gender).HasColumnName("Gender"); this.Property(t => t.Class).HasColumnName("Class"); this.Property(t => t.Email).HasColumnName("Email"); this.Property(t => t.Birthday).HasColumnName("Birthday"); this.Property(t => t.CityNo).HasColumnName("CityNo"); this.Property(t => t.GraduationYear).HasColumnName("GraduationYear"); this.Property(t => t.ContactAddress).HasColumnName("ContactAddress"); this.Property(t => t.HomeAddress).HasColumnName("HomeAddress"); this.Property(t => t.Workunit).HasColumnName("Workunit"); this.Property(t => t.WeChat).HasColumnName("WeChat"); this.Property(t => t.QQ).HasColumnName("QQ"); this.Property(t => t.Mobile2).HasColumnName("Mobile2"); this.Property(t => t.DetaileInfo).HasColumnName("DetaileInfo"); this.Property(t => t.IsAudited).HasColumnName("IsAudited"); this.Property(t => t.IsPublic).HasColumnName("IsPublic"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); this.Property(t => t.Vip).HasColumnName("Vip"); this.Property(t => t.TimeCreate).HasColumnName("TimeCreate"); this.Property(t => t.TimeModify).HasColumnName("TimeModify"); this.Property(t => t.Remark).HasColumnName("Remark"); this.Property(t => t.AlumniChapterName).HasColumnName("AlumniChapterName"); this.Property(t => t.Province).HasColumnName("Province"); this.Property(t => t.CityName).HasColumnName("CityName"); this.Property(t => t.IndustryName).HasColumnName("IndustryName"); this.Property(t => t.IndustryType).HasColumnName("IndustryType"); this.Property(t => t.FileName).HasColumnName("FileName"); this.Property(t => t.FilePath).HasColumnName("FilePath"); this.Property(t => t.FileType).HasColumnName("FileType"); this.Property(t => t.FileNo).HasColumnName("FileNo"); this.Property(t => t.TimeLastLogin).HasColumnName("TimeLastLogin"); this.Property(t => t.IpAddress).HasColumnName("IpAddress"); this.Property(t => t.AlumniChapterNo).HasColumnName("AlumniChapterNo"); } } }