using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class ViewUserAttendMeetInfoMap : EntityTypeConfiguration { public ViewUserAttendMeetInfoMap() { // Primary Key this.HasKey(t => new { t.Id, t.AlumnusNo, t.AMNo, t.IsAudit, t.IsLocked, t.IsCost, t.IsBranch }); // Properties this.Property(t => t.Id) .IsRequired() .HasMaxLength(50); this.Property(t => t.AlumnusNo) .IsRequired() .HasMaxLength(50); this.Property(t => t.AMNo) .IsRequired() .HasMaxLength(50); this.Property(t => t.IsAudit) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsLocked) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsCost) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsBranch) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.IsVip) .IsFixedLength() .HasMaxLength(1); this.Property(t => t.Name) .HasMaxLength(50); this.Property(t => t.Mobile) .HasMaxLength(15); this.Property(t => t.GraduationYear) .IsFixedLength() .HasMaxLength(4); this.Property(t => t.AMName) .HasMaxLength(100); this.Property(t => t.AMYear) .IsFixedLength() .HasMaxLength(4); this.Property(t => t.AMDate) .HasMaxLength(50); this.Property(t => t.Stauts) .IsFixedLength() .HasMaxLength(1); // Table & Column Mappings this.ToTable("ViewUserAttendMeetInfos"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.AlumnusNo).HasColumnName("AlumnusNo"); this.Property(t => t.AMNo).HasColumnName("AMNo"); this.Property(t => t.Suggest).HasColumnName("Suggest"); this.Property(t => t.IsAudit).HasColumnName("IsAudit"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); this.Property(t => t.IsCost).HasColumnName("IsCost"); this.Property(t => t.IsBranch).HasColumnName("IsBranch"); this.Property(t => t.CostTime).HasColumnName("CostTime"); this.Property(t => t.IsVip).HasColumnName("IsVip"); this.Property(t => t.Remark).HasColumnName("Remark"); this.Property(t => t.TimeCreated).HasColumnName("TimeCreated"); this.Property(t => t.TimeModify).HasColumnName("TimeModify"); this.Property(t => t.Name).HasColumnName("Name"); this.Property(t => t.Mobile).HasColumnName("Mobile"); this.Property(t => t.GraduationYear).HasColumnName("GraduationYear"); this.Property(t => t.AMName).HasColumnName("AMName"); this.Property(t => t.AMYear).HasColumnName("AMYear"); this.Property(t => t.AMDate).HasColumnName("AMDate"); this.Property(t => t.Stauts).HasColumnName("Stauts"); this.Property(t => t.TimeEnd).HasColumnName("TimeEnd"); } } }