using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace IntegrationTests.Models.Mapping { public class FiscalCalendarMap : EntityTypeConfiguration { public FiscalCalendarMap() { // Primary Key this.HasKey(t => t.Id); // Properties this.Property(t => t.Name) .IsRequired() .HasMaxLength(100); this.Property(t => t.SystemName) .HasMaxLength(100); // Table & Column Mappings this.ToTable("FiscalCalendar"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.Name).HasColumnName("Name"); this.Property(t => t.Type).HasColumnName("Type"); this.Property(t => t.YearInt).HasColumnName("YearInt"); this.Property(t => t.QuarterInt).HasColumnName("QuarterInt"); this.Property(t => t.PeriodInt).HasColumnName("PeriodInt"); this.Property(t => t.StartDate).HasColumnName("StartDate"); this.Property(t => t.EndDate).HasColumnName("EndDate"); this.Property(t => t.SystemName).HasColumnName("SystemName"); this.Property(t => t.NonWorking).HasColumnName("NonWorking"); this.Property(t => t.AdjustingPeriod).HasColumnName("AdjustingPeriod"); } } }