// <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.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;

namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
    public partial class RndtScConfiguration : IEntityTypeConfiguration<RndtSc>
    {
        public void Configure(EntityTypeBuilder<RndtSc> entity)
        {
            entity.HasKey(e => e.SC)
                .HasName("Uksc");

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

            entity.HasIndex(e => e.DESCRIPTION, "RndiSCDE");

            entity.HasIndex(e => e.RQ, "RndiSCRQ");

            entity.HasIndex(e => e.SC_VALUE, "RndiSCSCVALUE");

            entity.HasIndex(e => e.SD, "RndiSCSD");

            entity.HasIndex(e => e.ST, "RndiSCST");

            entity.Property(e => e.SC)
                .HasColumnType("numeric(12, 0)")
                .HasComment("Sample code");

            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_ANY_PP)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("[1/0] User can assign other parameter profiles to a sample of this sample type than those specified in the sample type definition");

            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)")
                .HasComment("ID of the user who created the sample");

            entity.Property(e => e.CREATION_DATE).HasComment("Date the sample was logged in Unilab4");

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

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

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

            entity.Property(e => e.HASH_PG).HasMaxLength(32);

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

            entity.Property(e => e.LABEL_FORMAT)
                .HasMaxLength(20)
                .HasComment("label format used for the samples (set at configurational level)");

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

            entity.Property(e => e.LC)
                .HasColumnType("numeric(12, 0)")
                .HasComment("default life cycle model for newly created samples ( set at RndtSt level)");

            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.PRIORITY)
                .HasColumnType("numeric(3, 0)")
                .HasComment("[ + INDICATOR]  at configurational level (RndtSt), but can be modified at operational level");

            entity.Property(e => e.RQ)
                .HasColumnType("numeric(12, 0)")
                .HasComment("ID of the request when a sample is created in a request");

            entity.Property(e => e.SAMPLING_DATE).HasComment("by default = CREATION_DATE : can be modified");

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

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

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

            entity.Property(e => e.SHELF_LIFE_UNIT)
                .HasMaxLength(20)
                .HasComment("unit in which the shelf life value is expressed; inherited from RndtSt");

            entity.Property(e => e.SHELF_LIFE_VAL)
                .HasColumnType("numeric(3, 0)")
                .HasComment("sample shelf life limit at operational level; inherited from RndtSt");

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

            entity.Property(e => e.ST)
                .HasColumnType("numeric(12, 0)")
                .HasComment("sample  type for this sample");

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

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

            OnConfigurePartial(entity);
        }

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