// <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 RndtAuConfiguration : IEntityTypeConfiguration<RndtAu>
    {
        public void Configure(EntityTypeBuilder<RndtAu> entity)
        {
            entity.HasKey(e => new { e.AU, e.VERSION })
                .HasName("RndkAU");

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

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

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

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

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

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

            entity.Property(e => e.AU_CLASS).HasMaxLength(2);

            entity.Property(e => e.CF_VALUE)
                .HasMaxLength(20)
                .HasComment("function name if value_list_tp = C");

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

            entity.Property(e => e.DEFAULT_VALUE).HasMaxLength(2000);

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

            entity.Property(e => e.DESCRIPTION2).HasMaxLength(80);

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

            entity.Property(e => e.FORMAT).HasMaxLength(40);

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

            entity.Property(e => e.IS_PROTECTED)
                .HasMaxLength(1)
                .IsUnicode(false)
                .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.NEW_VAL_ALLOWED)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("[1/0] user is allowed or forbidden to enter a value that is not in the list of value_list_tp");

            entity.Property(e => e.RUN_MODE)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("program run modes: X = maximized, M = Minimized, N = Normal");

            entity.Property(e => e.SERVICE)
                .HasMaxLength(255)
                .HasComment("attribute service: application that is used to visualise or access the file contained in the attributes value (for instance: MSWORD)");

            entity.Property(e => e.SHORTCUT)
                .HasMaxLength(8)
                .HasComment("short cuts will be stored in the following manner: first two bytes - will contain hex VK code for Control i.e. 10h / next two bytes - will contain hex VK code or Shift i.e. 11h / next two bytes - will contain hex VK code for Alt i.e. 12h / next two bytes - will contain hex VK code for the key pressed or mouse click");

            entity.Property(e => e.SHORT_DESC).HasMaxLength(20);

            entity.Property(e => e.SINGLE_VALUED)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("[1/0]");

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

            entity.Property(e => e.STORE_DB)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("[1/0]");

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

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

            entity.Property(e => e.UNIT).HasMaxLength(80);

            entity.Property(e => e.VALUE_LIST_TP)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("Allowed values: E = existing values (the selection list for the attributes value contains all already assigned values) / F = fixed list (the user enters a fixed list when defining the attribute) / Q = SQL query (the list of values will be defined by executing an SQL statement");

            OnConfigurePartial(entity);
        }

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