//---------------------------------------------------------------------------------------------
// This file was AUTO-GENERATED by "EF Domain Objects" Xomega.Net generator.
//
// Manual CHANGES to this file WILL BE LOST when the code is regenerated.
//---------------------------------------------------------------------------------------------

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace AdventureWorks.Services.Entities
{
    public class SpecialOfferConfig : IEntityTypeConfiguration<SpecialOffer>
    {
        public void Configure(EntityTypeBuilder<SpecialOffer> c)
        {
            c.ToTable("SpecialOffer", "Sales")
             .HasKey(e => e.SpecialOfferId);

            // configure properties
          
            c.Property(e => e.SpecialOfferId)
             .HasColumnName("SpecialOfferID")
             .HasColumnType("int")
             .IsRequired()
             .ValueGeneratedOnAdd();

            c.Property(e => e.Description)
             .HasColumnName("Description")
             .HasColumnType("nvarchar")
             .HasMaxLength(255)
             .IsUnicode()
             .IsRequired();

            c.Property(e => e.DiscountPct)
             .HasColumnName("DiscountPct")
             .HasColumnType("smallmoney")
             .IsRequired();

            c.Property(e => e.Type)
             .HasColumnName("Type")
             .HasColumnType("nvarchar")
             .HasMaxLength(50)
             .IsUnicode()
             .IsRequired();

            c.Property(e => e.Category)
             .HasColumnName("Category")
             .HasColumnType("nvarchar")
             .HasMaxLength(50)
             .IsUnicode()
             .IsRequired();

            c.Property(e => e.StartDate)
             .HasColumnName("StartDate")
             .HasColumnType("datetime")
             .IsRequired();

            c.Property(e => e.EndDate)
             .HasColumnName("EndDate")
             .HasColumnType("datetime")
             .IsRequired();

            c.Property(e => e.MinQty)
             .HasColumnName("MinQty")
             .HasColumnType("int")
             .IsRequired();

            c.Property(e => e.MaxQty)
             .HasColumnName("MaxQty")
             .HasColumnType("int");

            c.Property(e => e.Rowguid)
             .HasColumnName("rowguid")
             .HasColumnType("uniqueidentifier")
             .IsRequired();

            c.Property(e => e.ModifiedDate)
             .HasColumnName("ModifiedDate")
             .HasColumnType("datetime")
             .IsRequired();

        }
    }
}