using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace YZXYH.Repository.Models.Mapping { public class LotteryMap : EntityTypeConfiguration { public LotteryMap() { // Primary Key this.HasKey(t => t.Id); this.Property(t => t.LotteryName) .IsRequired() .HasMaxLength(50); this.Property(t => t.LotteryGroup) .IsRequired() .HasMaxLength(50); this.Property(t => t.Mobile) .HasMaxLength(50); this.Property(t => t.ExpLotteryType) .HasMaxLength(100); this.ToTable("CJ_Lottery"); this.Property(t => t.Id).HasColumnName("Id").HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity); this.Property(t => t.LotteryName).HasColumnName("LotteryName"); this.Property(t => t.LotteryGroup).HasColumnName("LotteryGroup"); this.Property(t => t.Mobile).HasColumnName("Mobile"); this.Property(t => t.ExpLotteryType).HasColumnName("ExpLotteryType"); } } }