//---------------------------------------------------------------------------------------------
// 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 DatabaseLogConfig : IEntityTypeConfiguration<DatabaseLog>
    {
        public void Configure(EntityTypeBuilder<DatabaseLog> c)
        {
            c.ToTable("DatabaseLog")
             .HasKey(e => e.DatabaseLogId);

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

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

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

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

            c.Property(e => e.Schema)
             .HasColumnName("Schema")
             .HasColumnType("nvarchar")
             .HasMaxLength(128)
             .IsUnicode();

            c.Property(e => e.Object)
             .HasColumnName("Object")
             .HasColumnType("nvarchar")
             .HasMaxLength(128)
             .IsUnicode();

            c.Property(e => e.Tsql)
             .HasColumnName("TSQL")
             .HasColumnType("nvarchar(max)")
             .IsUnicode()
             .IsRequired();

            c.Property(e => e.XmlEvent)
             .HasColumnName("XmlEvent")
             .HasColumnType("xml")
             .IsRequired();

        }
    }
}