// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.NotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;

namespace ProfitGroup.NotifyService.Data.Core.Data.Entities.Configurations
{
    public partial class RndtSpConfiguration : IEntityTypeConfiguration<RndtSp>
    {
        public void Configure(EntityTypeBuilder<RndtSp> entity)
        {
            entity.HasKey(e => new { e.SP, e.SP_VERSION })
                .HasName("RndkSp");

            entity.ToTable("RndtSp", "RndSuite");

            entity.HasIndex(e => e.UNIQUE_ID, "RndiSp")
                .IsUnique();

            entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.SP_VERSION)
                .HasColumnType("numeric(12, 4)")
                .HasDefaultValueSql("((1))");

            entity.Property(e => e.ACTIVE)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength();

            entity.Property(e => e.ALLOW_ANY_IP)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength();

            entity.Property(e => e.ALLOW_MODIFY)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength();

            entity.Property(e => e.CONTEXT).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.CREATED_BY).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.DESCRIPTION)
                .IsRequired()
                .HasMaxLength(80);

            entity.Property(e => e.FR).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.FR_VERSION).HasColumnType("numeric(12, 4)");

            entity.Property(e => e.HAS_ADHOC_APPROVAL)
                .IsRequired()
                .HasMaxLength(1)
                .IsUnicode(false)
                .HasDefaultValueSql("('0')")
                .IsFixedLength();

            entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);

            entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");

            entity.Property(e => e.LOG_HS)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength();

            entity.Property(e => e.MA).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.SP_VALUE)
                .IsRequired()
                .HasMaxLength(20);

            entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");

            entity.Property(e => e.STYPE).HasColumnType("numeric(8, 0)");

            entity.Property(e => e.UNIQUE_ID)
                .HasColumnType("numeric(12, 0)")
                .ValueGeneratedOnAdd();

            OnConfigurePartial(entity);
        }

        partial void OnConfigurePartial(EntityTypeBuilder<RndtSp> entity);
    }
}
