using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class UserSelfAuditMap : EntityTypeConfiguration { public UserSelfAuditMap() { // Primary Key this.HasKey(t => t.Id); // Properties this.Property(t => t.Id) .IsRequired() .HasMaxLength(50); this.Property(t => t.UserNoApply) .IsRequired() .HasMaxLength(50); this.Property(t => t.UserNoInvited) .IsRequired() .HasMaxLength(50); this.Property(t => t.IsLocked) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.DisplayApply) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.DisplayInvited) .IsRequired() .IsFixedLength() .HasMaxLength(1); // Table & Column Mappings this.ToTable("UserSelfAudit"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.UserNoApply).HasColumnName("UserNoApply"); this.Property(t => t.UserNoInvited).HasColumnName("UserNoInvited"); this.Property(t => t.Status).HasColumnName("Status"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); this.Property(t => t.DisplayApply).HasColumnName("DisplayApply"); this.Property(t => t.DisplayInvited).HasColumnName("DisplayInvited"); this.Property(t => t.TimeApply).HasColumnName("TimeApply"); this.Property(t => t.TimeInvited).HasColumnName("TimeInvited"); } } }