//---------------------------------------------------------------------------------------------
// 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 TransactionHistoryArchiveConfig : IEntityTypeConfiguration<TransactionHistoryArchive>
    {
        public void Configure(EntityTypeBuilder<TransactionHistoryArchive> c)
        {
            c.ToTable("TransactionHistoryArchive", "Production")
             .HasKey(e => e.TransactionId);

            // configure properties
          
            c.Property(e => e.TransactionId)
             .HasColumnName("TransactionID")
             .HasColumnType("int")
             .IsRequired()
             .ValueGeneratedNever();

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

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

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

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

            c.Property(e => e.TransactionType)
             .HasColumnName("TransactionType")
             .HasColumnType("nchar")
             .HasMaxLength(1)
             .IsUnicode()
             .IsFixedLength()
             .IsRequired();

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

            c.Property(e => e.ActualCost)
             .HasColumnName("ActualCost")
             .HasColumnType("money")
             .IsRequired();

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

        }
    }
}