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 LotteryRecordMap : EntityTypeConfiguration { public LotteryRecordMap() { // Primary Key this.HasKey(t => t.Id); this.Property(t => t.LotteryId) .IsRequired(); this.Property(t => t.LotteryName) .IsRequired() .HasMaxLength(50); this.Property(t => t.LotteryGroup) .IsRequired() .HasMaxLength(50); this.Property(t => t.LotteryType) .IsRequired() .HasMaxLength(50); this.Property(t => t.Mobile) .HasMaxLength(50); this.ToTable("CJ_LotteryRecord"); this.Property(t => t.Id).HasColumnName("Id").HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity); this.Property(t => t.LotteryId).HasColumnName("LotteryId"); this.Property(t => t.LotteryName).HasColumnName("LotteryName"); this.Property(t => t.LotteryGroup).HasColumnName("LotteryGroup"); this.Property(t => t.LotteryType).HasColumnName("LotteryType"); this.Property(t => t.Mobile).HasColumnName("Mobile"); } } }