using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class ContributeAttendInfoMap : EntityTypeConfiguration { public ContributeAttendInfoMap() { // Primary Key this.HasKey(t => t.ContributeNo); // Properties this.Property(t => t.ContributeNo) .IsRequired() .HasMaxLength(32); this.Property(t => t.ContributeActivityNo) .IsRequired() .HasMaxLength(32); this.Property(t => t.ContributeName) .HasMaxLength(500); this.Property(t => t.ContributeAmount) .HasMaxLength(50); this.Property(t => t.IsLocked) .HasMaxLength(1); // Table & Column Mappings this.ToTable("ContributeAttendInfos"); this.Property(t => t.ContributeNo).HasColumnName("ContributeNo"); this.Property(t => t.ContributeActivityNo).HasColumnName("ContributeActivityNo"); this.Property(t => t.ContributeName).HasColumnName("ContributeName"); this.Property(t => t.ContributeAmount).HasColumnName("ContributeAmount"); this.Property(t => t.ContributeUse).HasColumnName("ContributeUse"); this.Property(t => t.ContributeContent).HasColumnName("ContributeContent"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); this.Property(t => t.Remark).HasColumnName("Remark"); } } }