// <auto-generated />
using System;
using APT.Migrations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace APT.Data.Migrations.Migrations
{
    [DbContext(typeof(MigrationContext))]
    [Migration("20260518091342_wyw2026051803")]
    partial class wyw2026051803
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
                .HasAnnotation("ProductVersion", "5.0.12")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_HMI", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BD_HMI");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DATA_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ENUM_ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENUM_ID");

                    b.HasIndex("ENUM_ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("CODE", "ORG_ID")
                        .IsUnique()
                        .HasFilter("[CODE] IS NOT NULL");

                    b.ToTable("T_BD_PICTURE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMG_FILE_PATH")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PICTURE_ID");

                    b.ToTable("T_BD_PICTURE_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PLACE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PROP")
                        .HasColumnType("int");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_BD_PLACE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_SERVER_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<decimal>("CPU")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IP")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<decimal>("MEMORY")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<decimal>("STORAGE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BD_SERVER_INFO");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_SYSTEM_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CONCURRENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PV")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BD_SYSTEM_INFO");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_WORD_TEMPLATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DATA_API")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("RET_ENTITY_TYPE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BD_WORD_TEMPLATE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_API", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIBE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_API");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRINTER_COMPUTER_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("PRINTER_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("PRINT_NUMBER")
                        .HasColumnType("int");

                    b.Property<int>("PRINT_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("PRINT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SOURCE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("TEMPLET_FILE_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_AUTO_PRINT_RECORD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AUTO_PRINT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("PARAM_VALUE")
                        .HasMaxLength(800)
                        .HasColumnType("nvarchar(800)");

                    b.HasKey("ID");

                    b.HasIndex("AUTO_PRINT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_AUTO_PRINT_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_ADD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIERARCHY")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LATITIDE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("LONGITUDE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_BASE_ADD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APP_CONS_PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("BACK_PIC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("BOOK_TIME")
                        .HasColumnType("int");

                    b.Property<int>("CALENDAR_DAYS")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("CONTINUOUS_CORRENT")
                        .HasColumnType("int");

                    b.Property<int>("CONTINUOUS_CORRENT_WARING")
                        .HasColumnType("int");

                    b.Property<int>("CORRENT_OK")
                        .HasColumnType("int");

                    b.Property<int>("CORRENT_TOTAL")
                        .HasColumnType("int");

                    b.Property<decimal>("COST_BENCHMARK")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CURRENT_VOLTAGE_HMI_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("DOWN_PERCENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXCEL_TYPE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("FILE_LEN")
                        .HasColumnType("int");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("FILE_TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HOME_HMI_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CHECK_MESSAGE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_MENU_SHRINK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PRODUCT_CAL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_USER_LOG")
                        .HasColumnType("bit");

                    b.Property<int>("KPI_CAL_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("LOGO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("LOWER_PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MAP_KEY")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MESSAGE_TEMPLATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("METER_READ_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PICTURE_URL")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("PIC_LEN")
                        .HasColumnType("int");

                    b.Property<string>("PIC_PATH")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("PIC_TYPE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("PUSH_API_URL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("SCREEN_TITLE")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("SCREEN_URL")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("SLOGAN")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATISTICAL_TYPE")
                        .HasColumnType("int");

                    b.Property<DateTime>("SYSTART_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("SYS_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("T0P_PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEL")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("APP_CONS_PICTURE_ID");

                    b.HasIndex("BACK_PIC_ID");

                    b.HasIndex("CURRENT_VOLTAGE_HMI_ID");

                    b.HasIndex("HOME_HMI_ID");

                    b.HasIndex("LOGO_ID");

                    b.HasIndex("LOWER_PICTURE_ID");

                    b.HasIndex("MESSAGE_TEMPLATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T0P_PICTURE_ID");

                    b.ToTable("T_FM_BASE_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_ENERGY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("AUTH_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("AUTH_MECHANISM")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHARGE_TEL")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ENERGY_CHARGE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("ENERGY_LEADER")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("ENERGY_MANAGEMENT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ENERGY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_MANAGEMENT_SYS")
                        .HasColumnType("bit");

                    b.Property<string>("LEADER_POSITION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("LEADER_TEL")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_BASE_ENERGY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ABB_NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<decimal>("CAPITAL")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CREDIT_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("FUND_ENUM_ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("GDP")
                        .HasColumnType("decimal(18,2)");

                    b.Property<bool>("IS_CENTER")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEGAL_PERSON")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLACE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROP_ENUM_ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FUND_ENUM_ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLACE_ID");

                    b.HasIndex("PROP_ENUM_ITEM_ID");

                    b.ToTable("T_FM_BASE_INFO");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HOLIDAY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("HOLIDAY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_CALENDAR");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR_CLASS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CALENDAR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("Nav_CalendarID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CALENDAR_ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("Nav_CalendarID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_CALENDAR_CLASS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_CLASS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CLASS_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("ENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("STARTTIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_CLASS_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_COST_CENTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_FM_COST_CENTER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CATEGORY")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHARGEUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasDefaultValue(0);

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<string>("LINE_USER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PERSON_ID")
                        .HasMaxLength(100)
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHARGEUSER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("PERSON_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_DEPARTMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CALENDAR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("CURR_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_DEFAULT_TEMPLATE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_HANDOVER")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("CALENDAR_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_CALENDAR_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DEPARTMENT_CALENDAR_CONFIG_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_CALENDAR_CONFIG_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_CALENDAR_CONFIG_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_COMPLETION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("MONTH")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONTHStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ONTIME_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVERTIME_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("SHOP_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SHOP_DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("WAITTING_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_COMPLETION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_COMPLETION_SORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ACTIVITY_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("ACTIVITY_TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HANDOVER_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("HANDOVER_TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("POST_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("POST_TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("TEAM_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("TEAM_TOTAL_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_COMPLETION_SORT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_POST");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_POST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_DEPARTMENT_POST_USER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_PRODUCTION_UNIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPART_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENUMS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPART_UNIT_ID");

                    b.HasIndex("ENUMS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_DEPARTMENT_PRODUCTION_UNIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SAFEUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_HEAD")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_DEPARTMENT_SAFEUSER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RUN_CHECKRECORD")
                        .HasColumnType("int");

                    b.Property<int>("RUN_EVENTRECORD")
                        .HasColumnType("int");

                    b.Property<bool>("RUN_STATUS")
                        .HasColumnType("bit");

                    b.Property<bool>("SHIFT_CLASS_RUN_STATUS")
                        .HasColumnType("bit");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DEPARTMENT_CALENDAR_CONFIG_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_FM_DEPARTMENT_SCHEDULING");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_SCHEDULING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_SCHEDULING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_DEPARTMENT_SCHEDULING_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_DEPARTMENT_USER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ENUM_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VALUE_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ENUM_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("CODE", "ORG_ID")
                        .IsUnique()
                        .HasFilter("[CODE] IS NOT NULL");

                    b.ToTable("T_FM_ENUM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VALUE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_ENUMS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ENUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("NAME_EN")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<decimal>("OFFSET")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("POINTNUM")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STANDARD_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("VALUE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ENUM_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_ENUM_ITEM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("CODE", "ORG_ID")
                        .IsUnique()
                        .HasFilter("[CODE] IS NOT NULL");

                    b.ToTable("T_FM_ENUM_TYPE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EQUIPMENT_INTEGRATION_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("CURR_TASK_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXECUTE_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INTERFACE_ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYNCING")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MOVE_FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("NEXT_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERIODIC_TIME")
                        .HasColumnType("int");

                    b.Property<int>("PRIORITY_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("READ_FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SECOND_WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SYNC_UNIT")
                        .HasColumnType("int");

                    b.Property<DateTime>("TASK_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("TASK_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EQUIPMENT_INTEGRATION_TASK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_ASYNCH_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ECMSAGE")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("ECMSAGE_FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXECUTE_RESULT_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("EXT_CONN_DEST_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXT_CONN_LOG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("EXT_CONN_TRANS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("EXT_PDT_ORDER_RESB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("FIRST_EXECUTE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("FLAG_ECMSAGE_FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FLAG_FEILD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FUNC_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMS")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("SAP_BOOKING_LOG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EXT_CONN_ASYNCH_TEMP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("CONN_DEST_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("CONN_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EXT_CONN_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXT_CONN_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("KEY")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("VALUE")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.HasKey("ID");

                    b.HasIndex("EXT_CONN_CONFIG_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EXT_CONN_CONFIG_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BILL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ECMSAGE")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXECUTE_RESULT_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("EXT_CONN_DEST_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("EXT_FUNC_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("EXT_KEY")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("EXT_KEY_ID")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("KEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARMS")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EXT_CONN_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_TRANS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BILL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXECUTE_RESULT_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("EXT_CONN_DEST_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("EXT_FUNC_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("KEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TRANS_ID")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_EXT_CONN_TRANS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HIDDEN_DANGER_RECTIFICATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVER_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("WAITTING_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_HIDDEN_DANGER_RECTIFICATION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("FRI")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("MON")
                        .HasColumnType("bit");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("SAT")
                        .HasColumnType("bit");

                    b.Property<bool>("SUN")
                        .HasColumnType("bit");

                    b.Property<bool>("THUR")
                        .HasColumnType("bit");

                    b.Property<bool>("TUES")
                        .HasColumnType("bit");

                    b.Property<bool>("WED")
                        .HasColumnType("bit");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_HOLIDAY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HOLIDAY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("WORK")
                        .HasColumnType("bit");

                    b.HasKey("ID");

                    b.HasIndex("HOLIDAY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_HOLIDAY_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EDIT_FORM_CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_IMPORT_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMPORT_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_ParentID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PAGE_EDIT_CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("SHEET_INDEX")
                        .HasColumnType("int");

                    b.Property<string>("SHEET_KEY_FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("START_ROW_INDEX")
                        .HasColumnType("int");

                    b.Property<string>("TEXT")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("IMPORT_CONFIG_ID");

                    b.HasIndex("Nav_ParentID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_IMPORT_CONFIG_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_FIELD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEST_FIELD_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("ID_TABLE_FIELD_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("ID_TABLE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("IMPORT_CONFIG_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_QUERY_FIELD_NAME")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int>("SRC_FEILD_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("SRC_FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMPORT_CONFIG_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_IMPORT_CONFIG_FIELD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INFO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_INFO");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_JOB_ACTIVITY_COMPLETION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("MONTH")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONTHStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ONTIME_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVERTIME_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("SHOP_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SHOP_DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("WAITTING_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_JOB_ACTIVITY_COMPLETION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_MESSAGE_TEMPLATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_MESSAGE_TEMPLATE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_MONITORING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IP")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONITORING_ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_MONITORING");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ENDDT")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ERRORMSG")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("KEY")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MESSAGE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("Message_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("NOTICETYPE")
                        .HasColumnType("int");

                    b.Property<int>("NOTICE_STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("NOTICE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLENAME")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<string>("TEL")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("TEMPLATE_ID")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("TRYCOUNT")
                        .HasColumnType("int");

                    b.Property<string>("USERNAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_NOTICE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ECMSAGE")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NOTIFICATION_CLIENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("NOTIFICATION_SHOW_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("NOTIFICATION_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ORDER_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_NOTIFICATION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION_ACCEPTED", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFICATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTIFICATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_NOTIFICATION_ACCEPTED");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION_PERMIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFICATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PERMIT_KEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERMIT_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NOTIFICATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_NOTIFICATION_PERMIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_PANEL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL_BELONG_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PANEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PANEL_ID");

                    b.ToTable("T_FM_PANEL_BELONG_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PANEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("INFO_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PANEL_ID");

                    b.ToTable("T_FM_PANEL_INFO");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_PARAM_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARAM_ID");

                    b.ToTable("T_FM_PARAM_SET_DEPARTMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BIRTHDAY")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CULTURALLEVEL")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EMAIL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_QUIT")
                        .HasColumnType("bit");

                    b.Property<string>("JOBTITLE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NATIONALITY")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POLITICALSTATUE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("SEX")
                        .HasMaxLength(20)
                        .HasColumnType("int");

                    b.Property<string>("TEL")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<DateTime?>("WORKDATE")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_FM_PERSON");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_CERTIFICATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_PERSON_CERTIFICATE_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_EDUCATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_PERSON_EDUCATION_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_IDCARD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_PERSON_IDCARD_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_SKILLS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEVEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_PERSON_SKILLS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_WORK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ENDDATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSTNAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("STARTDATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("WORKPLACE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.ToTable("T_FM_PERSON_WORK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PLAN_PARAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_PLAN_PARAM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PRINTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRINTER_COMPUTER_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("PRINTER_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("TEMPLET_FILE_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_PRINTER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PRINTER_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NUM")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRINTER_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("SERIAL_NUM")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<string>("WEIGHT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_PRINTER_TASK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_RISK_LEVEL_PROPORTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COLOR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_RISK_LEVEL_PROPORTION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_RISK_TYPE_PROPORTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COLOR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_RISK_TYPE_PROPORTION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISDEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CHECK_MESSAGE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLATFORM_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int?>("ROLE_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_ID");

                    b.ToTable("T_FM_ROLE_DEPARTMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_ROLE_GROUP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP_BELONG_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ROLE_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_GROUP_ID");

                    b.ToTable("T_FM_ROLE_GROUP_BELONG_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PERMISSION")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PERMISSION_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERMISSION_FORM_ID");

                    b.HasIndex("ROLE_ID");

                    b.ToTable("T_FM_ROLE_MENU_PERM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM_BTN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BTN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ROLE_MENU_PERMISSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BTN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_MENU_PERMISSION_ID");

                    b.ToTable("T_FM_ROLE_MENU_PERM_BTN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM_COL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ROLE_MENU_PERMISSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_MENU_PERMISSION_ID");

                    b.ToTable("T_FM_ROLE_MENU_PERM_COL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACCEPT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ACCEPT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_SNAPSHOT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SNAPSHOT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SNAPSHOT_ID");

                    b.ToTable("T_FM_SNAPSHOT_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_ATTR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESC")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_PARAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_PARAM_ID");

                    b.ToTable("T_FM_STAGE_ATTR");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_BELONG_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PERMISSION")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_BelongRoleID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_BelongRoleID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_STAGE_BELONG_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_DYNAMIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACTUAL_VAL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_PARAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("STAGE_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VAL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_PARAM_ID");

                    b.ToTable("T_FM_STAGE_DYNAMIC");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("WORKSTAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_STAGE_PLAN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LIMIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TIMES")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_SYNC_LIMIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DATA_COUNT")
                        .HasColumnType("int");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SUCCESS")
                        .HasColumnType("bit");

                    b.Property<int?>("LOGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("SYNC_PARAM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TRACEIDENTIFIER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("TRACEIDENTIFIERED")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_SYNC_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LOG_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SUCCESS")
                        .HasColumnType("bit");

                    b.Property<int?>("LOGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid>("SNC_LOG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TRACEIDENTIFIER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_SYNC_LOG_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("CURR_TASK_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXECUTE_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INTERFACE_ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYNCING")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("NEXT_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERIODIC_TIME")
                        .HasColumnType("int");

                    b.Property<int>("PRIORITY_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SYNC_PARAM")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("SYNC_UNIT")
                        .HasColumnType("int");

                    b.Property<DateTime>("TASK_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("TASK_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("UPDATE_SUCCES_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_SYNC_TASK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_USER_RULE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_SYNC_USER_RULE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ABB_NAME")
                        .HasMaxLength(5)
                        .HasColumnType("nvarchar(5)");

                    b.Property<Guid?>("CHARGE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHARGE_PERSON_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_TEAM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_TEAM_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_FM_TEAM_PERSON");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_UNIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("POINT_LEN")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int>("ROUND_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_UNIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BORN_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DEPARTURETIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("ENTRYTIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("FILE_PATH")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_CARD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("ISGETMSG")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PASSWORD")
                        .HasMaxLength(128)
                        .HasColumnType("nvarchar(128)");

                    b.Property<Guid?>("PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("PRINTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("SEX")
                        .HasColumnType("int");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_TYPE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("WORKINGYEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERSON_ID")
                        .IsUnique()
                        .HasFilter("[PERSON_ID] IS NOT NULL");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.ToTable("T_FM_USER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_BELONG_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_ROLE_GROUP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_GROUP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_BELONG_ROLE_GROUP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_USER_GROUP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_USER_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_USER_GROUP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_BELONG_USER_GROUP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_UserID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_UserID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_USER_CUSTOM_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_COL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_CUSTOM_CONFIG_H_TAB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_CUSTOM_CONFIG_H_TAB_ID");

                    b.ToTable("T_FM_USER_CUSTOM_CONFIG_H_COL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_TAB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_CUSTOM_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.HasIndex("USER_CUSTOM_CONFIG_ID");

                    b.ToTable("T_FM_USER_CUSTOM_CONFIG_H_TAB");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_CUSTOM_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_EDIT_ID");

                    b.HasIndex("USER_CUSTOM_CONFIG_ID");

                    b.ToTable("T_FM_USER_C_C_EDIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT_COL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDIT_COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_C_C_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDIT_COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_C_C_EDIT_ID");

                    b.ToTable("T_FM_USER_C_C_EDIT_COL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT_H_COL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDIT_COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_C_C_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDIT_COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_C_C_EDIT_ID");

                    b.ToTable("T_FM_USER_C_C_EDIT_H_COL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_CUSTOM_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.HasIndex("USER_CUSTOM_CONFIG_ID");

                    b.ToTable("T_FM_USER_C_C_QUERY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_FIELD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CASE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DATA_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DATA_VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("FEILD_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT_QUERY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT_SHOW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_REQUIRE")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYS_PARAM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SYS_QUERY_FIELD")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<string>("OP_DEFAULT")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUERY_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("USER_C_C_QUERY_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_C_C_QUERY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_C_C_QUERY_GROUP_ID");

                    b.HasIndex("USER_C_C_QUERY_ID");

                    b.ToTable("T_FM_USER_C_C_QUERY_FIELD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_GROUP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DISPLAY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RELATION_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_C_C_QUERY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_C_C_QUERY_ID");

                    b.ToTable("T_FM_USER_C_C_QUERY_GROUP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PAGE_SIZE")
                        .HasColumnType("int");

                    b.Property<Guid>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_CUSTOM_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.HasIndex("USER_CUSTOM_CONFIG_ID");

                    b.ToTable("T_FM_USER_C_C_TABLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE_COL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_C_C_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_C_C_TABLE_ID");

                    b.ToTable("T_FM_USER_C_C_TABLE_COL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_DEPARTMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_USER_GROUP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_GROUP_ID");

                    b.ToTable("T_FM_USER_GROUP_BELONG_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_R_G", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_ROLE_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_ROLE_GROUP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_GROUP_ID");

                    b.ToTable("T_FM_USER_GROUP_BELONG_R_G");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_U_G", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BELONG_USER_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_GROUP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BELONG_USER_GROUP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_GROUP_ID");

                    b.ToTable("T_FM_USER_GROUP_BELONG_U_G");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PHOTO_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_PHOTO_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.ToTable("T_FM_USER_POST");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENUMS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENUMS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_PRODUCTION_UNIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("PRODUCTION")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_USER_PRODUCTION_UNIT_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_SIGN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_SIGN_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_TEST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_POST_ID");

                    b.ToTable("T_FM_USER_TEST");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_VACATION_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AGENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AGENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FM_USER_VACATION_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_WORK_TICKET_COMPLETION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("MONTH")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONTHStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<int>("ONTIME_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVER_FINISH_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("SHOP_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SHOP_DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("TOTAL_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("WAITTING_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_WORK_TICKET_COMPLETION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_PF_SYS_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BROWSER_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXT_DATA")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HOST_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOG_DATA")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("LOG_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("LOG_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("LOG_TITLE")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("LOG_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LOG_FORM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PF_SYS_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.LG.T_LG_OPRATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BTN_CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("BTN_NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORM_CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPRATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LG_OPRATE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ENTERPRISE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_NW_ENTERPRISE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ROLE_DATA_PERM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PREM_ENTERPRISE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_NW_ROLE_DATA_PERM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ROLE_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ENTERPRISE_MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_NW_ROLE_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ALLUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("TENANT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_ALLUSER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("VERSION_ID");

                    b.ToTable("T_OP_BILLING_RULE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("FLAT_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("FLAT_SERVICE_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("PEAK_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("PEAK_SERVICE_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid>("RULE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SHARP_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("SHARP_SERVICE_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("VALLEY_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("VALLEY_SERVICE_CHARGE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("VERSION")
                        .HasMaxLength(5)
                        .HasColumnType("nvarchar(5)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RULE_ID");

                    b.ToTable("T_OP_BILLING_RULE_VERSION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CHARGE_TIME_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HOUR")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_CHARGE_TIME_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CLIENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("AVATAURL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMAIL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_CARD")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("NICK_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEL")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_CLIENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CLINET_OPENID", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CLIENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OPEN_ID")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CLIENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_CLINET_OPENID");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_COMMON_QUESTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ANSWER")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUESTION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_COMMON_QUESTION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_FILE_FIRMWARE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIRMWARE_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<byte[]>("FIRMWARE_DATA")
                        .HasColumnType("varbinary(max)");

                    b.Property<string>("FIRMWARE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("FIRMWARE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FIRMWARE_TYPE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("FIRMWARE_VERSION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_FILE_FIRMWARE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_MEMBER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("OPENID")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("RECHARGE_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECHARGE_CARD_ID");

                    b.ToTable("T_OP_MEMBER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ICON")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MENU_FORM_PARAMS")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("MENU_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("MENU_FORM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_OP_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTICE_TITLE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_NOTICE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("NOTICE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_NOTICE_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_PEAK_VALLEY_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("END_TIME")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("START_TIME")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_PEAK_VALLEY_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_CARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("BALANCE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REAMRK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("RFID_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RFID_ID");

                    b.ToTable("T_OP_RECHARGE_CARD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_ORDER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("AMOUNT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ORDER_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECHARGE_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECHARGE_CARD_ID");

                    b.ToTable("T_OP_RECHARGE_ORDER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_SETTING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("AMOUNT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_RECHARGE_SETTING");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RFID_CARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFICATION")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REAMRK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("RFID")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_RFID_CARD");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ROLE_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TENANT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TENANT_MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_ROLE_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTPASSWORD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CERTPATH")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DB_CONN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXPIRATION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_TEMPLATE")
                        .HasColumnType("bit");

                    b.Property<string>("MCH_ID")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PROJECT_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("TEMPLATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WXPAYKEY")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("DB_CONN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEMPLATE_ID");

                    b.ToTable("T_OP_TENANT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_DB_CONN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DB_CONN")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DB_CONN_WAN")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_TENANT_DB_CONN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_DOMAIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DOMAIN_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("TENANT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TENANT_ID");

                    b.ToTable("T_OP_TENANT_DOMAIN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_EXPIRATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DURATION")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXPIRATION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime>("LAST_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TENANT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("UNIT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TENANT_ID");

                    b.ToTable("T_OP_TENANT_EXPIRATION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PASSWORD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PHONE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_USER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OLD_VERSION_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TEMPLATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UPDATE_SQL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("VERSION_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("VERSION_ZH")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEMPLATE_ID");

                    b.ToTable("T_OP_VERSION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MENU_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_VERSION_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION_TENANT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TENANT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OP_VERSION_TENANT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_OPERATION_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVAL_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVAL_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_ID");

                    b.ToTable("T_PF_APPROVE_OPERATION_ROLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_REJECT_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ARCHIVE_INTERFACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORM_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REJECT_INTERFACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE_REJECT_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_ROLE_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVAL_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVAL_ROLE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE_ROLE_DEPARTMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_COMPLAINT_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("APPROVE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COMPLAINT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_DETAIL_ID");

                    b.HasIndex("COMPLAINT_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_COMPLAINT_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_FORM_RELATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FORM_RELATION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_VERSION_MANAGE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("BRANCH")
                        .HasColumnType("int");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GRAMMAR")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LAST_VERSION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VERSION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("VERSION_NO")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<int>("VERSION_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("VERSION_ZH")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_VERSION_MANAGE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_CODE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BAD_GRADE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("BAD_GRADE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_PF_DEFECT_CODE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_GRADE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SEVERITY")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_DEFECT_GRADE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_ECM_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_ADDRESS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESC")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("ECMSAGE")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_CODE")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_ECM_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("UPGRADE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APP_VERSION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("APP_VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APP_VERSION_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APP_VERSION_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_FM_NOTIFICATION_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("ISCANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NOTICE_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("NOTICE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("SENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("SOURCE_DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SOURCE_FORMCODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("TASK_DT")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("TASK_ENDDT")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("TASK_STARTDT")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SOURCE_DATA_ID");

                    b.ToTable("T_FM_NOTIFICATION_TASK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_FM_NOTIFICATION_TASK_TIME_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DAYDELAY")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LIMITDATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<string>("TABLEKEY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TABLENAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TABLETIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TASK_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("TIME_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FM_NOTIFICATION_TASK_TIME_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ABSTRACT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(5000)
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("END")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("ISPUBLISH")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START")
                        .HasColumnType("datetime2");

                    b.Property<string>("TITLE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_ANNOURCEMENT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ANNOURCEMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ANNOURCEMENT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_ANNOURCEMENT_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT_ORG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ANNOURCEMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ORG_ID_SUB")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ANNOURCEMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ORG_ID_SUB");

                    b.ToTable("T_PF_ANNOURCEMENT_ORG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPMENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("HAS_CHILDREN")
                        .HasColumnType("bit");

                    b.Property<string>("ICON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("IMG")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MENU_FORM_PARAMS")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("MENU_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("MENU_FORM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("PICTURE_ID");

                    b.ToTable("T_PF_APPMENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVE_CODE")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<int>("APPROVE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("APPROVE_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CALLBACK_INTERFACE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REJECT_INTERFACE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTEXT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ALLOW_UPDATE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CURRENT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NODE_APPROVE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("NODE_APPROVE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasMaxLength(10)
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("APPROVE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVE_ROLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ARCHIVE_INTERFACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CALLBACK_INTERFACE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CLASS_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORM_CODE")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REJECT_INTERFACE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE_TEMP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEFAULT_APPROVE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ALLOW_UPDATE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NUM")
                        .HasMaxLength(10)
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("DEFAULT_APPROVE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_APPROVE_TEMP_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIPLAY_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IMG_EFFECT")
                        .HasColumnType("int");

                    b.Property<bool>("IMG_ISRE")
                        .HasColumnType("bit");

                    b.Property<decimal>("IMG_TIMESPAN")
                        .HasColumnType("decimal(18,2)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("V_ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("V_ISRE")
                        .HasColumnType("bit");

                    b.Property<bool>("V_ISSHOWCONTROL")
                        .HasColumnType("bit");

                    b.Property<bool>("V_ISSILENT")
                        .HasColumnType("bit");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_BIPLAY_SET");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BITITLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TITLE")
                        .HasMaxLength(1500)
                        .HasColumnType("nvarchar(1500)");

                    b.Property<string>("TITLE_SHOW")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("USER_ID_CREATER")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VERSION")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID_CREATER");

                    b.ToTable("T_PF_BITITLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIBE")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TITLE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID_CREATER")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID_CREATER");

                    b.ToTable("T_PF_BIVIDEOIMG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("VIDEOIMG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("VIDEOIMG_ID");

                    b.ToTable("T_PF_BIVIDEOIMG_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("BTN_CONDITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("BTN_FUN_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("BTN_PAGE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("BTN_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("CLICK_EVENT")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CSS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORM_CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ICON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("INPUT_NAV_FIELD")
                        .HasMaxLength(150)
                        .HasColumnType("nvarchar(150)");

                    b.Property<string>("INPUT_SAVE_FIELD")
                        .HasMaxLength(150)
                        .HasColumnType("nvarchar(150)");

                    b.Property<bool?>("IS_COMFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SAME_LEVEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOWLAB")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_CUSTOM_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SAVE_CLEAR_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("SAVE_CLOSE_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("SELECT_SHOW")
                        .HasColumnType("bit");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WORD_TEMPLATE_CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.ToTable("T_PF_BTN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CLIENT_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("HAS_CHILDREN")
                        .HasColumnType("bit");

                    b.Property<string>("ICON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("IMG")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MENU_FORM_PARAMS")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("MENU_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("MENU_FORM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_PF_CLIENT_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CLIENT_SCOPES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DATA_CHANNEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SCOPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DATA_CHANNEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SCOPE_ID");

                    b.ToTable("T_PF_CLIENT_SCOPES");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE_PREFIX")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<int>("CODE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CURRENT_DATA")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<int?>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FLOW")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_IGNORE_DATE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ORG_CODE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_TENANT_CODE")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("QTY")
                        .HasColumnType("int");

                    b.Property<int>("SERIAL_NUM_LEN")
                        .HasColumnType("int");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("TAKE_RETAIN_MIN")
                        .HasColumnType("int");

                    b.Property<int>("VERSION")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_CODE_RULE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE_RUN_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_COMPLETE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_CODE_RULE_RUN_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE_SERIAL_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CODE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DATE_VALUE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SERIAL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TAKE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("USE_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_CODE_RULE_SERIAL_LOG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_COLUMN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CONTROL_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("DATA_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FOOTER_SUM_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("FORMAT")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INPUT_DATA_API")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<int>("INPUT_DATA_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_FILTER_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int?>("INPUT_FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_ID_FIELD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("INPUT_LABEL_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_NAV_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SAVE_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SHOW_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_SORT_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_SORT_ORDER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ONLY_CHECK_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW_SUM")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<int>("MAX_LEN")
                        .HasColumnType("int");

                    b.Property<string>("MERGE_CELLS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("MIN_LEN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("NO_SORT")
                        .HasColumnType("bit");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_TABLE_PANEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SHOW_FORM_CODE")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<string>("SHOW_ID_FIELD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("VALIDATA_TYPE")
                        .HasMaxLength(5)
                        .HasColumnType("nvarchar(5)");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.HasIndex("PAGE_TABLE_PANEL_ID");

                    b.ToTable("T_PF_COLUMN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_COLUMN_FILTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPERATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_COLUMN_FILTER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_DATA_CHANNEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APP_ID")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DATA_FREQUENCY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LIFE_TIME")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SECURITY_KEY")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("TENANT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DATA_FREQUENCY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TENANT_ID");

                    b.ToTable("T_PF_DATA_CHANNEL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_DATA_FREQUENCY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FREQUENCY_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("STORE_FRE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("UPDATE_FRE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("CODE", "ORG_ID")
                        .IsUnique()
                        .HasFilter("[CODE] IS NOT NULL");

                    b.HasIndex("NAME", "ORG_ID")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.ToTable("T_PF_DATA_FREQUENCY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CASE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("CODE_RULE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("CONTROL_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEFAULT_VALUE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("EDITABLE")
                        .HasColumnType("bit");

                    b.Property<string>("EDIT_FORM_CODE")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<string>("EDIT_FORM_FILTER")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("EDIT_FORM_FILTER_VALUE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORMAT")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HEIGHT")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_DATA_API")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<int>("INPUT_DATA_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_FILTER_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("INPUT_FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_ID_FIELD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("INPUT_KEEP_VALUE_BY_NO_SRC")
                        .HasColumnType("bit");

                    b.Property<string>("INPUT_LABEL_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_NAV_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SAVE_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SHOW_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SORT_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SORT_ORDER")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<bool>("IS_AND_FILITER")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CAN_BATCH_EDIT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CHECK_MAX")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CHECK_MIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_COPY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_IGNORE_TENANT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ONLY_CHECK_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_TABLE_COLUMN")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<int>("MAX_LEN")
                        .HasColumnType("int");

                    b.Property<double>("MAX_VAL")
                        .HasColumnType("float");

                    b.Property<int>("MIN_LEN")
                        .HasColumnType("int");

                    b.Property<double>("MIN_VAL")
                        .HasColumnType("float");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_EDIT_PANEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("PERMIT_EDITABLE")
                        .HasColumnType("bit");

                    b.Property<string>("PROMPT_INFO")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("QUERY_FORMAT")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(80)
                        .HasColumnType("nvarchar(80)");

                    b.Property<bool>("REQUIRED")
                        .HasColumnType("bit");

                    b.Property<string>("SELECTD_LABEL_FIELD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SHOW_FORM_CODE")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<string>("SHOW_ID_FIELD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("SHOW_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<double>("STEP")
                        .HasColumnType("float");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<string>("VALIDATA_TYPE")
                        .HasMaxLength(5)
                        .HasColumnType("nvarchar(5)");

                    b.Property<string>("VERIFY_ERROR_INFO")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("VERIFY_EXPRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("VERIFY_MSG")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int?>("VERIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_EDIT_ID");

                    b.HasIndex("PAGE_EDIT_PANEL_ID");

                    b.ToTable("T_PF_EDIT_COLUMN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEST_NAV")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("EDIT_COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SRC_NAV")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("EDIT_COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_EDIT_COLUMN_FILL_MAP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP_D", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEST_FIELD_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid>("EDIT_COLUMN_FILL_MAP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SRC_FIELD_NAME")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDIT_COLUMN_FILL_MAP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_EDIT_COLUMN_FILL_MAP_D");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDIT_COLUMN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYS_PARAM")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPERATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("EDIT_COLUMN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_EDIT_COLUMN_FILTER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FDDEBACK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BACKINFO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("FEEDBACK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INFO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PF_FDDEBACK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FDDEBACK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FDDEBACK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FDDEBACK_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FDDEBACK_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<byte[]>("FILE_DATA")
                        .HasColumnType("varbinary(max)");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FILE_TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_TEMPORARY_FILE")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_DB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISLOCAL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PF_FILE_DB");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_DB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FILE_DB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FILE_DB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FILE_DB_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FILE_TYPE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ActivityEditable")
                        .HasColumnType("int");

                    b.Property<string>("ActivityId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ActivityName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ActivityType")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("Code")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("CreateDate")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreateUserId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CreateUserName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CustomName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("Description")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EntityFlowStatus")
                        .HasColumnType("int");

                    b.Property<Guid?>("EntityId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("EntityType")
                        .HasColumnType("int");

                    b.Property<string>("EntityTypeFullName")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FrmId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("InstanceSchemeId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MakerList")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OrderStatus")
                        .HasColumnType("int");

                    b.Property<string>("PreviousId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SchemeContent")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("FrmId");

                    b.HasIndex("InstanceSchemeId");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FLOW_INSTANCE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE_OPER_HIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("Content")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("CreateDate")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreateUserId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CreateUserName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("InstanceId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("InstanceId");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FLOW_INSTANCE_OPER_HIS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE_TRANS_HIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("CreateDate")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreateUserId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CreateUserName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FromNodeId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("FromNodeName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("FromNodeType")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("InstanceId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IsFinish")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ToNodeId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ToNodeName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("ToNodeType")
                        .HasColumnType("int");

                    b.Property<int>("TransitionSate")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("InstanceId");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FLOW_INSTANCE_TRANS_HIS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_SCHEME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ActiveAutoSend")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("CreateDate")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreateUserId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CreateUserName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("Description")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("Disabled")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FrmId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ModifyDate")
                        .HasColumnType("datetime2");

                    b.Property<string>("ModifyUserId")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ModifyUserName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PermitFrmId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SchemeCode")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SchemeContent")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("SchemeName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("SortCode")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("FrmId");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PermitFrmId");

                    b.ToTable("T_PF_FLOW_SCHEME");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AUTH_ORG_CODES")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("ICON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_IGNORE_PERMISSION")
                        .HasColumnType("bit");

                    b.Property<string>("JS_FILES")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODULE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLATFORM_CATEGORY")
                        .HasColumnType("int");

                    b.Property<int>("PLATFORM_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("URI")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FORM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("VERSION")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FORM_CONFIG_VERSION");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION_D", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("FORM_CONFIG_VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMOVE_COOKIE_KEY")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("FORM_CONFIG_VERSION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_FORM_CONFIG_VERSION_D");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_CHART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VALUE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_FORM_HOME_CHART");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_HMI", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HMI_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HMI_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_FORM_HOME_HMI");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_RANKING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VALUE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_FORM_HOME_RANKING");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_STATISTIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VALUE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_FORM_HOME_STATISTIC");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_QUERY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_QUERY_SHOW_TYPE")
                        .HasColumnType("int");

                    b.Property<int?>("INPUT_FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_REMEMBER")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SHARE_KEY")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_FORM_QUERY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_HOME_TITLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COCOR")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FONTSIZE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("ISTOCHILE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SECOND")
                        .HasColumnType("int");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_HOME_TITLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FILE_PATH")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("FILE_TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_IMG_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FILE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_IMG_FILE_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_LABEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<string>("LANGUAGE")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABEL_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_LABEL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MENU", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ICON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_INIT_REQ")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_INIT_SHOW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_MOBILE_MENU")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PERMISSION_MENU")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PERMISSION_SUB")
                        .HasColumnType("int");

                    b.Property<bool>("IS_RESIDENT")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MENU_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MENU_FORM_PARAMS")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PICTURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLATFORM_CATEGORY")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("MENU_FORM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("PICTURE_ID");

                    b.ToTable("T_PF_MENU");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CMD_LEN")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MQTT_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("MQ_IP")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("MQ_PORT")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_MQTT_CONFIG");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG_THEME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PUBLISH")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MQTT_CONFIG_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("THEME_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("MQTT_CONFIG_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_MQTT_CONFIG_THEME");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CREATE_DEPARTMENT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CREATE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("ISTOCHILE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TITLE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_NOTICE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_NOTICE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("NOTICE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_NOTICE_FILE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("CHART_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IGNORE_ORG_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW_DATA")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("MIN_WIDTH")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SPAN")
                        .HasColumnType("int");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_PAGE_CHART");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART_PARAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYS_PARAM")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPERATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_CHART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_CHART_ID");

                    b.ToTable("T_PF_PAGE_CHART_PARAM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CUSTOM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("COMPONENT_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_API")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_PAGE_CUSTOM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("BATCH_QUERY_API")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("BATCH_UPDATE_API")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CHILD_SET_FIELD")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CODE_FIELD_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("CODE_RULE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("DEFAULT_PAGE_SIZE")
                        .HasColumnType("int");

                    b.Property<string>("EDIT_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("EDIT_PAGE_ENTITY_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HEIGTH")
                        .HasColumnType("int");

                    b.Property<bool>("IS_CONTAINS_NAV")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DETAIL_REQUIRED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PAGE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PERMIT_ADD_ROW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PERMIT_DEL_ROW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOWROWNO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SUB_ADD_BTN_DISABLED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SUB_DELETE_BTN_DISABLED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAV_PROPERTY")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("NAV_ROW_CLASS_FILTER")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARAM_SCHEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_COPY_FIELD")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUERY_API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("QUERY_SEND_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("RELATION_FIELD")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("SEND_TYPE")
                        .HasColumnType("int");

                    b.Property<bool?>("SHOW_CHECK")
                        .HasColumnType("bit");

                    b.Property<string>("SORT_FIELDS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("SORT_ORDERS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SUB_TABLE_CONDITION")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.HasIndex("PARAM_SCHEME_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_PF_PAGE_EDIT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT_PANEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DEFAULT_EXPAND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DISPLAY")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_EDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_EDIT_ID");

                    b.ToTable("T_PF_PAGE_EDIT_PANEL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("API_URL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("BATCH_DEL_API_URL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("CLASS_FIELD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CLASS_FUNC_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DATA_TABLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DEL_API_URL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FOOTER_SUM_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HEIGTH")
                        .HasColumnType("int");

                    b.Property<bool>("IGNORE_ORG_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW_CARD")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW_FOOTER")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SHOW_ROW_NO")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("MAX_SELECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("NO_SELECT_FIELD")
                        .HasColumnType("bit");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<int>("ORDER")
                        .HasColumnType("int");

                    b.Property<string>("ORDERS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARAM_SCHEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_RELATION_FIELD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("PIC_CODE_FIELD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("POSITION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("RELATION_FIELD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SEND_TYPE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("SHOW_CHECK")
                        .HasColumnType("bit");

                    b.Property<string>("SORT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SORTS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TABLE_CONDITION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("TITLE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.HasIndex("PARAM_SCHEME_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_PF_PAGE_TABLE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE_PANEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DEFAULT_EXPAND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DISPLAY")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.ToTable("T_PF_PAGE_TABLE_PANEL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TREE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BATCH_DEL_API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("BATCH_DEL_SEND_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("CAN_ADD_NODE")
                        .HasColumnType("bit");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CUSTOM_PARAMS")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("FILTER_ORG_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IGNORE_ORG_RULE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("MULTI_CHECK")
                        .HasColumnType("bit");

                    b.Property<int>("MULTI_CHECK_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<int>("ORDER")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUERY_API_URL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("QUERY_SEND_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("RELATION_FIELD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("SELECT_CONDITION")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int>("SHOW_MODEL")
                        .HasColumnType("int");

                    b.Property<string>("SORT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TREE_SELECTED_PARAM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.ToTable("T_PF_PAGE_TREE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CASE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("CODE_RULE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEFAULT_VALUE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("EDITABLE")
                        .HasColumnType("bit");

                    b.Property<int>("EDIT_CONTROL_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROMPT_INFO")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<bool>("REQUIRED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TABLE_CONTROL_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_PARAM_ITEM");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_PANEL_SHOW")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_ACRONYM")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_PARAM_SCHEME");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("EDITABLE")
                        .HasColumnType("bit");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SHOW")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARAM_ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARAM_SCHEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("REQUIRED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARAM_ITEM_ID");

                    b.HasIndex("PARAM_SCHEME_ID");

                    b.ToTable("T_PF_PARAM_SCHEME_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasMaxLength(50)
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PICTURE_ID")
                        .HasMaxLength(50)
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.HasIndex("PICTURE_ID");

                    b.ToTable("T_PF_PIC_FILTER");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FIELD_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("OPERATE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PIC_FILTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PIC_FILTER_ID");

                    b.ToTable("T_PF_PIC_FILTER_DETAIL");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUERY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CASE")
                        .HasColumnType("int");

                    b.Property<bool>("CHECK_STRICTLY")
                        .HasColumnType("bit");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DATA_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DATA_VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("DATETIME_FORMATE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INPUT_DATA_API")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("INPUT_DATA_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("INPUT_FILTER_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_ID_FIELD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("INPUT_LABEL_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_NAV_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SAVE_FIELD")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("INPUT_SHOW_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_SORT_FIELD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("INPUT_SORT_ORDER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT_QUERY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT_SHOW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ONLY_CHECK_LEAF")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_REQUIRE")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYS_PARAM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_TITLE")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("MULTIPLE_CHOICE")
                        .HasColumnType("bit");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<string>("OP_DEFAULT")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PAGE_FORM_QUERY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUERY_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("SELECT_CONDITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_FORM_ID");

                    b.HasIndex("PAGE_FORM_QUERY_ID");

                    b.ToTable("T_PF_QUERY");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUERY_APP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DATA_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DATA_VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DEFAULT_QUERY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEFAULT_SHOW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LABEL")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<string>("OP_DEFAULT")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PAGE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("QUERY_NAME")
                        .HasMaxLength(64)
                        .HasColumnType("nvarchar(64)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_QUERY_APP");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUESTION_FEEDBACK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEAPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FEEDBACK_TIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUESTION_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_QUESTION_FEEDBACK");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_SCOPES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_SCOPES");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_TABLE_PARAMS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CUSTOM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_SYS_PARAM")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPERATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_TABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TABLE_ID");

                    b.ToTable("T_PF_TABLE_PARAMS");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_TREE_COLUMN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENUM")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("FIELD_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORMAT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("INPUT_DATA_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PAGE_TREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QUERY_FORMAT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("SRC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PAGE_TREE_ID");

                    b.ToTable("T_PF_TREE_COLUMN");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("VERSION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PF_VERSION");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.DataUpdateRecord", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DataID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EntityFullName")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("EntityName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TargetDepartmentID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UpdateFiled")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("UpdateType")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("DataUpdateRecord");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_FM_ORGANIZATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESC")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TENANT_CODE")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_FM_ORGANIZATION");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_PF_CODE_RULE_SERIAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CODE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DATE_VALUE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RELEASE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ROW_VERSION")
                        .HasColumnType("int");

                    b.Property<string>("SERIAL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TAKE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("USE_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID", "CODE_TYPE", "SERIAL");

                    b.HasIndex("ORG_ID", "CODE_TYPE", "DATE_VALUE", "SERIAL");

                    b.HasIndex("ORG_ID", "CODE_TYPE", "STATUS", "NUM");

                    b.HasIndex("ORG_ID", "CODE_TYPE", "DATE_VALUE", "STATUS", "NUM");

                    b.ToTable("T_PF_CODE_RULE_SERIAL");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_PF_PARAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(60)
                        .HasColumnType("nvarchar(60)");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ENTITY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VALUE")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.HasKey("ID");

                    b.ToTable("T_PF_PARAM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REASON_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CATEGORY")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_REASON_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ACCIDENT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("ACCIDENT_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ACCIDENT_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("ACCIDENT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ACCIDENT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("ECONOMIC_LOSSES")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("ESTIMATE_CASUALTY_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPACT_SCOPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_ACCIDENT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int?>("RSP_LEVEL")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TAKE_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WORK_SUGGEST")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.HasKey("ID");

                    b.HasIndex("ACCIDENT_TYPE_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("KIND_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("KIND_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PUNISHMENT_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PUNISHMENT_RESULT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INJURED_AREA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("INJURED_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DAMAGE_OBJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DAMAGE_OBJECT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EQUIPMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FACILITIES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOSS_CONDITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MACHINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("EQUIPMENT_ID");

                    b.HasIndex("FACILITIES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVIDENCE_DESC")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("EVIDENCE_SOURCE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_FORENSICS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_FORENSICS_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_PFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_PFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON_ANALYZE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("REASON_MODEL")
                        .HasColumnType("int");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.HasIndex("REASON_TYPE_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACCIDENT_COURSE")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CASUALTY_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("ECONOMIC_LOSSES")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("SYSTEMMAXTIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.ToTable("T_AE_ACCIDENT_EVENT_SURVEY_RESULT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_KIND", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_AE_ACCIDENT_KIND");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_LEVEL_DAYS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ACCIDENT_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DAYS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_AE_ACCIDENT_LEVEL_DAYS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEAM_MEMBER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_MEMBER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LEADER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("SURVEY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEADER_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.HasIndex("SURVEY_USER_ID");

                    b.ToTable("T_AE_ACCIDENT_SURVEY_TEAM_MEMBER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEAM_MEMBER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_MEMBER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_AE_ACCIDENT_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_DOSET_DEPARTMENT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVENTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_AE_DOSET_DEPARTMENT_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACCIDENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INVESTIGATION_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("INVESTIGATION_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("INVESTIGATION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("LEADER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REVIEW_COMMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool?>("REVIEW_OK")
                        .HasColumnType("bit");

                    b.Property<string>("SCENE_DESC")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("SCENE_ENV_DESC")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("SCENE_EVIDENCE_DESC")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEAM_MEMBER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACCIDENT_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LEADER_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_MEMBER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_ACC_FILES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD_ACC_FILES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_ASK_USERS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD_ASK_USERS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_CHART_FILES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD_CHART_FILES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_NOTES_FILES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_AE_INVESTIGATION_RECORD_NOTES_FILES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_ACTIVE_USER_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("type")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_ACTIVE_USER_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSCHECKTYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECKTYPEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TimeType")
                        .HasColumnType("int");

                    b.Property<string>("name")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("value")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSCHECKTYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSCHECKTYPE_YEAR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ALLCOUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("FINISHPERCENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("INTTIMECOUNT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONTH")
                        .HasColumnType("int");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int>("NOTFINISHCOUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OUTTIMECOUNT")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSCHECKTYPE_YEAR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSRISK_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECKTYPEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("COUNTAPRIL")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTAUGUST")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTDECEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTFEBRUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJANUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJULY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJUNE")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMARCH")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMAY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTNOVEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTOCTOBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTSEPTEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTTOTAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSRISK_INFO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNTCHECK")
                        .HasColumnType("int");

                    b.Property<int>("COUNTCHECKOUTTIME")
                        .HasColumnType("int");

                    b.Property<int>("COUNTPLAN")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PERCENTCHECK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("TEAMID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAMNAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TimeType")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSSAFECHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECKTYPE_YEAR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("COUNTAPRIL")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTAUGUST")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTDECEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTFEBRUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJANUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJULY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJUNE")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMARCH")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMAY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTNOVEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTOCTOBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTSEPTEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTTOTAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSSAFECHECKTYPE_YEAR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECK_YEAR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("COUNTAPRIL")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTAUGUST")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTDECEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTFEBRUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJANUARY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJULY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTJUNE")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMARCH")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMAY")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTNOVEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTOCTOBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTSEPTEMBER")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTTOTAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_BSSAFECHECK_YEAR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_CLOSE_TASKS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AUDIT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AUDIT_USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TASK_IDS")
                        .HasMaxLength(5000)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("TASK_NAMES")
                        .HasMaxLength(5000)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_CLOSE_TASKS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HOME_BSRISKREASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONTH")
                        .HasColumnType("int");

                    b.Property<int>("NUMD")
                        .HasColumnType("int");

                    b.Property<int>("NUMS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("PERCENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid>("SOURCEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SOURCEVAL")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_HOME_BSRISKREASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISKCHANGE_PEC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("CHANGE_PERCENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("CHANGE_PERCENT_SHOW")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<int>("COUNT_DEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("MINETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONTH")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.Property<string>("YEARMONTH")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_HRISKCHANGE_PEC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISK_COUNT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNT_CHANGE")
                        .HasColumnType("int");

                    b.Property<int>("COUNT_UNCHANGE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("MINETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_HRISK_COUNT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISK_TOP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MAINID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("MINETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_HRISK_TOP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_LOGIN_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FROM")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VERSION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BI_LOGIN_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RISK_LEVEL1", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DepName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RiskCount")
                        .HasColumnType("int");

                    b.Property<int>("RiskType")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_RISK_LEVEL1");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RISK_LEVEL2", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DepName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RiskCount")
                        .HasColumnType("int");

                    b.Property<int>("RiskType")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_DEPARTMENT_ID");

                    b.ToTable("T_BI_RISK_LEVEL2");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RUNLOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("RUNDATETIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_RUNLOG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_SAFETASK_FINISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime>("ENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FILTER_TIME")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FO01_FINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO01_OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("FO01_TOTAL")
                        .HasColumnType("int");

                    b.Property<int>("FO01_UNFINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO02_FINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO02_OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("FO02_TOTAL")
                        .HasColumnType("int");

                    b.Property<int>("FO02_UNFINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO03_FINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO03_OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("FO03_TOTAL")
                        .HasColumnType("int");

                    b.Property<int>("FO03_UNFINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO04_FINISH")
                        .HasColumnType("int");

                    b.Property<int>("FO04_OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("FO04_TOTAL")
                        .HasColumnType("int");

                    b.Property<int>("FO04_UNFINISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("STARTTIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("TEAM_CHARGE_USER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_BI_SAFETASK_FINISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("Count1")
                        .HasColumnType("int");

                    b.Property<int>("Count10")
                        .HasColumnType("int");

                    b.Property<int>("Count2")
                        .HasColumnType("int");

                    b.Property<int>("Count3")
                        .HasColumnType("int");

                    b.Property<int>("Count4")
                        .HasColumnType("int");

                    b.Property<int>("Count5")
                        .HasColumnType("int");

                    b.Property<int>("Count6")
                        .HasColumnType("int");

                    b.Property<int>("Count7")
                        .HasColumnType("int");

                    b.Property<int>("Count8")
                        .HasColumnType("int");

                    b.Property<int>("Count9")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PART")
                        .HasColumnType("int");

                    b.Property<string>("Parameter1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter10")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter3")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter4")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter5")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter6")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter7")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter8")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Parameter9")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TimeType")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_TRAIN_PLAN_COUNT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DepName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("activeCount")
                        .HasColumnType("int");

                    b.Property<double>("finishPrecent")
                        .HasColumnType("float");

                    b.Property<int>("planCount")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_TRAIN_PLAN_COUNT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<int>("SERIOUS_RISK")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_CheckProjectCategoryID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENT_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("Nav_CheckProjectCategoryID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENT_CHECK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENT_CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_BS_CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENT_CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_BS_CHECK_TYPE_LEVEL_ID");

                    b.ToTable("T_BS_CHECK_CONTENT_CHECK_TYPE_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_HM_RISK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HM_RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENT_ID");

                    b.HasIndex("HM_RISK_AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENT_HM_RISK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_MAIN_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RESPONOBJECT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MAIN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENT_MAIN_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_QUESTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENT_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_CONTENT_QUESTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISRISK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SERIOUS_RISK")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("CHECK_PROJECT_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_BS_CHECK_MAIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN_LAW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("STANDARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_MAIN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("STANDARD_ID");

                    b.ToTable("T_BS_CHECK_MAIN_LAW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_PROJECT_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY_CHECKTYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_CATEGORY_ID");

                    b.ToTable("T_BS_CHECK_PROJECT_CATEGORY_CHECKTYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_CATEGORY_ID");

                    b.ToTable("T_BS_CHECK_PROJECT_CATEGORY_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_PROJECT_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_PROJECT_PROJECT_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEMAND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DESCREPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_QUESTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_BS_CHECK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CheckLevel_ENUMS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CheckLevel_ENUMS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_TYPE_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_MINETYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MINETYPE_ENUMS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("MINETYPE_ENUMS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_CHECK_TYPE_MINETYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_DEPARTMENT_AREAOBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENTID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_DEPARTMENT_AREAOBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_OPERATE_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DATA_ID_SUB")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LOGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OPERATEPOINT")
                        .HasColumnType("int");

                    b.Property<DateTime?>("OPERTETIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ORDERNO")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USRTNAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_OPERATE_LOG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<int>("PLANCHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID_SEND")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID_SEND");

                    b.ToTable("T_BS_PLAN_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_BS_PLAN_SET_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_DEPARTMENT_OUT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_BS_PLAN_SET_DEPARTMENT_OUT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_DEP_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_BS_PLAN_SET_DEP_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_BS_PLAN_SET_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_RISK_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_LEVEL_DELAY_DAYS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MAX_DELAY_DAYS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_RISK_LEVEL_DELAY_DAYS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_RISK_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DATAID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool>("ISORDEREND")
                        .HasColumnType("bit");

                    b.Property<bool?>("ISSUBMITFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("STARTTIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("SUBMITFINISHTIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("SUBMIT_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("SUBMIT_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACTUAL_DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECKDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_USER_REFUSED_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DEALDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEAL_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEAL_USER_REFUSED_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DEMAND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCREPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DESCRIBE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISBACK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISCHECKERCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISDEALUSERCHECK")
                        .HasColumnType("bit");

                    b.Property<bool?>("ISFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool?>("ISSUBMITFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LastDateSystem")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("LastDateUser")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("NEW_USERID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("NOTICEDATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("OKDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<DateTime?>("REPORTDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int?>("RiskContentState")
                        .HasColumnType("int");

                    b.Property<Guid?>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SERIOUS_RISK")
                        .HasColumnType("int");

                    b.Property<DateTime?>("SUBMITFINISHTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACTUAL_DEAL_USER_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_MAIN_ID");

                    b.HasIndex("CHECK_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("CHECK_PROJECT_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_USER_ID");

                    b.HasIndex("DEAL_DEPARTMENT_ID");

                    b.HasIndex("DEAL_USER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_PERSON_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_BACK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACTUAL_DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DEALDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEAL_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEMAND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LastDateSystem")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("LastDateUser")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("NOTICEDATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("OKDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<DateTime?>("REPORTDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RiskContentState")
                        .HasColumnType("int");

                    b.Property<Guid?>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACTUAL_DEAL_USER_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CHECK_MAIN_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_USER_ID");

                    b.HasIndex("DEAL_DEPARTMENT_ID");

                    b.HasIndex("DEAL_USER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_PERSON_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_BACK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACTUAL_DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHCECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CHECKOPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATETIME_ACTUAL_DEAL")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATETIME_CHECKSIGN")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATETIME_DEALSIGN")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEALDESCRIBE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEALOPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DEALSITUATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ENDDATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECKSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("ISDEALSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACTUAL_DEAL_USER_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CHECK_USER_ID");

                    b.HasIndex("DEAL_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_PERSON_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_DEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_CONTENT_DEAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_DEAL_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_CONTENT_DEAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_DEAL_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SIGNTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("SUBMIT_CONTENT_DEAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUBMIT_CONTENT_DEAL_ID");

                    b.HasIndex("SUSER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SIGNTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("SUBMIT_CONTENT_DEAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUBMIT_CONTENT_DEAL_ID");

                    b.HasIndex("SUSER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_BS_RISK_SUBMIT_CONTENT_BACKID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("T_BS_RISK_SUBMIT_CONTENT_BACKID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_BS_RISK_SUBMIT_CONTENT_BACKID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_REASON_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("T_BS_RISK_SUBMIT_CONTENT_BACKID");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEMAND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DESCREPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISINSERT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ORDERTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SERIOUS_RISK")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID_AUDIT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_EDIT")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("USER_ID_AUDIT");

                    b.HasIndex("USER_ID_EDIT");

                    b.ToTable("T_BS_RISK_SUBMIT_CONTENT_TEMP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("OPERARTETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_PERSON_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_DELAY_APPLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHCEKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHCEKUSERID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LastDate")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("LastDateApply")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("REASON")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid>("RISK_SUBMIT_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_DELAY_APPLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEMPDEMAND")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_CONTENT_ID");

                    b.HasIndex("RISK_SUBMIT_DELAY_APPLY_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_PERSON_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RiskContentState")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_NOTICE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("OPERATETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("RISK_SUBMIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_SUBMIT_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_SUBMIT_ID");

                    b.HasIndex("RISK_SUBMIT_NOTICE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_RISK_SUBMIT_NOTICE_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_TPM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_MATCH")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_REPORT")
                        .HasColumnType("bit");

                    b.Property<string>("MATCH_EXCEPTION")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("crdate")
                        .HasColumnType("datetime2");

                    b.Property<string>("description")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("machinecode")
                        .HasMaxLength(32)
                        .HasColumnType("nvarchar(32)");

                    b.Property<string>("machinename")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("processresult")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("processworkerid")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("processworkername")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("remark")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("usedepartmentname")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BS_RISK_TPM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_CHECKAUDIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKFINISHINTTIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("CHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<int>("CREACTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CheckUsers")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISCHECKFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool>("ISFINISHINTTIME")
                        .HasColumnType("bit");

                    b.Property<bool?>("ISNEEDTOUP")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LIMITDATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK_CANCEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("RISKSTATE")
                        .HasColumnType("int");

                    b.Property<int>("STATECHECK")
                        .HasColumnType("int");

                    b.Property<int>("STATUCHECK")
                        .HasColumnType("int");

                    b.Property<int>("STATUSPLAN")
                        .HasColumnType("int");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USERID_DOPLAN")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_CANCEL")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_CHECKAUDIT_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("APPROVE_TEMP_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("DEPARTMENTID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_SET_ID");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.HasIndex("USERID_DOPLAN");

                    b.ToTable("T_BS_SAFE_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("CHECKRESULT")
                        .HasColumnType("int");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISMAINCHANGE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_REJECTING")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("REMARK_RESULT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SERIOUS_RISK")
                        .HasColumnType("int");

                    b.Property<Guid?>("USERID_REJECT")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_MAIN_ID");

                    b.HasIndex("CHECK_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("CHECK_PROJECT_PROJECT_CATEGORY_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_LAW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("STANDARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("STANDARD_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_LAW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_QUESTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("SAFE_CHECK_QUESTION_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_QUESTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_REASON_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("RESULT")
                        .HasColumnType("int");

                    b.Property<Guid>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_REJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REJECT_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_REJECT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECKFALSEREASON")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool?>("ISSAMEMAINCHECKOK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SAFECHECKSTATE")
                        .HasColumnType("int");

                    b.Property<Guid>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_SAFE_CHECK_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_PROJECT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_PROJECT_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_PROJECT_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_PROJECT_CATEGORY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_PROJECT_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISLEAVE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_BS_SAFE_CHECK_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFE_CHECK_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_DETAIL_ID");

                    b.HasIndex("SAFE_CHECK_RECORD_ID");

                    b.ToTable("T_BS_SAFE_CHECK_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RISK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.ToTable("T_BS_SAFE_CHECK_RISK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_USERSIGN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_CHECK_ID");

                    b.HasIndex("SUSER_ID");

                    b.ToTable("T_BS_SAFE_CHECK_USERSIGN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OVERALL_EVALUATE_CONCLUSION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_ABILITY_EVALUATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("PLATFORM_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_CM_ABILITY_EVALUATE_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ABILITY_EVALUATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ABILITY_EVALUATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_ABILITY_EVALUATE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATE_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_ABILITY_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DEMAND_SURVEY_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DEMAND_SURVEY_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DRILL_PLAN_TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("EQUIPMENT_DEMAND_SURVEY_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("EQUIPMENT_DEMAND_SURVEY_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime>("LASTRUNDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("URGENT_EVENT_LIST_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("URGENT_EVENT_TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_CM_CONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_CONTINGENCY_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_CONTINGENCY_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_COVERAGE_INFLUENCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_COVERAGE_INFLUENCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADVISE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_CM_DRILL_ESTIMATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE_ITEM_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_DRILL_ESTIMATE_ITEM_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADVISE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMEATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ESTIMEATE_ID");

                    b.HasIndex("ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_DRILL_ESTIMATE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_NAME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_DRILL_NAME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_DRILL_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DRLL_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("TRIGGERED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("NAME_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_DRILL_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_STANDARD_CREATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("STANDARD_CREATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("STANDARD_CREATE_ID");

                    b.ToTable("T_CM_DRILL_PLAN_STANDARD_CREATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("CREACTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_OUT")
                        .HasMaxLength(800)
                        .HasColumnType("nvarchar(800)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("METHOD")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasMaxLength(50)
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID_MANAGE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_RECORD")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("NAME_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_DETAIL_ID");

                    b.HasIndex("USER_ID_MANAGE");

                    b.HasIndex("USER_ID_RECORD");

                    b.ToTable("T_CM_DRILL_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_CM_DRILL_RECORD_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_CM_DRILL_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_SUMMARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_CM_DRILL_RECORD_SUMMARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_USER_ESTIMATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAGREE")
                        .HasColumnType("bit");

                    b.Property<bool>("ISSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_DRILL_RECORD_USER_ESTIMATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_SUMMARY_REQUIREMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISOK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_CM_DRILL_SUMMARY_REQUIREMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("END_TIME")
                        .HasMaxLength(50)
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasMaxLength(50)
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_EQUIPMENT_DEMAND_SURVEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("AVAILABLE_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEMAND_SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MATERIAL_LOCATION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("MATERIAL_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NEED_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("SPECIFICATION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("SURVEY_MASTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEMAND_SURVEY_ID");

                    b.HasIndex("LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_MASTER_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_CM_EQUIPMENT_DEMAND_SURVEY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEMAND_SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEMAND_SURVEY_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_EQUIPMENT_DEMAND_SURVEY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasMaxLength(50)
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasMaxLength(50)
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_MASTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_MASTER_ID");

                    b.ToTable("T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EVENT_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_EVENT_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DEATHLINE")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARMTNET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INTERNAL_NO")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("MAIN_TEC_PARAMS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("MATERIAL_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("SPECIFICATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("UNIT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARMTNET_ID");

                    b.HasIndex("MATERIAL_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_MATERIAL_LIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MATERIAL_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MATERIAL_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_MATERIAL_LIBRARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("COUNT_END")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("COUNT_OPERATE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("COUNT_START")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISCHECKSAME")
                        .HasColumnType("bit");

                    b.Property<bool>("ISEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MATERIAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("OPERATETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MATERIAL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_CM_MATERIAL_OPERATE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISSYSTEM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MASTERA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MATERIAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("OPERATETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(350)
                        .HasColumnType("nvarchar(350)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_OPERATE")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MASTERA_ID");

                    b.HasIndex("MATERIAL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_ID_OPERATE");

                    b.ToTable("T_CM_MATERIAL_OPERATE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_MATERIAL_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ACCIDENT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("ACCIDENT_PLACE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("ACCIDENT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ACCIDENT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADVISE")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONCLUSION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID_REPORT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESC")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EVENT_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JoinDepartment")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESTORE_SITUATION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int?>("RSP_COMMAND_LEVEL")
                        .HasColumnType("int");

                    b.Property<int?>("RSP_CONDITION")
                        .HasColumnType("int");

                    b.Property<int?>("RSP_LEVEL")
                        .HasColumnType("int");

                    b.Property<int?>("RSP_ORDER")
                        .HasColumnType("int");

                    b.Property<DateTime?>("RSP_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("RSP_STOP_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("RSP_TRAINING_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("RUN_SITUATION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_MANAGE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_REPORT")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACCIDENT_TYPE_ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_ID_REPORT");

                    b.HasIndex("EVENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_ID_MANAGE");

                    b.HasIndex("USER_ID_REPORT");

                    b.ToTable("T_CM_RSP_ESTIMATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_CONDITION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_RSP_ESTIMATE_CONDITION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_CONDITIONS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONDITION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int?>("RSP_CONDITION_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CONDITION_ID");

                    b.HasIndex("ESTIMATE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_RSP_ESTIMATE_CONDITIONS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_ESTIMATE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ESTIMATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_RSP_ESTIMATE_ESTIMATE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_EVENT_KIND", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("KIND_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ESTIMATE_ID");

                    b.HasIndex("KIND_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_CM_RSP_ESTIMATE_EVENT_KIND");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_JOIN_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ESTIMATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_RSP_ESTIMATE_JOIN_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_AREAR_INFLUENCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COVERAGE_INFLUENCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("URGENT_EVENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COVERAGE_INFLUENCE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("URGENT_EVENT_ID");

                    b.ToTable("T_CM_URGENT_AREAR_INFLUENCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACCIDENT_CONSEQUENCE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ADDRESS_INFLUENCE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("AREAR_INFLUENCE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("CREACTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVENT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EVENT_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_URGENT_EVENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT_CONTINGENCY_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("COMPLETE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CONTINGENCY_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_DRAW_UP")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("URGENT_EVENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTINGENCY_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("URGENT_EVENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_CM_URGENT_EVENT_CONTINGENCY_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT_RISK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("URGENT_EVENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_TYPE_ID");

                    b.HasIndex("URGENT_EVENT_ID");

                    b.ToTable("T_CM_URGENT_EVENT_RISK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACCEPT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("DEVICE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("DEVICE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_EMERGENCY")
                        .HasColumnType("bit");

                    b.Property<int>("IS_SEND")
                        .HasColumnType("int");

                    b.Property<string>("MACHINE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("PURCHASE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TPM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CATEGORY_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_POST_ID");

                    b.HasIndex("USE_DEPARTMENT_ID");

                    b.HasIndex("USE_USER_ID");

                    b.HasIndex("USE_USER_POST_ID");

                    b.ToTable("T_DM_DEVICE_BASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("ITEM1")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("ITEM2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ITEM3")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("T_DM_DEVICE_BASEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEVICEBASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_DM_DEVICE_BASEID");

                    b.ToTable("T_DM_DEVICE_BASE_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASECHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISMAIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASECHECK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_BASE_CHECK_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_BASE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MECHANISM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RESULT")
                        .HasColumnType("int");

                    b.Property<DateTime>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_BASE_INSPECTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_DM_DEVICE_BASE_INSPECTION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXTERNAL_SUPPORT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MALFUCTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("OVERHAUL_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_BASE_OVERHAUL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FILE_PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FILE_PARENT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_BASE_OVERHAUL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("TPM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_BASE_PURCHASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACCEPT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEVICE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_EMERGENCY")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MANAGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MANUFACTURER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("MANUFACTURE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PURCHASE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SERVICE_LIFE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SUPPLIER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TPM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CATEGORY_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_ID");

                    b.HasIndex("DEVICE_PURCHASE_ID");

                    b.HasIndex("MANAGE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_BASE_PURCHASE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_PURCHASE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_PURCHASE_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_BASE_PURCHASE_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL_RECEIPT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_PURCHASE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_PURCHASE_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_BASE_PURCHASE_DETAIL_RECEIPT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MACHINE_CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("MACHINE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLANID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("RECORD_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("SCHEDULIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SPEC")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEAM_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("DEVICEBASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SCHEDULIN_ID");

                    b.ToTable("T_DM_DEVICE_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("BASECHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECK_VALUE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("ITEM1")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("ITEM2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ITEM3")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("BASECHECK_ID");

                    b.HasIndex("DEVICE_CHECK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_CHECK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_CHECK_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_CHECK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_CHECK_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("CHECKDATETIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_MAINTENANCE_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("ENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS_APPROVE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MACHINE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLANID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("Result")
                        .HasColumnType("int");

                    b.Property<string>("SPEC")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("WORK_PLAN")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("DEVICEBASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_MAINTENANCE_CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_MAINTENANCE_CHECK_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_CHECK_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS_APPROVE")
                        .HasColumnType("int");

                    b.Property<Guid?>("SYNC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEARPLAN")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_MAINTENANCE_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("ENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<string>("POSITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("SPEC")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICEBASE_ID");

                    b.HasIndex("DEVICE_MAINTENANCE_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_PLAN_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PPLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_PPLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECK_OPINION")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXTERNAL_SUPPORT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_HELP")
                        .HasColumnType("bit");

                    b.Property<string>("MACHINE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MACHINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MALFUCTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<int>("OPINION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("OVERHAUL_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("PERSON_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PHONE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("REPAIR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPAIR_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_OVERHAUL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OVERHAUL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OVERHAUL_ID");

                    b.ToTable("T_DM_DEVICE_OVERHAUL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("BASE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("TPM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASE_PURCHASE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_PURCHASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACCEPT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEVICE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_EMERGENCY")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MANAGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MANUFACTURER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("MANUFACTURE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PURCHASE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SERVICE_LIFE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SUPPLIER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TPM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CATEGORY_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_ID");

                    b.HasIndex("DEVICE_PURCHASE_ID");

                    b.HasIndex("MANAGE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_PURCHASE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_PURCHASE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_PURCHASE_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_PURCHASE_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL_RECEIPT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_PURCHASE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_PURCHASE_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_PURCHASE_DETAIL_RECEIPT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCRPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("EMERGENCY_LEVEL_NAME")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_HELP")
                        .HasColumnType("bit");

                    b.Property<string>("MACHINE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MACHINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("REPAIR_CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("REPAIR_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("REPAIR_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPAIR_CHARGE_USER_ID");

                    b.HasIndex("REPAIR_USER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_REPAIR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REPAIR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPAIR_ID");

                    b.ToTable("T_DM_DEVICE_REPAIR_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_SCRAP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICEBASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICEBASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_SCRAP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONTH")
                        .HasColumnType("int");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("SET_TYPE")
                        .HasColumnType("int");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("DEVICE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_DM_TIME_RUN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("TIME_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TIME_SET_ID");

                    b.ToTable("T_DM_TIME_RUN_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("CHANGE_SHIFT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CURRENT_CLASS_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CURRENT_CLASS_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CURRENT_CLASS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CURRENT_CLASS_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEPARTMENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEVICE_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEVICE_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DEVICE_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("DEVICE_STORAGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("EDITOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENVIRONMENT_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ENVIRONMENT_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENVIRONMENT_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LAST_CLASS_FINISH_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("LAST_CLASS_FINISH_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("LAST_CLASS_RECORD_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("LAST_CLASS_RECORD_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("SHIFT_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("SUPPLIES_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SUPPLIES_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("SUPPLIES_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_POST_ID");

                    b.HasIndex("EDITOR_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_FO_CHANGE_SHIFT_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_AFTER_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_SHIFT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("USER_SHIFT_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_SHIFT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_CHANGE_SHIFT_RECORD_AFTER_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_SHIFT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_SHIFT_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CHANGE_SHIFT_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_PRE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_SHIFT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("USER_SHIFT_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_SHIFT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_CHANGE_SHIFT_RECORD_PRE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_DEAL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_DEAL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_OUTSOURCE")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<DateTime?>("JOB_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("JOB_SCHEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("JobCause")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TERRITORY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("JOB_SCHEME_ID");

                    b.HasIndex("MONITOR_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.HasIndex("TERRITORY_DEPARTMENT_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_JOB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_JOB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_OUTSOURCE")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<DateTime?>("JOB_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("JOB_SCHEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("JobCause")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TERRITORY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("JOB_SCHEME_ID");

                    b.HasIndex("MONITOR_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.HasIndex("TERRITORY_DEPARTMENT_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_JOB_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_DEAL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_OUTSOURCE_DEAL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_OUTSOURCE_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_OUTSOURCE_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CERTIFICATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<bool>("EXIST_CERTIFICATE")
                        .HasColumnType("bit");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_DOCUMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TRAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TRAIN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_SAFE_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_LICENSE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_LICENSE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CRUCIAL_LICENSE_SAFE_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("AUDIT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CURRENT_CLASS_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CURRENT_CLASS_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("CURRENT_CLASS_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEVICE_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEVICE_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DEVICE_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("DEVICE_STORAGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("EDITOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("ENVIRONMENT_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ENVIRONMENT_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENVIRONMENT_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_HANDOVER")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("NEXT_CLASS_TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVERTIME")
                        .HasColumnType("int");

                    b.Property<DateTime>("RECORD_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("SHIFT_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("SUPPLIES_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SUPPLIES_QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("SUPPLIES_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("SUPPLIES_USED")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("CLASS_TEAM_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_POST_ID");

                    b.HasIndex("EDITOR_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CURRENT_CLASS_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CURRENT_CLASS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CURRENT_CLASS_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CURRENT_CLASS_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CURRENT_CLASS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LABOUR_SUPPLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_LabourSupplyID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CURRENT_CLASS_RECORD_ID");

                    b.HasIndex("Nav_LabourSupplyID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CURRENT_CLASS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("USER_SHIFT_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CURRENT_CLASS_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_CURRENT_CLASS_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_EDUCATIONAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_EDUCATIONAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ALLOW_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ALLOW_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("ALLOW_NO")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("AREA")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("COMPANY_DESCRIPTION")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("COMPANY_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SEND")
                        .HasColumnType("bit");

                    b.Property<int?>("METHOD")
                        .HasColumnType("int");

                    b.Property<decimal?>("MODE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SAFE_ALLOW_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("SAFE_ALLOW_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("SAFE_ALLOW_NO")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TYPE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("WORK_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("WORK_END_DATE")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_ALLOWFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_INFORMATION_REGISTRATION_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION_ALLOWFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_INFORMATION_REGISTRATION_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_SAFEFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_INFORMATION_REGISTRATION_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION_SAFEFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_UNIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_INFORMATION_REGISTRATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION_UNIT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_WORKFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_INFORMATION_REGISTRATION_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_ENTERPRISE_INFORMATION_REGISTRATION_WORKFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ACT_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMPLETED_CONDITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("COMPLETED_CONTENT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DISPATCH_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DISPATCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("FIRE_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FIRE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FIRE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_FIRE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_HOLIDAY")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_LEAVE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_RUN")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("JOB_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("LEAVE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SAFE_DEAL_FINISH_STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("SAFE_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("SAFE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("USER_DEAL_FINISH_STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("COMPANY_ID");

                    b.HasIndex("DISPATCH_USER_ID");

                    b.HasIndex("FIRE_DEPARTMENT_ID");

                    b.HasIndex("FIRE_USER_ID");

                    b.HasIndex("MONITOR_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("SAFE_USER_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_FO_FIRE_JOB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("IS_CONFIRM")
                        .HasColumnType("int");

                    b.Property<bool>("IS_CONFIRM_NEW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("JOB_STEP")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_FIRE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_JOB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_FIRE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_MONITOR_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_MONITOR_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TRAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TRAIN_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_TYPE_ID");

                    b.ToTable("T_FO_FIRE_JOB_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_USER_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_USER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ACT_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMPLETED_CONDITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("COMPLETED_CONTENT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DISPATCH_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DISPATCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DPARTMENT_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<int>("FIRE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_FIRE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_HOLIDAY")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_LEAVE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_RUN")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("JOB_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("LEAVE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SAFE_DEAL_FINISH_STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("SAFE_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("SAFE_USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SAFE_USER_PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("USER_DEAL_FINISH_STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("USER_PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("COMPANY_ID");

                    b.HasIndex("DISPATCH_USER_ID");

                    b.HasIndex("MONITOR_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RELATED_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("IS_CONFIRM")
                        .HasColumnType("int");

                    b.Property<bool>("IS_CONFIRM_NEW")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("JOB_STEP")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FIRE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_FIRE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FIRE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_FIRE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_MONITOR_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_MONITOR_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_SAFE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_SAFE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_TYPE_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_USER_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_USER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER_SIGN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FIRE_JOB_WB_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FIRE_JOB_WB_USER_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_JOB_WB_USER_SIGN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_FIRE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_HOLIDAYS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HOLIDAYS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("HOLIDAYS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_HOLIDAYS_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CONFIRM_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_ACTIVITY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("JOB_ACTIVITY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_ACTIVITY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_ACTIVITY_DETAIL_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CONFIRM_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_ACTIVITY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("JOB_ACTIVITY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_FLOW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_ACTIVITY_FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_ACTIVITY_FLOW_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_FLOW_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CONFIRM_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_ACTIVITY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOB_ACTIVITY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_ACTIVITY_MEASURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_ACTIVITY_MEASURE_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_MEASURE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_ACTIVITY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("JOB_DOCUMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELATED_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOB_ACTIVITY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_USER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EFFECTIVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXIST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_EFFECTIVE")
                        .HasColumnType("int");

                    b.Property<int>("IS_EXIST")
                        .HasColumnType("int");

                    b.Property<int>("IS_NEED")
                        .HasColumnType("int");

                    b.Property<bool>("IS_OUTSOURCE")
                        .HasColumnType("bit");

                    b.Property<int>("IS_REQUIRES")
                        .HasColumnType("int");

                    b.Property<int>("IS_SUITABLE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("JOB_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("JOB_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("JOB_NAME_OUTSOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NEED")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REQUIRES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SUITABLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TECH_DISCLOSURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("JOB_NAME_ID");

                    b.HasIndex("JOB_NAME_OUTSOURCE_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_ID");

                    b.ToTable("T_FO_JOB_ACTIVITY_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_EVENT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("JOB_EVENT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_EVENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_EVENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_EVENT_DETAIL_ID");

                    b.ToTable("T_FO_JOB_EVENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_EVENT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("JOB_EVENT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_EVENT_FLOW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_EVENT_FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_EVENT_FLOW_ID");

                    b.ToTable("T_FO_JOB_EVENT_FLOW_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_EVENT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.HasKey("ID");

                    b.HasIndex("JOB_EVENT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_EVENT_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_FO_JOB_EVENT_MEASURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_FO_JOB_EVENT_MEASURE_ID");

                    b.ToTable("T_FO_JOB_EVENT_MEASURE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOB_EVENT_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOB_EVENT_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_JOB_EVENT_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_DATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_JOB_EVENT_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LABOUR_SUPPLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LABOUR_SUPPLY_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LABOUR_SUPPLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("COMPANY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_AFTERUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("AFTER_USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("AFTER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AFTER_USER_ID");

                    b.HasIndex("LEADER_WELL_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_AFTERUSER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("ITEM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("LEADER_WELL_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("QUESTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int?>("USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEADER_WELL_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_AFTERUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("AFTER_USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("AFTER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AFTER_USER_ID");

                    b.HasIndex("LEADER_WELL_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_DETAIL_AFTERUSER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("LEADER_WELL_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_DETAIL_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LEADER_WELL_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_PREUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("PRE_USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEADER_WELL_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_USER_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_DETAIL_PREUSER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LEADER_WELL_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_PREUSER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("PRE_USER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEADER_WELL_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_USER_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_PREUSER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEADER_WELL_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEADER_WELL_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_LEADER_WELL_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime>("LANUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("LANUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LANUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_PRE_OPER_SCH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_OPER_SCH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_OPER_SCH_ID");

                    b.ToTable("T_FO_PRE_OPER_SCH_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_OPER_SCH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REAL_DEPARTMENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_OPER_SCH_ID");

                    b.HasIndex("REAL_DEPARTMENT_POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_PRE_OPER_SCH_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ABNORMAL_CAUSE")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int?>("ACTUAL_QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DANGER")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_SCHEDULING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DIFFICULTY")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GREETING")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<string>("JOB_CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int?>("LATE_QTY")
                        .HasColumnType("int");

                    b.Property<string>("LEARNING")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int?>("LEAVE_QTY")
                        .HasColumnType("int");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("MEETING_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OTHER_CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("OVERTIME")
                        .HasColumnType("int");

                    b.Property<string>("PRAISE")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("PRE_MEETING_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("PROTECT_MEASURE")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAFETY_OATH")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("SHARE")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int?>("SHOULD_QTY")
                        .HasColumnType("int");

                    b.Property<string>("SLOGAN")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TODAY_PLAN")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WELCOME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MONITOR_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TEAM_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_PRE_SHIFT_MEETING_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACTUAL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPROVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("QUOTA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RATE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_SHIFT_MEETING_RECORD_ID");

                    b.ToTable("T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_SHIFT_MEETING_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("PRE_SHIFT_MEETING_RECORD_DETAIL_ID");

                    b.ToTable("T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_SHIFT_MEETING_RECORD_ID");

                    b.ToTable("T_FO_PRE_SHIFT_MEETING_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRE_SHIFT_MEETING_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REAL_DEPARTMENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRE_SHIFT_MEETING_RECORD_ID");

                    b.HasIndex("REAL_DEPARTMENT_POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_PRE_SHIFT_MEETING_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_CATEGORY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_PROFESSIONAL_CATEGORY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("AGE")
                        .HasColumnType("int");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("EDUCATIONAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("GRADUATION_DATE")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("JOB_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("JOB_START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("MAJOR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROFESSIONAL_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SCHOOL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("SEX")
                        .HasColumnType("int");

                    b.Property<Guid?>("TECH_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("COMPANY_ID");

                    b.HasIndex("EDUCATIONAL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_CATEGORY_ID");

                    b.HasIndex("TECH_POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_DUTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SKILL_IMPROVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("UNIT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("WORK_ACHIEVEMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("WORK_POST")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<decimal?>("WORK_YEAR")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_DETAIL_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_OTHER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_OTHER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_POST_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_POST_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_TRAIN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROFESSIONAL_RESUME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_RESUME_ID");

                    b.ToTable("T_FO_PROFESSIONAL_RESUME_TRAIN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DRIVER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TECH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WEEK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DRIVER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_SCHEDULING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_SCHEDULING_TEMPLATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("SCHEDULING_TEMPLATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SCHEDULING_TEMPLATE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_SCHEDULING_TEMPLATE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACTIVITY_CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<DateTime>("ACTIVITY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DURATION")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTE_AKER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVERTIME")
                        .HasColumnType("int");

                    b.Property<int>("TA_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TITLE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTE_AKER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TEAM_ACTIVITY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEAM_ACTIVITY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ACTIVITY_ID");

                    b.ToTable("T_FO_TEAM_ACTIVITY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ATTEND_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SIGN_IN_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("TEAM_ACTIVITY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ACTIVITY_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TEAM_ACTIVITY_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_SLOGAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAFETY_OATH")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("SLOGAN")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_ID");

                    b.ToTable("T_FO_TEAM_SLOGAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DISCLOSURED_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DISCLOSURE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DISCLOSURE_PERSON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DisclosureContent")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_OUTSOURCE")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("JOB_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("JOB_NAME_OUTSOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DISCLOSURED_PERSON_ID");

                    b.HasIndex("DISCLOSURE_PERSON_ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("JOB_NAME_ID");

                    b.HasIndex("JOB_NAME_OUTSOURCE_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DISCLOSURE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("DisclosureContent")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FIRE_JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("FIRE_JOB_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_SAFE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DISCLOSURE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("DisclosureContent")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_STATUS")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_TECH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_TECH_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELATED_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TECH_DISCLOSURE_FROM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_USER_ID");

                    b.HasIndex("TECH_DISCLOSURE_FROM_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_FO_TECH_DISCLOSURE_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROFESSIONAL_CATEGORY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROFESSIONAL_CATEGORY_ID");

                    b.ToTable("T_FO_TECH_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_USER_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_FO_USER_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ANALYSIS_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FIRST")
                        .HasColumnType("bit");

                    b.Property<Guid>("LICENSE_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LICENSE_ANALYSIS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_ANALYSIS_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_ANALYSIS_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CRUCIAL_TASK_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_TASK_ANALYSIS_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_CRUCIAL_ANALYSIS_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_ANALYSIS_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FIRST")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_TASK_ANALYSIS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_CRUCIAL_ANALYSIS_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_CRUCIAL_TASK_ANALYSIS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CRUCIAL_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("CRUCIAL_TASK_ANALYSIS_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_CRUCIAL_TASK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CRUCIAL_TASK_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CRUCIAL_TASK_ANALYSIS_DETAIL_ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_CRUCIAL_TASK_DETAIL_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EDUCATION_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EMERGENCY_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_ENGINEERING_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EQUIPMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXPOSURE_LIMIT_VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("EXPOSURE_NUMBER")
                        .HasColumnType("int");

                    b.Property<decimal>("EXPOSURE_TIME")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("EducationTrainingMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EmergencyDisposalMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EngineeringMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HAZARD_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HAZARD_POSITION")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_SHOW")
                        .HasColumnType("int");

                    b.Property<string>("IndividualMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MONITOR_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ManagementMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("OCCUPATIONALRISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DEPARTMENT_LIABLE_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("MONITOR_MEASURES_ID");

                    b.HasIndex("OCCUPATIONALRISK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_LIABLE_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_EDUCATION_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDUCATION_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDUCATION_MEASURES_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_EDUCATION_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_EMERGENCY_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMERGENCY_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMERGENCY_MEASURES_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_EMERGENCY_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_ENGINEERING_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENGINEERING_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENGINEERING_MEASURES_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_ENGINEERING_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_INDIVIDUAL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDIVIDUAL_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("INDIVIDUAL_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_INDIVIDUAL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_MANAGEMENT_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MANAGEMENT_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("MANAGEMENT_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_HAZARD_MANAGEMENT_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_REQUIREMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_REQUIREMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTE_TAKER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIREMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("NOTE_TAKER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("REQUIREMENT_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RESULT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("EVALUATE_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EXPOSURE_LIMIT_VALUE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("EXPOSURE_NUMBER")
                        .HasColumnType("int");

                    b.Property<decimal>("EXPOSURE_TIME")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HAZARD_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HAZARD_POSITION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MONITOR_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OCCUPATIONALRISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DEPARTMENT_LIABLE_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("EVALUATE_RESULT_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("MONITOR_MEASURES_ID");

                    b.HasIndex("OCCUPATIONALRISK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_LIABLE_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_EDUCATION_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDUCATION_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDUCATION_MEASURES_ID");

                    b.HasIndex("EVALUATE_RESULT_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD_EDUCATION_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_EMERGENCY_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMERGENCY_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMERGENCY_MEASURES_ID");

                    b.HasIndex("EVALUATE_RESULT_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD_EMERGENCY_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_ENGINEERING_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENGINEERING_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENGINEERING_MEASURES_ID");

                    b.HasIndex("EVALUATE_RESULT_HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD_ENGINEERING_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_INDIVIDUAL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDIVIDUAL_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RESULT_HAZARD_ID");

                    b.HasIndex("INDIVIDUAL_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD_INDIVIDUAL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_MANAGEMENT_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MANAGEMENT_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RESULT_HAZARD_ID");

                    b.HasIndex("MANAGEMENT_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_HAZARD_MANAGEMENT_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_PLACE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DEPARTMENT_LIABLE_ID");

                    b.HasIndex("EVALUATE_RESULT_ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_LIABLE_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDUCATION_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDUCATION_MEASURES_ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMERGENCY_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMERGENCY_MEASURES_ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENGINEERING_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENGINEERING_MEASURES_ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EQUIPMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EQUIPMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EQUIPMENT_ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_EQUIPMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_FACILITIES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("FACILITIES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("FACILITIES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_FACILITIES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDIVIDUAL_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("INDIVIDUAL_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MANAGEMENT_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("MANAGEMENT_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_WORKDUTY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RESULT_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("WORKDUTY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RESULT_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("WORKDUTY_ID");

                    b.ToTable("T_HM_EVALUATE_RESULT_RISK_WORKDUTY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CODE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("EducationTrainingMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EmergencyDisposalMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EngineeringMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("IndividualMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("ManagementMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_PLACE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("SOURCE_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_BI_AREA_TREEID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("equipmentStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("postStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DEPARTMENT_LIABLE_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_LIABLE_ID");

                    b.HasIndex("SOURCE_DEPARTMENT_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("T_BI_AREA_TREEID");

                    b.ToTable("T_HM_EVALUATE_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EDUCATION_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDUCATION_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDUCATION_MEASURES_ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_EDUCATION_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EMERGENCY_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMERGENCY_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMERGENCY_MEASURES_ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_EMERGENCY_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_ENGINEERING_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENGINEERING_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENGINEERING_MEASURES_ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_ENGINEERING_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EQUIPMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EQUIPMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EQUIPMENT_ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_EQUIPMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_FACILITIES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("FACILITIES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("FACILITIES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_FACILITIES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDIVIDUAL_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("INDIVIDUAL_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_LEC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<double>("CODE")
                        .HasColumnType("float");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE")
                        .HasMaxLength(1)
                        .HasColumnType("nvarchar(1)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_LEC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MANAGEMENT_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("MANAGEMENT_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_WORKDUTY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_RISK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_HM_EVALUATE_RISK_WORKDUTY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FREQUENCY")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEVEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("RISK_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_HM_EVALUATION_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATION_DETAIL_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATION_DETAIL_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_PLAN_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("CHECK_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPUTY_GROUP_LEADER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("DEPUTY_GROUP_LEADER_OPINION")
                        .HasColumnType("int");

                    b.Property<string>("DOCUMENT_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATION_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("EVALUATION_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("GROUP_LEADER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("GROUP_LEADER_OPINION")
                        .HasColumnType("int");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELEASE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPUTY_GROUP_LEADER_ID");

                    b.HasIndex("GROUP_LEADER_ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELEASE_USER_ID");

                    b.ToTable("T_HM_EVALUATION_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_SCHEDULE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("Cycle")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_EVALUATION_SCHEDULE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_FACILITIES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CRUCIAL_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EDITION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("LICENSE_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORDINARY_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PUBLISH_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("SecretLevel")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("CRUCIAL_TASK_ANALYSIS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LICENSE_ANALYSIS_ID");

                    b.HasIndex("ORDINARY_TASK_ANALYSIS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_FILE_PUBLISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FILE_PUBLISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("FILE_PUBLISH_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_FILE_PUBLISH_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("AREAS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFYINGS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTE_TAKER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("Nav_TaskID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("NOTE_TAKER_ID");

                    b.HasIndex("Nav_TaskID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_HM_HAZARD_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EXPOSURE_LIMIT_VALUE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("EXPOSURE_NUMBER")
                        .HasColumnType("int");

                    b.Property<decimal>("EXPOSURE_TIME")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HAZARD_POSITION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("HAZARD_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("OCCUPATIONALRISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("EVALUATE_HAZARD_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("OCCUPATIONALRISK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_HM_HAZARD_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_HM_HAZARD_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_HAZARD_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEVEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_HM_HAZARD_TASK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_HAZARD_TASK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_HAZARD_TASK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_DETAIL_ID");

                    b.ToTable("T_HM_HAZARD_TASK_DETAIL_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_HAZARD_TASK_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_HAZARD_TASK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_HAZARD_TASK_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LIMIT_UNIT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RISK_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_INDIVIDUAL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTASK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("JOBTASK_IDENTIFY_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTASK_IDENTIFY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOBTASK_IDENTIFY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY_DETAIL_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTASK_IDENTIFY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("JOBTASK_IDENTIFY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY_DETAIL_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTASK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("JOBTASK_IDENTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FIRST")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTASK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOBTASK_IDENTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_JOBTASK_IDENTIFY_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_LICENSE_ANALYSIS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LICENSE_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("WORK_PERMIT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("LICENSE_ANALYSIS_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("WORK_PERMIT_TYPE_ID");

                    b.ToTable("T_HM_LICENSE_ANALYSIS_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LICENSE_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("LICENSE_ANALYSIS_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_LICENSE_ANALYSIS_DETAIL_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LICENSE_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LICENSE_ANALYSIS_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_LICENSE_ANALYSIS_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVALUATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_MANAGEMENT_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_MONITOR_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_MONITOR_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DOCUMENT_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("DOCUMENT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("DOCUMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("DOCUMENT_VERSION")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTICE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NOTICE_RELEASE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RELEASE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("RELEASE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RELEAS_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TASK_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("RELEASE_USER_ID");

                    b.HasIndex("RELEAS_DEPARTMENT_ID");

                    b.HasIndex("TASK_ANALYZE_ID");

                    b.ToTable("T_HM_NOTICE_RELEASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTICE_RELEASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("NOTICE_RELEASE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_NOTICE_RELEASE_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTICE_RELEASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("NOTICE_RELEASE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_NOTICE_RELEASE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OCCUPATIONAL_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OCCUPATIONAL_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_INSTRUCTION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_INSTRUCTION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_IMPORTANT")
                        .HasColumnType("int");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("TASK_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("WORK_PERMIT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("UNIT_ID");

                    b.HasIndex("WORK_PERMIT_TYPE_ID");

                    b.ToTable("T_HM_OPERATION_LINK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_LINK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_EVALUATE_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_HM_OPERATION_TASK_DISTINGUISH_DETAILID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_HM_OPERATION_TASK_DISTINGUISH_DETAILID");

                    b.ToTable("T_HM_OPERATION_LINK_EVALUATE_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_HM_OPERATION_LINK_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SPECIAL")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("STEP_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_STEP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_DEAL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_STEP_DEAL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_STEP_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_SAFE_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_STEP_SAFE_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_DEAL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("Nav_TaskAnalyzeDetailID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_TaskAnalyzeDetailID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_ANALYZE_DEAL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("Nav_TaskAnalyzeDetailID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_TaskAnalyzeDetailID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_ANALYZE_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_SAFE_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("Nav_TaskAnalyzeDetailID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_TaskAnalyzeDetailID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_ANALYZE_SAFE_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DEAL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DEAL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime>("COMPLETION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("COMPLETION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("JOBTASK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("JOBTASK_IDENTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ANALYZE_E_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ANALYZE_H_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ANALYZE_L_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ANALYZE_P_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ANALYZE_R_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_MAINTASK")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("WORK_PERMIT_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ANALYZE_E_ID");

                    b.HasIndex("ANALYZE_H_ID");

                    b.HasIndex("ANALYZE_L_ID");

                    b.HasIndex("ANALYZE_P_ID");

                    b.HasIndex("ANALYZE_R_ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("WORK_PERMIT_TYPE_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FIRST")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("WORKDUTY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("WORK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("WORKDUTY_ID");

                    b.HasIndex("WORK_TYPE_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISAGREE")
                        .HasColumnType("int");

                    b.Property<int>("ISCHARGE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_OPERATION_TASK_DISTINGUISH_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_SAFE_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_OPERATION_TASK_SAFE_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_ANALYSIS_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORDINARY_TASK_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORDINARY_TASK_ANALYSIS_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_ORDINARY_ANALYSIS_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_ANALYSIS_PERSON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_FIRST")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ORDINARY_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORDINARY_TASK_ANALYSIS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_ORDINARY_ANALYSIS_PERSON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_AUTO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_PUBLISH")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CREATER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_ORDINARY_TASK_ANALYSIS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("DealMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ORDINARY_TASK_ANALYSIS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SafeConfirmsStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SafeMeasuresStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORDINARY_TASK_ANALYSIS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_ORDINARY_TASK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORDINARY_TASK_ANALYSIS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("ORDINARY_TASK_ANALYSIS_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_ORDINARY_TASK_DETAIL_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OTHER_APPROVE_LOG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MAIN_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_OTHER_APPROVE_LOG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_REQUEST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_REQUEST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISKSOURCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_RISKSOURCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_HM_RISK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTE_TAKER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REQUEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("NOTE_TAKER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("REQUEST_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_RISK_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATE_RISK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MODIFY_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_LIABLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("RISK_PLACE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("RISK_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DEPARTMENT_LIABLE_ID");

                    b.HasIndex("EVALUATE_RISK_ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_LIABLE_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_HM_RISK_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_EQUIPMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EQUIPMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EQUIPMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_RECORD_DETAIL_ID");

                    b.ToTable("T_HM_RISK_RECORD_DETAIL_EQUIPMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_FACILITIES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FACILITIES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FACILITIES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_RECORD_DETAIL_ID");

                    b.ToTable("T_HM_RISK_RECORD_DETAIL_FACILITIES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_WORKDUTY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("WORKDUTY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_RECORD_DETAIL_ID");

                    b.HasIndex("WORKDUTY_ID");

                    b.ToTable("T_HM_RISK_RECORD_DETAIL_WORKDUTY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_HM_RISK_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_HM_RISK_RECORD_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_RISK_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("APPROVECODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CHANGE_IDENTIFY_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INITIATING_DEPARTMENT")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEVEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("LIABLE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INITIATING_DEPARTMENT");

                    b.HasIndex("LIABLE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("REQUEST_ID");

                    b.ToTable("T_HM_RISK_TASK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_RISK_TASK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_RISK_TASK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_RISK_TASK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_IDENTIFYING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFYING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFYING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_HM_RISK_TASK_IDENTIFYING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_RISK_TASK_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_RISK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("COMPLETION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TASK_ANALYZE_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_TASK_DISTINGUISH_ANALYZE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_TASK_ANALYZE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AUDIT_LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_LINK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OPERATION_TASK_AUDIT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_LINK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ANALYZE_ID");

                    b.ToTable("T_HM_TASK_ANALYZE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_FileID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("Nav_TaskAnalyzeDetailID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("Nav_FileID");

                    b.HasIndex("Nav_TaskAnalyzeDetailID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_TASK_ANALYZE_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ANALYZE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ANALYZE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_HM_TASK_ANALYZE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_WORK_PERMIT_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_WORK_PERMIT_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_WORK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_HM_WORK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_WB_SAFE_CHECK_TASK_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TASK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_SAFE_CHECK_TASK_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("DISTINGUISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DISTINGUISH_TYPE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEARS")
                        .HasColumnType("int");

                    b.Property<string>("demandTypeStr")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_DEMAND_DISTINGUISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FEEDBACK_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("FEEDBACK_TIMES")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("INVESTIGATE_TIMES")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("REPORT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("YEARS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_DEMAND_DISTINGUISH_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEMAND_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEMAND_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEMAND_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DEMAND_TIMES")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_OTHER")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.ToTable("T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_LAW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("ID");

                    b.HasIndex("DISTINGUISH_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_DEMAND_LAW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_OTHER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OTHER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("DISTINGUISH_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OTHER_ID");

                    b.ToTable("T_LR_DEMAND_OTHER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEMANDTYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DISTINGUISH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEMANDTYPE_ID");

                    b.HasIndex("DISTINGUISH_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_DEMAND_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OTHER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OTHER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_DEMAND_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_INTEGRATE_UPDATE_TIME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("INTEGRATE_UPDATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_INTEGRATE_UPDATE_TIME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXECUTE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<int>("LAW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PREPARED_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("UPDATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VERSION_NUM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_LAW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INSTITUTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SC_SYSTEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("UPDATE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("UPDATE_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SC_SYSTEM_ID");

                    b.HasIndex("UPDATE_DETAIL_ID");

                    b.ToTable("T_LR_LAW_INSTITUTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_INTEGRATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("LAW_INTEGRATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SYSTEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("LAW_INTEGRATE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SYSTEM_ID");

                    b.ToTable("T_LR_LAW_INTEGRATE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("YEAR")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_INTEGRATE_UPDATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INTEGRATE_UPDATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("UPDATE_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INTEGRATE_UPDATE_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_INTEGRATE_UPDATE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_SC_SYSTEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SC_SYSTEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SC_SYSTEM_ID");

                    b.ToTable("T_LR_LAW_SC_SYSTEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_UPDATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_UPDATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("ENTER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXECUTE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("UPDATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("VERSION_NUM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("VERSION_STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LAW_VERSION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("VERSION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("VERSION_ID");

                    b.ToTable("T_LR_LAW_VERSION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("DISTINGUISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LEGAL_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("LEGAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEARS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_LEGAL_LIST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEMANDTYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXECUTE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("FILE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEGAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OTHER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("UPDATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("VERSION_NUM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEMANDTYPE_ID");

                    b.HasIndex("LEGAL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OTHER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_LEGAL_LIST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEGAL_LIST_DETAIL")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LEGAL_LIST_DETAIL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LEGAL_LIST_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEGAL_LIST_DETAIL")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEGAL_LIST_DETAIL");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_LR_LEGAL_LIST_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LRCONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DEMAND_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DEMAND_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_LRCONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_LR_OTHER_DISTINGUISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_AGENCY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_AGENCY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_AGENCY_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AGENCY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AGENCY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_AGENCY_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AMOUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("OBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_APPROVE_REWARD_PUNISHMENT_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IDENTIFY_APPROVE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON_DESCRIBE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_APPROVE_REWARD_PUNISHMENT_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLLECTION_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OPINION_CONTENT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REFUSE_DESCRIPTION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("RESULT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("COLLECTION_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AH_CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AH_CHARGE_USER_ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID")
                        .HasDatabaseName("IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_ID1");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_COLLECTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLLECTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REFUSE_DESCRIPTION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("RESULT")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLLECTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_COLLECTION_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLLECTION_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLLECTION_USER_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("EMPLOYEE_OPINION_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMPLOYEE_OPINION_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ASSIGNEE_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ASSIGNEE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSIGNEE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DO_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DO_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPLEMENT_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SATISFACTION_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ASSIGNEE_ID");

                    b.HasIndex("DO_DEPARTMENT_ID");

                    b.HasIndex("DO_USER_ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("EMPLOYEE_OPINION_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMPLOYEE_OPINION_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMPLOYEE_REFUSE_ITEM_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMPLOYEE_REFUSE_ITEM_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ASSIGNEE_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ASSIGNEE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSIGNEE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMPLEMENT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPLEMENT_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("IMPLEMENT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SATISFACTION_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ASSIGNEE_ID");

                    b.HasIndex("IMPLEMENT_DEPARTMENT_ID");

                    b.HasIndex("IMPLEMENT_USER_ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EMPLOYEE_REFUSE_ITEM_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EMPLOYEE_REFUSE_ITEM_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EMPLOYEE_REFUSE_ITEM_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("BACK")
                        .HasColumnType("bit");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EVENT_COMPARE")
                        .HasColumnType("int");

                    b.Property<int>("EVENT_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LAST_EVENT_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EVENT_GET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPLY_USER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EVENT_GET_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EVENT_GET_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REPLY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EVENT_GET_DETAIL_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("AGREE")
                        .HasColumnType("bit");

                    b.Property<Guid?>("AH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DO_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DO_DESC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DO_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("DO_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("HAPPEN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AH_USER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DO_DEPARTMENT_ID");

                    b.HasIndex("DO_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EVENT_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.ToTable("T_OG_EVENT_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT_SUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("RATIO")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("SUM_YEAR")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EVENT_REPORT_SUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ASSIGNEE_DESCRIPTION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ASSIGNEE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSIGNEE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXTERNAL_COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SATISFACTION_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("SURVEY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SURVEY_DESCRIPTION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("SURVEY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ASSIGNEE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EXTERNAL_COMPANY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_DEPARTMENT_ID");

                    b.HasIndex("SURVEY_USER_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EXTERNAL_COMPLAIN_ADVISE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_COMPLAIN_ADVISE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_COMPLAIN_ADVISE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_COMPLAIN_ADVISE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_COMPLAIN_ADVISE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMMUNICATE_DES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("COMMUNICATE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("COMMUNICATE_PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DO_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DO_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EXTERNAL_COMMUNICATE_PERSON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("EXTERNAL_COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPLEMENT_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DO_DEPARTMENT_ID");

                    b.HasIndex("DO_USER_ID");

                    b.HasIndex("EXTERNAL_COMPANY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_EXTERNAL_CONTACT_COMMUNICATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_CONTACT_COMMUNICATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_CONTACT_COMMUNICATE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_CONTACT_COMMUNICATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_CONTACT_COMMUNICATE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CONTACT_MATTER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PERSON")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_EXTERNAL_CONTACT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DO_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DO_DESC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DO_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("FORM_USER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FROM_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TO_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TO_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("TO_USER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DO_DEPARTMENT_ID");

                    b.HasIndex("DO_USER_ID");

                    b.HasIndex("FORM_DEPARTMENT_ID");

                    b.HasIndex("FROM_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TO_DEPARTMENT_ID");

                    b.HasIndex("TO_USER_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_INNER_CONTACT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT_DO_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTACT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTACT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_INNER_CONTACT_DO_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT_ITEM_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTACT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTACT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_INNER_CONTACT_ITEM_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_OGCONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("EMPLOYEE_OPINION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("EVENT_GET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("EVENT_GET_TIME_1")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("REPORT_SUM_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("SAFE_PDT_PERSONAL_SIGNED_TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_OGCONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_PERSONNEL_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_PERSONNEL_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPOINT_AGREEUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("APPOINT_EFFECT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("APPOINT_REASON")
                        .HasColumnType("int");

                    b.Property<Guid?>("APPOINT_TYPE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PUBLISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VERSION")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPOINT_AGREEUSER_ID");

                    b.HasIndex("APPOINT_TYPE");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_POLICY_DOCUMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPOINT_AGREEUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("APPOINT_EFFECT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("APPOINT_REASON")
                        .HasColumnType("int");

                    b.Property<Guid?>("APPOINT_TYPE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POLICY_DOCUMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PUBLISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("VERSION")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPOINT_AGREEUSER_ID");

                    b.HasIndex("APPOINT_TYPE");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POLICY_DOCUMENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_POLICY_DOCUMENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POLICY_DOCUMENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_OG_POLICY_DOCUMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POLICY_DOCUMENT_DETAIL_ID");

                    b.HasIndex("T_OG_POLICY_DOCUMENTID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POLICY_DOCUMENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_OG_POLICY_DOCUMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POLICY_DOCUMENT_DETAIL_ID");

                    b.HasIndex("T_OG_POLICY_DOCUMENTID");

                    b.ToTable("T_OG_POLICY_DOCUMENT_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_POLICY_DOCUMENT_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTACT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTACT_INFO")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SAFE_USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("SAFE_USER_PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_RELATED");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AMOUNT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.ToTable("T_OG_RELATED_AGREEMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AGREEMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AGREEMENT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_AGREEMENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.ToTable("T_OG_RELATED_ESTIMATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("ESTIMATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RESULT_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ESTIMATE_ID");

                    b.HasIndex("ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_ESTIMATE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_ESTIMATE_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_FIRE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.ToTable("T_OG_RELATED_FIRE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LEVEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.ToTable("T_OG_RELATED_QUALIFICATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BUSINESS_SCOPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("QUALIFICATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RESULT")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("VALID_PERIOD")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("QUALIFICATION_ID");

                    b.ToTable("T_OG_RELATED_QUALIFICATION_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_QUALIFICATION_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_QUALIFICATION_DETAIL_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE", "NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.ToTable("T_OG_RELATED_QUALIFICATION_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_SAFE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.ToTable("T_OG_RELATED_SAFE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CERTIFICATE_NUMBER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE_BIRTH")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("GENDER")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RELATED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("VALIDITY_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RELATED_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_OG_RELATED_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_HEALTH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_RELATED_USER_HEALTH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_INSURANCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_RELATED_USER_INSURANCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_SIGN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_RELATED_USER_SIGN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_RELATED_USER_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ASSESS_PLAN_INPUT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ASSESS_PLAN_INPUT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_SAFE_ASSESS_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_PLAN_INPUT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANNUAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEP_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_SAFE_ASSESS_PLAN_INPUT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANNUAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<string>("CYCLE_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_SAFE_ASSESS_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REWARD_PUNISHMENT_MEASURES")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("SAFE_ASSESS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("SAFE_ASSESS_RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_SAFE_ASSESS_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ASSESS_ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CORRECT_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESULT_INSTRUCTIONS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ASSESS_ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_DETAIL_ID");

                    b.ToTable("T_OG_SAFE_ASSESS_RECORD_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANNUAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_SAFE_PDT_ASSESS_PLAN_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANNUAL")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_CONTENT")
                        .HasMaxLength(5000)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("Nav_CreateUserID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("STANDARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TRIGGER_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("Nav_CreateUserID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("STANDARD_ID");

                    b.ToTable("T_OG_SAFE_PDT_SIGNED");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHARGE_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CHARGE_SIGNED_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_PDT_SIGNED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SIGNED_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("SAFE_PDT_SIGNED_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_SAFE_PDT_SIGNED_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_ACTION_PLAN_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_STANDARDIZATION_ACTION_PLAN_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_ACTION_PLAN_REL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IMPLEMENTATION")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLAN_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("REVIEW_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_STANDARDIZATION_ACTION_PLAN_REL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_PERSON_REL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REVIEW_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_STANDARDIZATION_PERSON_REL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_ITEMS_REL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROBLEM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REVIEW_ID");

                    b.ToTable("T_OG_STANDARDIZATION_REVIEW_ITEMS_REL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_RESULT_REL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESULT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.HasIndex("REVIEW_ID");

                    b.ToTable("T_OG_STANDARDIZATION_REVIEW_RESULT_REL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HOST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("REVIEW_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HOST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OG_STANDARDIZATION_SYSTEM_REVIEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_EXAM_NOTICE_OCC_HAZARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REGISTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REGISTER_ID");

                    b.ToTable("T_OH_EXAM_NOTICE_OCC_HAZARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_EXAM_RESULT_OCC_HAZARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_OH_HEALTH_EXAM_RESULTID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.HasIndex("T_OH_HEALTH_EXAM_RESULTID");

                    b.ToTable("T_OH_EXAM_RESULT_OCC_HAZARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEVICE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DEVICE_SPEC")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONITOR_METHOD")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<DateTime?>("MONITOR_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONITOR_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAMPLE_PEOPLE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_GET")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_JOB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("JOB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("JOB_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("MONITOR_RESULT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("MONITOR_RESULT_05")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("MONITOR_RESULT_10")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("MONITOR_RESULT_AROUND")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("MONITOR_RESULT_HIGH")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("MONITOR_RESULT_LOW")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("OVER_LIMIT")
                        .HasColumnType("int");

                    b.Property<int?>("PROTECT_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("RULE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAMPLE_SOURCE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<DateTime?>("SAMPLE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("TESTER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TEST_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("TEST_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID_GET")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RULE_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_JOB_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_JOB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGINTIME_MONITOR")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENTNAME_JOB")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ENDTIME_MONITOR")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_JOB_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REPORT_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_JOB_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONITOR_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("OK_COUNT")
                        .HasColumnType("int");

                    b.Property<decimal>("OK_PERCENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RULE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TREND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("User_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RULE_ID");

                    b.HasIndex("SUM_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_RESULT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT_SUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("RATIO")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_RESULT_SUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RULE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DAY")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID_WARN")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID_WORKSHOP")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LAST_NOTIFY")
                        .HasColumnType("datetime2");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONITOR_INTERVAL")
                        .HasColumnType("int");

                    b.Property<int>("MONTH")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<decimal>("THRESHOLD_DUST")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_NOISE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_RADIATION_05")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_RADIATION_10")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_RADIATION_AROUND")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_WARTER_HIGH")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("THRESHOLD_WARTER_LOW")
                        .HasColumnType("decimal(18,2)");

                    b.Property<DateTime>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("WARN_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_ID_WARN");

                    b.HasIndex("DEPARTMENT_ID_WORKSHOP");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_POST_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("WARN_POST_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_RULE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MONITOR_TYPE")
                        .HasMaxLength(200)
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SMALL_TYPE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HAZARD_MONITOR_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_CYCLE_POST_MID", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SC_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("SC_POST_ID");

                    b.ToTable("T_OH_HEALTH_EAXM_CYCLE_POST_MID");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_PLAN_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCONTENTMASTER")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HEALTH_EAXM_PLAN_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BATCH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_BATCH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BATCH_ID")
                        .HasMaxLength(200)
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BATCH_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_BATCH_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HEALTH_EXAM_CONTENT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("HEALTH_EXAM_CYCLE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_CYCLE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXAM_CYCLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EXAM_CYCLE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENTINFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENTINFO_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXAM_BATCH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISSYSTEM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("NOTICEIMPORTSTATE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OTHER_STUFF")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("PARENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("EXAM_BATCH_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_NOTICE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("NOTICE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_NOTICE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_REGISTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CYCLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID_WORKSHOP")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXAM_BATCH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LASTDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("NEXTDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID_DEP")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_REGISTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("THISDATE")
                        .HasColumnType("datetime2");

                    b.Property<int?>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CYCLE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_ID_WORKSHOP");

                    b.HasIndex("EXAM_BATCH_ID");

                    b.HasIndex("NOTICE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_NOTICE_REGISTER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_OCC_DISEASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DUE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATAUSORDER")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID_WORKSHOP")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXAM_CYCLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HEALTH_EXAM_CONTENT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID_DEP")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("WORKYEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_ID_WORKSHOP");

                    b.HasIndex("EXAM_CYCLE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("PLAN_ID_DEP");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_PLAN_REGISTER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HAZARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REGISTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HAZARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REGISTER_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTICE_REGISTER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RESULT_ENUM")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("SUGGESTION")
                        .HasMaxLength(800)
                        .HasColumnType("nvarchar(800)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTICE_REGISTER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_RESULT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_IMPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTICE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_RESULT_IMPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(600)
                        .HasColumnType("nvarchar(600)");

                    b.Property<string>("DIAGNOSE_AGENCY")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("DIAGNOSE_METHOD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MEDICAL_AID")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OCC_DISEASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("OCC_DISEASE_SEVERITY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OCC_HISTORY")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OCC_DISEASE_ID");

                    b.HasIndex("OCC_DISEASE_SEVERITY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESULT_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DISEASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DISEASE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_RUNCONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CONFIGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISONLY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime>("LASTRUNDATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_OH_RUNCONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_COLORSET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int?>("COUNTMAX_HIGH")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMAX_LOW")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMIN_HIGH")
                        .HasColumnType("int");

                    b.Property<int?>("COUNTMIN_LOW")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("IS_AREAEVEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_JOBLEVEL")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_COLORSET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIBE")
                        .HasMaxLength(350)
                        .HasColumnType("nvarchar(350)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HEIGHT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<decimal>("OPACITY_TL")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RGBCOLOR_TL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("WIDTH")
                        .HasColumnType("int");

                    b.Property<int>("ZDEX")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_INFO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIBE")
                        .HasMaxLength(350)
                        .HasColumnType("nvarchar(350)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISDIY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<decimal>("OPACITY")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RGBCOLOR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ZNDEX")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INFO_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_INFO_COLOR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COLOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("COLOR_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_INFO_COLOR_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_COLOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("X")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("Y")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("INFO_COLOR_ID");

                    b.HasIndex("INFO_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_INFO_COLOR_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INFO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("INFO_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PC_INFO_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISHEAD")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("ROLE_ID");

                    b.ToTable("T_PF_APPROVAL_ROLE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PF.T_PF_QUESTION_FEEDBACK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("T_PF_QUESTION_FEEDBACK")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("T_PF_QUESTION_FEEDBACK");

                    b.ToTable("T_PF_QUESTION_FEEDBACK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_BI_AREA_TREE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_DEPARTMENT_MONTH_RUN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("MONTH")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONTHStr")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NORMAL_FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_DEPARTMENT_MONTH_RUN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_FORM_CHECK_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("STATUS_FIELD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("STATUS_VALUE")
                        .HasColumnType("int");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TITLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_FORM_CHECK_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_FORM_RUN_ANALYSIS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<string>("FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FORM_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MOUDLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NORMAL_FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVER_FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<int>("OVER_UNFINISH_QTY")
                        .HasColumnType("int");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TOTAL_QTY")
                        .HasColumnType("int");

                    b.Property<int>("UNFINISH_QTY")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_FORM_RUN_ANALYSIS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_JOB_PROFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DepId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DepName")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("JobId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("JobName")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RiskCount")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_JOB_PROFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_MOULD_RUN_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<string>("FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MOUDLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NORMAL_FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVER_FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<int>("TOTAL_QTY")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<int>("UNFINISH_QTY")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_MOULD_RUN_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_NOTIFICATION_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MOUDLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NOTICE_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_TITLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SHOP_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SOURCE_DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SOURCE_FORMCODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_NOTIFICATION_TASK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_NOTIFICATION_TASK_NEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CLASS_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FORM_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("ISCANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MOUDLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NOTICE_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("NOTICE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("SENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("SHOP_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SOURCE_DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SOURCE_FORMCODE")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("TABLE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("TASK_DT")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("TASK_ENDDT")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("TASK_STARTDT")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("USER_NAME")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SOURCE_DATA_ID");

                    b.ToTable("T_BI_NOTIFICATION_TASK_NEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_SYSTEM_RUN_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<string>("FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NORMAL_FINISH_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("OVER_FINISH_QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PARENT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TOTAL_QTY")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<int>("UNFINISH_QTY")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_BI_SYSTEM_RUN_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MACHINE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MECHANISM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("QUALIFICATION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DETECTION_INSPECTION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DETECTION_INSPECTION_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_DM_DEVICE_APPLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DAY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_APPLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<DateTime?>("RETURN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("USE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_APPLY_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_POST_ID");

                    b.ToTable("T_DM_DEVICE_APPLY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_BASE_RECEIPT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_BASE_RECEIPT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_PURCHASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_POST_ID");

                    b.ToTable("T_DM_DEVICE_ISSUE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEVICE_ISSUE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POSITION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<int>("RETURN_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("RETURN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("SPEC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("USE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("DEVICE_ISSUE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USE_USER_POST_ID");

                    b.ToTable("T_DM_DEVICE_ISSUE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_MAINTENANCE_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEVICE_MAINTENANCE_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEVICE_MAINTENANCE_CHECK_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_DM_DEVICE_MAINTENANCE_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANNUAL")
                        .HasColumnType("int");

                    b.Property<Guid>("CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CONFORM_PROPERTY")
                        .HasColumnType("int");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECTIFICATION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("STANDARDIZED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("STANDARDIZED_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMMENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CORRECTIVE_PREVENTIVE_PROCESS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_PROCESS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CONSIDER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONSIDER_ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_EVALUATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COMMENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CORRECTIVE_PREVENTIVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATE_RESULT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOT_CARRY_OUT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SITUATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_EVALUATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CONSIDER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONSIDER_ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CORRECTIVE_PREVENTIVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_PROCESS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CORRECTIVE_PREVENTIVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_PROCESS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CORRECT_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOT_CARRY_OUT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("RECTIFICATION_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("SITUATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("STANDARDIZED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_PROCESS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("STANDARDIZED_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_EVALUATION_METHOD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_EVALUATION_METHOD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_MEASURE_CONSIDER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_MEASURE_CONSIDER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_MONITOR_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_MONITOR_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATION_TECHNOLOGY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFETY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("STANDARDIZED_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_EVALUATION_PLAN_ID");

                    b.HasIndex("STANDARDIZED_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_METHOD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("METHOD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_PLAN_DETAIL_ID");

                    b.HasIndex("METHOD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_PLAN_METHOD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EVALUATION_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_PLAN_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_PLAN_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATION_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_PLAN_DETAIL_ID");

                    b.HasIndex("EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATION_ITEM")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATION_RESULT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GROUP_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_AUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NON_CONFORMANCE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<decimal?>("NON_STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRIMARY_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("RESULT_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("SAFETY_EVALUATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECOND_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("THREE_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRIMARY_ELEMENTS_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("SAFETY_EVALUATION_RECORD_ID");

                    b.HasIndex("SECOND_ELEMENTS_ID");

                    b.HasIndex("THREE_ELEMENTS_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_METHOD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("METHOD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFETY_EVALUATION_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("METHOD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_EVALUATION_RECORD_DETAIL_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_RECORD_METHOD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("GROUP_NO")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("SAFETY_EVALUATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_EVALUATION_RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_EVALUATION_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONITOR_PROGRAM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MONITOR_RANGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESOURCES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ASSESSMENT_CYCLE")
                        .HasColumnType("int");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFETY_MONITOR_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("SAFETY_MONITOR_PLAN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ASSESSMENT_CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SAFETY_MONITOR_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_MONITOR_PLAN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MONITOR_LIVE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT_DISCUSS")
                        .HasColumnType("int");

                    b.Property<Guid>("SAFETY_MONITOR_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("SAFETY_MONITOR_RECORD_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFETY_MONITOR_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_MONITOR_RECORD_DETAIL_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFETY_MONITOR_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_MONITOR_RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PE_SAFETY_MONITOR_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_STANDARDIZED_SCORE_AUTO_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATION_ITEM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_AUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRODUCTION_UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Primary")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RESULT_SCORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("STANDARDIZED_SCORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Second")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("Three")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_STANDARDIZED_SCORE_AUTO_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATION_ITEM")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GROUP_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_AUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("NON_STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("STANDARDIZED_SCORE_IMPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("STANDARDIZED_SCORE_IMPORT_ID");

                    b.ToTable("T_PE_STANDARDIZED_SCORE_IMPORT_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_ASSESSMENT_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PE_ASSESSMENT_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SCORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_PE_STANDARDIZED_SCORE_IMPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATION_ITEM")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GROUP_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_AUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("NON_STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRIMARY_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECOND_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("STANDARDIZED_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("THREE_ELEMENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRIMARY_ELEMENTS_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("SECOND_ELEMENTS_ID");

                    b.HasIndex("THREE_ELEMENTS_ID");

                    b.ToTable("T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_AUDIT_REQUIREMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_AUDIT_REQUIREMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_ACCEPTANCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHANGE_IDENTIFY_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_IDENTIFY_EVALUATION_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_CHANGE_ACCEPTANCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_CHANGE_IDENTIFY_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ACCEPTANCE_OPINION")
                        .HasColumnType("int");

                    b.Property<Guid>("CHANGE_IDENTIFY_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTHROUGH_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_IDENTIFY_EVALUATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_CHANGE_IDENTIFY_EVALUATION_TASK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_IDENTIFY_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_IDENTIFY_EVALUATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHANGE_IDENTIFY_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTHROUGH_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PERFORM_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("PERFORM_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_IDENTIFY_EVALUATION_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_CHANGE_TASK_IMPLEMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_TASK_IMPLEMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_TASK_IMPLEMENT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CHANGE_TASK_IMPLEMENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHANGE_TASK_IMPLEMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHANGE_TASK_IMPLEMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_CHANGE_TASK_IMPLEMENT_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CHANGE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CONTROLROOM_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_AIR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CONTROLROOM_OPERATION_RECORD_AIR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COUNT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HOUR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CONTROLROOM_OPERATION_RECORD_DEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACERAGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CONTROLROOM_OPERATION_RECORD_DRUG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_SERI", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BUBBLE_ROUGH")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("BUBBLE_SCAVENG1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("BUBBLE_SCAVENG2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INHI_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("INHI_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAPO_SCAVENG")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAPO_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAPO_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SODA_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SODA_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_CONTROLROOM_OPERATION_RECORD_SERI");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DEPARTMENT_STEP_LINK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DEPARTMENT_STEP_LINK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_PICTURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DESIGN_DOCUMENT_REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DESIGN_DOCUMENT_REVIEW_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DESIGN_DOCUMENT_PICTURE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("DESIGN_LEVEL")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POTENTIAL_RISK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DESIGN_DOCUMENT_REVIEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DESIGN_DOCUMENT_REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DESIGN_DOCUMENT_REVIEW_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DESIGN_DOCUMENT_REVIEW_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DESIGN_DOCUMENT_REVIEW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIREMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DESIGN_DOCUMENT_REVIEW_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIREMENT_ID");

                    b.ToTable("T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTBOUND_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTBOUND_RECORD_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_CARRY_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CARRY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CARRY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLACE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("SPECIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CARRY_RECORD_ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLACE_ID");

                    b.HasIndex("SPECIFY_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_CARRY_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CARRY_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CARRY_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CARRY_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CARRY_RECORD_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_CARRY_RECORD_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CARRY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CARRY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_CARRY_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_OUTBOUND_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CARRY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTBOUND_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLACE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("SPECIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTBOUND_RECORD_ID");

                    b.HasIndex("PLACE_ID");

                    b.HasIndex("SPECIFY_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_OUTBOUND_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTBOUND_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTBOUND_RECORD_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTBOUND_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTBOUND_RECORD_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_PLACE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DRUG_PLACE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DRUG_SET_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DRUG_SET_SPECIFY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DRUG_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE_SAFE_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_PR_DRUG_TYPE_SAFE_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CARRY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("SPECIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CARRY_RECORD_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SPECIFY_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("USE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USE_RECORD_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("SPECIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("USE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SPECIFY_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USE_RECORD_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONFIRM")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USE_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USE_RECORD_DETAIL_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_PRINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DRUG_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QTY")
                        .HasColumnType("int");

                    b.Property<Guid?>("SPECIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DRUG_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SPECIFY_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USE_RECORD_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD_PRINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USE_RECORD_ID");

                    b.ToTable("T_PR_DRUG_USE_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_DEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COUNT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HOUR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD_DEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_DRUG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACERAGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD_DRUG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_INVE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACCEPT_QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HEIGHT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("INPUT_QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SEND_QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("USE_QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD_INVE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_MACH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HEAT_QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD_MACH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_TUNG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COARSE_FINE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ENRICHMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECOVERY_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TAILING")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNDRESS_ORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_DUTY_OPERATION_RECORD_TUNG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REQUIREMENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAMPLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_EXPERIMENTAL_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GRADE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METAL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("WEIGHT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLICATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_RELIABLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_RECORD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLICATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_EXTERNAL_ACCEPTANCE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_ACCEPTANCE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_ACCEPTANCE_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid>("EXTERNAL_ACCEPTANCE_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EXTERNAL_ACCEPTANCE_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ASSISTANCE_APPLICATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EXTERNAL_COMPANY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EXTERNAL_COMPANY_ID");

                    b.HasIndex("MONITOR_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_EXTERNAL_ASSISTANCE_APPLICATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LABORATORY_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_DET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COARSE_FINE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ENRICHMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECOVERY_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TAILING")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNDRESS_ORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LABORATORY_OPERATION_RECORD_DET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_ORE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FINENESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PH")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("STRINGNESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LABORATORY_OPERATION_RECORD_ORE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_PRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COARSE_FINE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ENRICHMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECOVERY_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TAILING")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNDRESS_ORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LABORATORY_OPERATION_RECORD_PRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_SAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BATCH_NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("H2O")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WO3")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LABORATORY_OPERATION_RECORD_SAM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("IS_DEAL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("IS_HELP")
                        .HasColumnType("int");

                    b.Property<int?>("IS_RELIABLE")
                        .HasColumnType("int");

                    b.Property<string>("MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONITOR_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_LANDSLIDE_ROLLSTONE_MONITOR");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LANDSLIDE_ROLLSTONE_MONITOR_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LANDSLIDE_ROLLSTONE_MONITOR_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_MAP_PROCESS_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MAP_PROCESS_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MAP_PROCESS_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_MAP_PROCESS_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PERFORM_TASK_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_PERFORM_TASK_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_PR_POST_FORM_LINK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_CODE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PF_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PF_FORM_ID");

                    b.HasIndex("POST_POST_ID");

                    b.ToTable("T_PR_POST_FORM_LINK_CODE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_POST_ID");

                    b.ToTable("T_PR_POST_FORM_LINK_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_PR_POST_FORM_LINK_XK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK_PARAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("POST_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_POST_ID");

                    b.ToTable("T_PR_POST_FORM_LINK_XK_PARAM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CLASS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_PR_PROCESS_FORM_XK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("POST_PROCESS_FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECORD_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<decimal?>("VALUE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_PROCESS_FORM_ID");

                    b.ToTable("T_PR_PROCESS_FORM_XK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("OPERATION_STEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_STEP_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_PRODUCTION_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRODUCTION_OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_OPERATION_RECORD_ID");

                    b.ToTable("T_PR_PRODUCTION_OPERATION_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PRODUCTION_OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_OPERATION_RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_PRODUCTION_OPERATION_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_SANDPUMP_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_SANDPUMP_OPERATION_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_SURVEY_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACTUAL_VALUE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("SURVEY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("VALUE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_RECORD_ID");

                    b.ToTable("T_PR_SURVEY_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_RECORD_ID");

                    b.ToTable("T_PR_SURVEY_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PARAMETER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("VALUE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_SURVEY_RECORD_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("SURVEY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PR_SURVEY_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_THOUSANDPUMP_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_TUNGPRE_OPERATION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_DRUG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ACERAGE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("QTY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_TUNGPRE_OPERATION_RECORD_DRUG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_MEAS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEMP")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_TUNGPRE_OPERATION_RECORD_MEAS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_SERI", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AIRPRESS_ROUGH")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AIRPRESS_SCAVENG1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AIRPRESS_SCAVENG2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("BUBBLE_ROUGH")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("BUBBLE_SCAVENG1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("BUBBLE_SCAVENG2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DETAIL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INHI_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("INHI_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PUMP_ROUGH")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PUMP_SCAVENG1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PUMP_SCAVENG2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAPO_SCAVENG")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAPO_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SAPO_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SODA_START")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("SODA_TRAFFIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("STRONG")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TIME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_TUNGPRE_OPERATION_RECORD_SERI");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_TARG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("COARSE_FINE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("ENRICHMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NO")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("OPERATION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECOVERY_RATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TAILING")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("UNDRESS_ORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("OPERATION_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PR_TUNGPRE_OPERATION_RECORD_TARG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_ANNUAL_MONOTOR_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal?>("FIRST_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("FOURTH_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONITOR_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("SECOND_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("THIRD_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("YEAR_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MONITOR_SUMMARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONOTOR_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("QUARTER_TYPE")
                        .HasColumnType("int");

                    b.Property<decimal?>("RESULT_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("MONOTOR_SUMMARY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSESSMENT_CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid>("ASSESSMENT_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHARGE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ASSESSMENT_PLAN_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_AUDIT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_AUDIT_DETAIL_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ASSESSMENT_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ASSESSMENT_PLAN_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSESSMENT_CYCLE")
                        .HasColumnType("int");

                    b.Property<string>("CHARGE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_AUDIT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_AUDIT_DETAIL_ID");

                    b.ToTable("T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_COLLECT_REQUIREMENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_COLLECT_REQUIREMENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_FILE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_FILE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_FORMULATE_REQUIREMENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_FORMULATE_REQUIREMENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_GOALS_AND_TARGET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_GOALS_AND_TARGET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DEMAND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_PLAN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_TARGET")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROFILE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("SET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("VERSION")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("INDICATOR_FORMULATION_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("INDICATOR_FORMULATION_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("INDICATOR_FORMULATION_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RESOURCES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESOURCES_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_REQUIREMENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORMULATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INDICATOR_FORMULATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("FORMULATE_ID");

                    b.HasIndex("INDICATOR_FORMULATION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INDICATOR_FORMULATION_REQUIREMENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INTENTIONAL_GUIDELINES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_INTENTIONAL_GUIDELINES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ASSESSMENT_CYCLE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("SET_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_MONITOR_ASSESSMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONITOR_ASSESSMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MONITOR_ASSESSMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_MONITOR_ASSESSMENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("METHOD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONITOR_ASSESSMENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("RESULT_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("MONITOR_ASSESSMENT_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONITOR_ASSESSMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MONITOR_ASSESSMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_MONITOR_ASSESSMENT_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_PLAN_RESOURCES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_PT_PLAN_RESOURCES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("GUIDELINES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_DEAL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_RUN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("GUIDELINES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_SAFETY_POLICY_SURVEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_COLLECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("COLLECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFETY_POLICY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COLLECT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_POLICY_ID");

                    b.ToTable("T_PT_SAFETY_POLICY_SURVEY_COLLECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("GUIDELINES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_AGREE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OTHER_SUGGESTIONS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("SAFETY_POLICY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("GUIDELINES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_POLICY_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_SAFETY_POLICY_SURVEY_FEEDBACK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_RANGE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFETY_POLICY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFETY_POLICY_ID");

                    b.ToTable("T_PT_SAFETY_POLICY_SURVEY_RANGE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_TIME_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEVICE_BASE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEVICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONTH")
                        .HasColumnType("int");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<DateTime?>("POLICY_DATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("SET_TYPE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TARGET_DATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEVICE_BASE_ID");

                    b.HasIndex("DEVICE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_PT_TIME_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SC_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPOST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEPT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPOST_ID");

                    b.HasIndex("DEPT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_DEPARTMENT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("FILE_TYPE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORM")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MODULE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("VALID_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("VALUE_FIELD")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_DOCUMENT_LIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("COMPILE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DOCUMENT_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("PUBLISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("VERSION")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DOCUMENT_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_DOCUMENT_LIBRARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOCUMENT_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DOCUMENT_LIBRARY_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_DOCUMENT_LIBRARY_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("COMPILE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_CONTENT")
                        .HasMaxLength(5000)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("FILE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("FILE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<string>("FORMULATE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IMPORT_TYPE")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("LAW_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NOTE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROFILE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("PUBLISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<string>("UNIT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("UPDATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("VERSION")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_STANDARD_CREATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("STANDARD_CREATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("STANDARD_CREATE_ID");

                    b.ToTable("T_SC_STANDARD_CREATE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SENDMSG")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_CONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CONTENTNAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CONTENT_NO")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TITLE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("CONTENTNAME_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_DEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENTDETAIL")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("CONTENT_DEAL_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("PERSCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_CONTENT_DEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_CONTENT_NAME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGIN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int?>("CREACTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CheckLevel_ENUMS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISBEGIN")
                        .HasColumnType("bit");

                    b.Property<bool>("ISCANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SENDED")
                        .HasColumnType("bit");

                    b.Property<int?>("LEVELVALUE")
                        .HasColumnType("int");

                    b.Property<int>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("Nav_MinutesID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("PERSCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECORD")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("THEME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID_HOST")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID_ORIGINATOR")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_RECORDER")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("CheckLevel_ENUMS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("Nav_MinutesID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID_HOST");

                    b.HasIndex("USER_ID_ORIGINATOR");

                    b.HasIndex("USER_ID_RECORDER");

                    b.ToTable("T_SC_MT_MEETING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_BEGIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_IGNORE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISBEGIN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RUN_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("SOURCETYPE")
                        .HasColumnType("int");

                    b.Property<string>("TABLENAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_BEGIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENTNAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENTNAME_ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_END", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DATA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("RUN_COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_END");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE_OFFICIALSEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_FILE_OFFICIALSEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_FILE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEETINGRECORD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESOLUTION")
                        .HasMaxLength(3000)
                        .HasColumnType("nvarchar(3000)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT_DEAL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENT_DEAL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("GETPOINT")
                        .HasColumnType("int");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_DEAL_ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES_CONTENT_DEAL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEALBACK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("DEALEFFECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEAL_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEAL_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISNEEDDEAL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LIMITDATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RESOLUTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEAL_DEPARTMENT_ID");

                    b.HasIndex("DEAL_USER_ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MEETING_MINUTES_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_MINUTES_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PABSENCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MEETING_PABSENCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PALL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("JOINRESULT")
                        .HasColumnType("int");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTJOINREASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONNATURE")
                        .HasColumnType("int");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MEETING_PALL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PASKFORLEAVE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MEETING_PASKFORLEAVE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PJOIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISRECORDRED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MEETING_PJOIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PREVIEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("JOINRESULT")
                        .HasColumnType("int");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NOTJOINREASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MEETING_PREVIEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_THEME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_MEETING_THEME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_THEMES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("THEME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("THEME_ID");

                    b.ToTable("T_SC_MT_MEETING_THEMES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MINUTES_PREVIEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISRECORDRED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MEETING_MINUTES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PERSONTYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MEETING_MINUTES_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SC_MT_MINUTES_PREVIEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CONTENTNAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MEETINGTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("CONTENTNAME_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_MT_PLAN_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_SET_ID");

                    b.ToTable("T_SC_MT_PLAN_SET_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("AS_SAFE_USER")
                        .HasColumnType("bit");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPOST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPOST_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SC_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST_DEPOST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPOST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPOST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SC_POST_DEPOST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST_SAFE_PDT_TEMPLATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SC_POST_SAFE_PDT_TEMPLATE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_CERTIFICATE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_CERTIFICATE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILENAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FILE_DB_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCOREPASS")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENTID");

                    b.HasIndex("FILE_DB_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_COURSEWEARLIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDU_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCOREPER")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDU_CARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEST_ID");

                    b.ToTable("T_SE_COURSEWEARLIBRARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COURSEWEARLIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COURSEWEARLIBRARY_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_COURSEWEARLIBRARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLAN_YEAR")
                        .HasColumnType("int");

                    b.Property<string>("SAFE_USER_IDS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TRIGGER_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_DEP_TRAIN_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEP_TRAIN_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("DEP_TRAIN_PLAN_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_DEP_TRAIN_PLAN_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEP_TRAIN_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MOON")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("OBJECT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEACHER")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TEACHING_MATERIAL")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("TRAIN_MODEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEP_TRAIN_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SE_DEP_TRAIN_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IS_CREATETEST")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TAINNING_ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TRAINNING_TIME")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<int?>("TRAINTYPE")
                        .HasColumnType("int");

                    b.Property<int>("TRAIN_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_NEW_USERS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NEW_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("NEW_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_NEW_USERS_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_TEACHER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NEW_USERS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NEW_USERS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_NEW_USERS_TEACHER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDU_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EXAMINATION_RESULTS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_CARD_NUMBER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("IN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("ISSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NEXT_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SCORE")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EDU_CARD_ID");

                    b.HasIndex("NEXT_DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_DEPARTMENT_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_POST_ID");

                    b.ToTable("T_SE_NEW_USER_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_DETAIL_ID");

                    b.ToTable("T_SE_NEW_USER_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_PAPER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TEXT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TEST_ID");

                    b.HasIndex("TEXT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_NEW_USER_DETAIL_PAPER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISPASS")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<int>("TEXT_TIMES")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_NEW_USER_DETAIL_TEXT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_AUTHORITY")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CERTIFICATE_CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("CERTIFICATE_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime>("EXPIRY_DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("EXPIRY_START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("ISSUE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("REVIEW_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CERTIFICATE_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_RENEWAL_TRAIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RENEWALD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RENEWALD_ID");

                    b.ToTable("T_SE_RENEWAL_TRAIN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("COMPNAY_REPORT")
                        .HasColumnType("bit");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAFE_USER_IDS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_SAFE_SURVEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_ID");

                    b.ToTable("T_SE_SAFE_SURVEY_LIST_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_ID");

                    b.ToTable("T_SE_SAFE_SURVEY_LIST_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_PAPER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SAFE_ID");

                    b.HasIndex("TEST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_SAFE_SURVEY_LIST_PAPER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SAFE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POINT_ID");

                    b.HasIndex("SAFE_ID");

                    b.ToTable("T_SE_SAFE_SURVEY_LIST_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_SAFE_SURVEY_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SECONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVAL_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("COUNT_RETRY")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("C_TEST_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("C_TEST_SCORE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("DEP_TRAIN_PLAN_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DEP_TRAIN_PLAN_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("M_TEST_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("M_TEST_SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PASS_MARK")
                        .HasColumnType("int");

                    b.Property<DateTime?>("SAFE_SERVEY_TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("S_TEST_COUNT")
                        .HasColumnType("int");

                    b.Property<int>("S_TEST_SCORE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("TRAIN_SURVEY_TRIGGER_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("APPROVAL_ROLE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_SECONFIG");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_A")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_B")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_C")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_D")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_E")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TRAINNAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<int>("USAGE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TEST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TEST_ENUM_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_LIST_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POINT_ID");

                    b.HasIndex("TEST_ID");

                    b.ToTable("T_SE_TEST_LIST_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_LIST_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("TEST_ID");

                    b.ToTable("T_SE_TEST_LIST_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("THREE_LEVEL_SAFE_TRAIN_TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_THREE_LEVEL_SAFE_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_EDU_CARD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_CARD_NUMBER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("IN_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_THREE_LEVEL_SAFE_EDU_CARD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("EDU_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EXAMINATION_RESULTS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SCORE")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TAINNING_ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TEACHER")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("THREE_LEVEL_SAFE_TRAIN_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("TRAINNING_TIME")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.Property<string>("TRAIN_MODEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("EDU_CARD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TRAIN_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TRAIN_RECORD_ID");

                    b.ToTable("T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_SIGNATURE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TRAIN_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TRAIN_RECORD_ID");

                    b.ToTable("T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_SIGNATURE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FEEDBACK_NUMS")
                        .HasColumnType("int");

                    b.Property<string>("FEEDBACK_RATIO")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SURVEY_NUMS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAINING_EFFECT_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_END", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BAD_RATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("BETTER_RATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GOOD_RATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NORMAL_RATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUBJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TRAINING_EFFECT_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUBJECT_ID");

                    b.HasIndex("TRAINING_EFFECT_EVALUATION_ID");

                    b.ToTable("T_SE_TRAINING_EFFECT_EVALUATION_END");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_OPINION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("OPINION_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TRAINING_EFFECT_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TRAINING_EFFECT_EVALUATION_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAINING_EFFECT_EVALUATION_OPINION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAINING_EFFECT_EVALUATION_SURVEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY_RESULTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EVALUATION_RESULT")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUBJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TRAINING_EFFECT_EVALUATION_SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUBJECT_ID");

                    b.HasIndex("TRAINING_EFFECT_EVALUATION_SURVEY_ID");

                    b.ToTable("T_SE_TRAINING_EFFECT_EVALUATION_SURVEY_RESULTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_SURVEY_SUBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAINING_SURVEY_SUBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_CHECK_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_CHECK_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_DEMAND_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_DEMAND_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("CREATE_NOTIFY_RECORD")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DT_START_SIGN")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXAMETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("HOURS")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("IN_OUT")
                        .HasColumnType("int");

                    b.Property<bool>("ISSENDSIGN")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NEED_EVALUATION")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORIGINAL_NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLANDETAILID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TRAINTYPE")
                        .HasColumnType("int");

                    b.Property<string>("TRAIN_ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("TRAIN_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("TRAIN_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("TRAIN_MODEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("TRAIN_PLAN")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TRAIN_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("TRAIN_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("TRAIN_TEACHER")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("TRAIN_TYPE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_TEACHER")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.HasIndex("TRAIN_DEPARTMENT_ID");

                    b.HasIndex("TRAIN_TYPE");

                    b.HasIndex("USER_ID_TEACHER");

                    b.ToTable("T_SE_TRAIN_NOTIFY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_CONTENT_REL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POINT_ID");

                    b.ToTable("T_SE_TRAIN_NOTIFY_CONTENT_REL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("COURSEWEARLIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COURSEWEARLIBRARY_ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_NOTIFY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_PERSONS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_LEAVE")
                        .HasColumnType("int");

                    b.Property<string>("LEAVE_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<bool>("TRANSFER_TRAINING")
                        .HasColumnType("bit");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAIN_NOTIFY_PERSONS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("GUIDE_PRINCIPLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("PERSENT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLAN_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TRAIN_REQUIREMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVAL_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECKTYPE")
                        .HasColumnType("int");

                    b.Property<decimal>("CLASSHOUR")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE_TRAIN")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("IN_OUT")
                        .HasColumnType("int");

                    b.Property<bool>("ISALL")
                        .HasColumnType("bit");

                    b.Property<bool>("ISNEEDINI")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("OBJECT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SPRINTTYPE")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TRAINTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVAL_ROLE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SE_TRAIN_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_DETAIL_ID");

                    b.ToTable("T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_SE_TRAIN_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TRAIN_COUNT")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_PAPER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("EDU_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_UUSER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TEXT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("RECORD_UUSER_ID");

                    b.HasIndex("TEST_ID");

                    b.HasIndex("TEXT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_PAPER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CLASS_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EXAMINATION_RESULTS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LEVEL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal>("TRAIN_HOUR")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("TRAIN_MODEL")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("TRAIN_SCORE")
                        .HasColumnType("int");

                    b.Property<string>("TRAIN_TEACHER")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TRAIN_TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("UNIT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_TEXT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool?>("ISPASS")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<int>("TEXT_TIMES")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_TEXT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("EXAMETIMES")
                        .HasColumnType("int");

                    b.Property<int?>("EXAMINATION_RESULTS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("OK")
                        .HasColumnType("bit");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_USER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_VIEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("EDU_CARD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TEXT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("VIEWSEC")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_RECORD_VIEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("SAFE_USER_IDS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_SURVEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OK")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OTHER")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_TRAIN_SURVEY_LIST_DEMAND");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEMAND_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LIST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEMAND_ID");

                    b.HasIndex("LIST_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_SURVEY_LIST_DEMAND_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SURVEY_ID");

                    b.ToTable("T_SE_TRAIN_SURVEY_LIST_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SURVEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POINT_ID");

                    b.HasIndex("SURVEY_ID");

                    b.ToTable("T_SE_TRAIN_SURVEY_LIST_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_TRAIN_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_USER_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_SEND")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SE_USER_TEMP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IMPLEMENT_REQUIREMENT")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("LAUNCH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PLAN_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("PLAN_YEAR")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("TRAIN_GOAL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SE_YEAR_TRAIN_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("YEAR_TRAIN_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("YEAR_TRAIN_PLAN_DETAIL_ID");

                    b.ToTable("T_SE_YEAR_TRAIN_PLAN_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DEPARTMENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("YEAR_TRAIN_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("YEAR_TRAIN_PLAN_DETAIL_ID");

                    b.ToTable("T_SE_YEAR_TRAIN_PLAN_DEPARTMENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("LEVEL")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MOON")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("OBJECT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RESPONSIBILITY_DEP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RESPONSIBILITY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SEND")
                        .HasColumnType("int");

                    b.Property<string>("TEACHER")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TEACHING_MATERIAL")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("TRAIN_MODEL")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("YEAR_TRAIN_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RESPONSIBILITY_DEP_ID");

                    b.HasIndex("RESPONSIBILITY_USER_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("YEAR_TRAIN_PLAN_ID");

                    b.ToTable("T_SE_YEAR_TRAIN_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("YEAR_TRAIN_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("YEAR_TRAIN_PLAN_ID");

                    b.ToTable("T_SE_YEAR_TRAIN_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("SCOREC_ID");

                    b.HasIndex("SCOREE_ID");

                    b.HasIndex("SCOREL_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_DETAIL_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_DETAIL_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_DETAIL_CONTENT_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_DETAIL_CONTENT_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_DETAIL_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_DETAIL_CONTENT_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_DETAIL_CONTENT_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_TEMP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_TEMP_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_TEMP_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CONTENT_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_TEMP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_TEMP_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_TEMP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_TEMP_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BASIC_LIBRARY_TEMP_MEASURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BASIC_LIBRARY_TEMP_MEASURE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_BASIC_LIBRARY_TEMP_MEASURE_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_CHECK_CONTENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_CONTENTS_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CYCLE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONTH")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<DateTime?>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_CYCLE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEMAND")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DESCREPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("QUESTION_LEVEL")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_QUESTION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ADD_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_AUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SEND")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_CHECK_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_SET_CONTENTS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_SET_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("CHECK_SET_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_SET_CONTENTS_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA_RISK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_SET_CONTENTS_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_SET_CONTENTS_AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.ToTable("T_SK_CHECK_SET_CONTENTS_AREA_RISK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENTS_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_SET_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_SET_CONTENTS_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_CONTENTS_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_SET_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_CHECK_SET_CONTENTS_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_SET_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_CHECK_SET_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_CHECK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_EVALUATE_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_DEPART")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_USER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("SCOREC_ID");

                    b.HasIndex("SCOREE_ID");

                    b.HasIndex("SCOREL_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MECHANISM_DETAIL_DEPART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MECHANISM_DETAIL_DEPART_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECK_CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DOUBLE_PREVENT_MECHANISM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DOUBLE_PREVENT_MECHANISM_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_DOUBLE_PREVENT_MECHANISM_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("SCOREC_ID");

                    b.HasIndex("SCOREE_ID");

                    b.HasIndex("SCOREL_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ROLE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ROLE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECK_CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("ROW_NO")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_POST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_POST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MINE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECK_CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_CONTENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_CONTENT_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CONTENT_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid>("ENTERPRISE_LIBRARY_TEMP_MEASURE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE_CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ENTERPRISE_LIBRARY_TEMP_MEASURE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_HAND_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_DESCRIPTION_DETAIL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_STORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("RECITIFY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("HIDDEN_DANGER_HAND_REPORT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RECITIFY_USER_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_CONFIRM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_CONFIRM_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_CONFIRM_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_CONFIRM_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_CONFIRM_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_PHOTO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_CONFIRM_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_CONFIRM_PHOTO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_CONFIRM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_CONFIRM_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_HAND_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_HAND_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_HAND_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_HAND_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_DELAY_APPLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DELAY_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("DELAY_RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECITIFY_MEASURES_TEMP")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_DELAY_APPLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AcceptUser")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("ImplementUser")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RecitifyUser")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACCEPT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("IMPLEMENT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("RECITIFY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACCEPT_USER_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_NOTICE_ID");

                    b.HasIndex("IMPLEMENT_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECITIFY_USER_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_NOTICE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ACCEPT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("ACCEPT_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("ACCEPT_RESULTE")
                        .HasColumnType("int");

                    b.Property<Guid?>("ACCEPT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("COMPLETE_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_CONFIRM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_RECTIFY_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("IMPLEMENT_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("RECITIFY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RECTIFICATION_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RECTIFICATION_MEASURES")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RECTIFICATION_MONEY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ACCEPT_USER_ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("IMPLEMENT_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RECITIFY_USER_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_RECTIFY_RECORD_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECURITY_INSPECTION_RECORD_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("IS_STORE")
                        .HasColumnType("int");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("RECITIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("RECITIFY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("HIDDEN_DANGER_REPORT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECITIFY_USER_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_REPORT_DETAIL_ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT_DETAIL_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_REPORT_DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_REPORT_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT_DETAIL_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIDDEN_DANGER_REPORT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIDDEN_DANGER_REPORT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_DANGER_REPORT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_HIDDEN_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("EVALUATION_END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("ISSEND")
                        .HasColumnType("bit");

                    b.Property<bool>("ISSEND_RESULT")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_EVALUATION_PLAN_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("EVALUATION_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_IDENTIFY_EVALUATION_PLAN_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATE_C")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_E")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_L")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_SCORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_MAIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_HIDDEN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("HIDDEN_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_RECITIFY")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_MAIN_HIDDEN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_MEASURES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("CHECK_CYCLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_OBJECT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_MAIN_MEASURES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_MAIN_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AREA_NAME2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AREA_NAME3")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AREA_NAME4")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AREA_NAME5")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("AREA_NAME6")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POST_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME1")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME2")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME3")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME4")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME5")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME6")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_TEMP", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CYCLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_TEMP");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_TEMP_NEW", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_BASIC")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("CHECK_CYCLE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_OBJECT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_STANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DEPARTMENT_USER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("EVALUATE_C")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_E")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_L")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATE_SCORE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("HIDDEN_LEVEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_RECITIFY")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(9999)
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TYPE_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_LIBRARY_IMPORT_TEMP_NEW");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHARGE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MONITOR_DEPART_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MONITOR_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("REPORT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("REVIEW_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("REVIEW_RESULT")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHARGE_USER_ID");

                    b.HasIndex("HIDDEN_DANGER_RECTIFY_RECORD_ID");

                    b.HasIndex("MONITOR_DEPART_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MAJOR_ACCIDENT_HAZARD_MANAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("MAJOR_ACCIDENT_HAZARD_MANAGE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("MAJOR_ACCIDENT_HAZARD_MANAGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MAJOR_ACCIDENT_HAZARD_MANAGE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MONITOR_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_MONITOR_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("CHECK_CYCLE")
                        .HasColumnType("int");

                    b.Property<int>("CHECK_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONTH")
                        .HasColumnType("int");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKOBJECT")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID_SEND")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("USER_ID_SEND");

                    b.ToTable("T_SK_PLAN_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_SK_PLAN_SET_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_DEPARTMENT_OUT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_SK_PLAN_SET_DEPARTMENT_OUT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_DEP_OBJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLANSET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLANSET_ID");

                    b.ToTable("T_SK_PLAN_SET_DEP_OBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_REQUEST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("NAME")
                        .IsUnique()
                        .HasFilter("[NAME] IS NOT NULL");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_REQUEST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LEAF")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TEXT")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_RISK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISCOMPANY")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_EVALUATION");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_DEPART")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_USER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RISK_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_EVALUATION_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("SCOREC_ID");

                    b.HasIndex("SCOREE_ID");

                    b.HasIndex("SCOREL_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_DETAIL_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_DETAIL_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_DETAIL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_DETAIL_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_DETAIL_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_DETAIL_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("RISK_EVALUATION_DETAIL_POST_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_DETAIL_POST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.HasIndex("RISK_EVALUATION_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISCOMPANY")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_C")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_E")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal>("EVALUATE_L")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("EVALUATE_LEVEL")
                        .HasColumnType("int");

                    b.Property<decimal>("EVALUATE_SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("EVALUATION_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EVALUATION_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_DEPART")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_USER")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREC_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SCOREL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("SCOREC_ID");

                    b.HasIndex("SCOREE_ID");

                    b.HasIndex("SCOREL_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_DETAIL_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURES_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_DETAIL_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_DETAIL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_DETAIL_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_DETAIL_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_DETAIL_POST_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_EVALUATION_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.HasIndex("RISK_EVALUATION_SUMMARY_ID");

                    b.ToTable("T_SK_RISK_EVALUATION_SUMMARY_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RISK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_IDENTIFY_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_DETAIL_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_DETAIL_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_DETAIL_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_DETAIL_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_DETAIL_RESULT_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("RISK_IDENTIFY_DETAIL_RESULT_POST_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.HasIndex("RISK_IDENTIFY_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<int>("ISCOMPANY")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("IDENTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RISK_IDENTIFY_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.HasIndex("RISK_IDENTIFY_RESULT_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONTENTS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_EVALUATION_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IDENTIFY_RESULT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISCOMPANY")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("YEAR")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("IDENTIFY_EVALUATION_PLAN_ID");

                    b.HasIndex("IDENTIFY_ID");

                    b.HasIndex("IDENTIFY_RESULT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DEPART", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DEPART");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENT_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("ENTERPRISE_LIBRARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("IDENTIFY_DEPARTMENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("IDENTIFY_POST")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RISK_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RISK_NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("RISK_NAME_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RISK_NAME_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_MEASURE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("EMERGENCY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_MEASURE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_POST_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IDENTIFY_RESULT_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IDENTIFY_RESULT_SUMMARY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_RISK_NAME");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_RISK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_SCOREC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_SCOREE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("JT_SYNC")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal>("SCORE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_SCOREL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_NOTICE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("SECURITY_INSPECTION_NOTICE_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_NOTICE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_NOTICE_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_NOTICE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_NOTICE_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_NOTICE_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_NOTICE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECURITY_INSPECTION_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECK_RESULT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_DETAIL_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_DETAIL_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPLY_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ApplyDepartmentName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApplyPostName")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CHECK_PERSON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEPARTMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTO")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<string>("NOTICE_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("PRODUCTION_UNIT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECURITY_INSPECTION_NOTICE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("SECURITY_INSPECTION_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("APPLY_DEPARTMENT_ID");

                    b.HasIndex("APPLY_USER_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PRODUCTION_UNIT_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECKSTANDARD")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CHECK_CONTENTS_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_QUESTION_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("CHECK_RESULT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HIDDEN_DESCRIPTION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("HIDDEN_LEVEL")
                        .HasColumnType("int");

                    b.Property<string>("HIDDEN_PLACE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("HIDDEN_REASON")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int>("MARK")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RISK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_CONTENTS_ID");

                    b.HasIndex("CHECK_QUESTION_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RISK_AREA_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_BASIC", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LAW_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_BASIC");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_REASON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("REASON_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REASON_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_REASON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECKTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SECURITY_INSPECTION_RECORD_SUMMARY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SECURITY_INSPECTION_RECORD_SUMMARY_ID");

                    b.ToTable("T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_TIME_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MONTH")
                        .HasColumnType("int");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<DateTime?>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("SET_TYPE")
                        .HasColumnType("int");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_SK_TIME_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_VIDEO_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("VIDEO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("VIDEO_ID");

                    b.ToTable("T_SK_VIDEO_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_COST_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_COST_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ACCIDENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("DISABILITY_AFFIRM_AGENCY")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("DISABILITY_AFFIRM_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DISABILITY_LEVEL")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("HOSPITAL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("INJURE_AFFIRM_AGENCY")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("INJURE_AFFIRM_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("INJURE_DETAIL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<DateTime?>("INJURE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("INSURANCE_CLAIM_AMOUNT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int?>("IN_HOSPITAL")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<decimal?>("USER_CLAIM_AMOUNT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ACCIDENT_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_INSURANCE_CLAIM_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_TI_INSURANCE_CLAIM_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_INSURANCE_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_TI_INSURANCE_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_USER_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DEPARTMENTNAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("INSURE_DURATION")
                        .HasColumnType("int");

                    b.Property<int?>("INSURE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("INSURE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("OPERATEYEARMON")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<DateTime?>("STOP_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("TYPE")
                        .HasColumnType("int");

                    b.Property<string>("USERPOSTNAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_INSURANCE_USER_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGINTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_PLAN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.ToTable("T_TI_PLAN_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RANGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("RANGE_ID");

                    b.ToTable("T_TI_PLAN_RANGE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_PLAN_RANGE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("SOURCE_ID");

                    b.ToTable("T_TI_PLAN_SOURCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_PLAN_SOURCE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGINTIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMONEY")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool?>("IS_FOREIGN")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MANAGER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("MONEY")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("YEAR")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("MANAGER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PLAN_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_PROJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGINTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("MONEY")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_PROJECT_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_CHECK_ID");

                    b.ToTable("T_TI_PROJECT_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK_WFFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_CHECK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_CHECK_ID");

                    b.ToTable("T_TI_PROJECT_CHECK_WFFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_TI_PROJECT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BEGINTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_PROJECT_MONEY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<decimal?>("LEFT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MONEY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("NAME")
                        .HasMaxLength(150)
                        .HasColumnType("nvarchar(150)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<decimal?>("TOTAL")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("USE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("MONEY_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_PROJECT_MONEY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TI_PROJECT_MONEY_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_RANGE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RANGE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("RANGE_ID");

                    b.ToTable("T_TI_PROJECT_RANGE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_SOURCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("SOURCE_ID");

                    b.ToTable("T_TI_PROJECT_SOURCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_WFFILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_TI_PROJECT_WFFILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("COUNT")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROCTNAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("PROJECT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("PURPOSE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("UNIT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("USETIME")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("USE_AMOUNT")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TI_SAFE_PDT_COST_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_TI_SAFE_PDT_COST_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("COST_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("COST_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.ToTable("T_TI_SAFE_PDT_COST_RECORD_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("BACKDATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_BACK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATEEND")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATESTART")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BACK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_BACK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BACK_DETAIL_ID");

                    b.HasIndex("BACK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_BACK_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BACK_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_BACK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("APPROVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("BACKTIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("BACKTIMEEND")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("BACK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("BACK_DIREACT")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<decimal?>("BACK_NUMBER")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int?>("BACK_ORDER")
                        .HasColumnType("int");

                    b.Property<string>("BACK_SCALE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<decimal?>("BACK_THICKNESS")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("DRIVE_LONG")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("SAFE_HIGHT")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_BACK_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("ISMAINCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BACK_RECORD_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_BACK_RECORD_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("BACK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REQUIRE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("BACK_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REQUIRE_ID");

                    b.ToTable("T_TL_BACK_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_CACULATE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_CACULATE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_CACULATE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CACULATE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CACULATE_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_CACULATE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONTENT")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int>("FILETYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TASK_PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_FILE_SUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.ToTable("T_TL_FILE_SUM_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_HIGH_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIGH_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIGH_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_HIGH_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_OUT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("OUTDATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_OUT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_OUT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUT_ID");

                    b.ToTable("T_TL_OUT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PLAN_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.ToTable("T_TL_PLAN_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<string>("RESULT_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_PROJECT_FINISH");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIGHT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIGHT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_PROJECT_FINISH_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<string>("RESULT_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_PROJECT_HIGHT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("HIGHT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("HIGHT_ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_PROJECT_HIGHT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_PROJECT_INTRODUCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("INTRODUCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("INTRODUCE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_PROJECT_INTRODUCE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<int?>("RESULT_CHECK")
                        .HasColumnType("int");

                    b.Property<string>("RESULT_CHECK_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("RESULT_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int?>("RESULT_WATCH")
                        .HasColumnType("int");

                    b.Property<string>("RESULT_WATCH_REASON")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_PROJECT_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_TL_PROJECT_RECORD_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_TL_PROJECT_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_WATCH_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_TL_PROJECT_RECORD_WATCH_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("COUNTNUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAMESUB")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("RESULT")
                        .HasColumnType("int");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_PROJECT_SLOPEBANK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SLOPEBANK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SLOPEBANK_ID");

                    b.ToTable("T_TL_PROJECT_SLOPEBANK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_PROJ_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SLOPEBANK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SLOPEBANK_ID");

                    b.ToTable("T_TL_PROJECT_SLOPEBANK_PROJ_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_SUB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SLOPEBANK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SLOPEBANK_ID");

                    b.ToTable("T_TL_PROJECT_SLOPEBANK_SUB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_QUALITY_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("QUALITY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("QUALITY_ID");

                    b.ToTable("T_TL_QUALITY_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_REQUIRE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_REQUIRE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_SET_WATCH_DAYLY_ITEM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISAUTOLAST")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<int?>("MAX")
                        .HasColumnType("int");

                    b.Property<int?>("MIN")
                        .HasColumnType("int");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNITE")
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_SET_WATCH_DAYLY_ITEM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_TAILING", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_TAILING");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_DAYLY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DAYLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("DREEP")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("HIGHTEST")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("HIGHT_MORE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("ITEM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("ITEM_VALUE")
                        .HasColumnType("decimal(18,2)");

                    b.Property<decimal?>("LONG")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<decimal?>("WATERLINE")
                        .HasColumnType("decimal(18,2)");

                    b.HasKey("ID");

                    b.HasIndex("DAYLY_ID");

                    b.HasIndex("ITEM_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_DAYLY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DAYLY_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DAYLY_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_DAYLY_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("DAYLY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DAYLY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_DAYLY_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_LINE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<decimal?>("DEEP")
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LINE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("WATCH_LINE_POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LINE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("WATCH_LINE_POINT_ID");

                    b.ToTable("T_TL_WATCH_LINE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LINE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("LINE_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_TL_WATCH_LINE_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LINE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("LINE_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_LINE_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOCATION")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<decimal?>("POINT_DEEP")
                        .HasColumnType("decimal(18,2)");

                    b.Property<string>("POINT_NO")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_LINE_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_MOVE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHANGELOOKPOINT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("LOOKPOINT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MOVE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("WATCH_MOVE_POINT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MOVE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("WATCH_MOVE_POINT_ID");

                    b.ToTable("T_TL_WATCH_MOVE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("MOVE_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("MOVE_DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_MOVE_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_POINT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME_BASE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME_WATCH")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("POINT_BASE")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_MOVE_POINT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_PERCENT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("INT_PERCENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("OUT_PERCENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid>("PERCENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SUM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERCENT_ID");

                    b.HasIndex("SUM_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_PERCENT_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISCHECK")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PERCENT_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PERCENT_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_TL_WATCH_PERCENT_DETAIL_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PLAN_SET", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("WATCHTYPE")
                        .HasColumnType("int");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_PLAN_SET");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("DATE")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TAILING_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TAILING_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TAILING_ID");

                    b.ToTable("T_TL_WATCH_SUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AREA")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("CHECK_BASIS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_CHECK_AREA_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_MAIN", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECKCONTENT")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("CHECKPROOF")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CHECK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_AREA_ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_CHECK_MAIN");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_CHECK_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("DATA")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SAFE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SCENE_USERID")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PLANCHECKFREQUENCY")
                        .HasColumnType("int");

                    b.Property<Guid?>("POST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RUNDATA")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime>("RUNSETTIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("POST_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_CHECK_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("DANGEROUS_JOB_ITEM")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("DANGEROUS_JOB_NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("DISCLOSE")
                        .HasColumnType("int");

                    b.Property<int>("DISCLOSE_STATUS")
                        .HasColumnType("int");

                    b.Property<DateTime?>("DISCLOSE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DISCLOSE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("JOB_ADDRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("JOB_RISK_IDENTIFY")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MOINTER_DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("MOINTER_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MOINTER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int?>("STATUS_DETAIL")
                        .HasColumnType("int");

                    b.Property<int?>("STATUS_MOINTER")
                        .HasColumnType("int");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DISCLOSE_USER_ID");

                    b.HasIndex("MOINTER_DEPARTMENT_ID");

                    b.HasIndex("MOINTER_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_AUDIT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("AUDIT_DATE")
                        .HasColumnType("datetime2");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<int>("AUDIT_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISORNOT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_AUDIT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISORNOT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ISORNOT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_DISCLOSE_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_DISCLOSE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_DISCLOSE_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MOINTER_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("MOINTER_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("MOINTER_DEPARTMENT_ID");

                    b.HasIndex("MOINTER_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISOCONFIRM")
                        .HasColumnType("bit");

                    b.Property<int>("ISORNOT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_USER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_DANGEROUS_JOB_USER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_NOTIFY");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("DETAIL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_NOTIFY_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_NOTIFY_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_NOTIFY_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("ENDTIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("NOTIFY_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("NOTIFY_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("FINISH_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<string>("MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL_AFTER_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_RECORD_DETAIL_AFTER_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL_BEFORE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_RECORD_DETAIL_BEFORE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_HIDDEN_DANGER_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.ToTable("T_WB_JOB_SAFE_MEASURE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<string>("SAFE_MEASURE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_JOB_SAFE_MEASURE_ENUM_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_JOB_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("PASSSCORE")
                        .HasColumnType("int");

                    b.Property<Guid>("TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TYPE_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_OUTSOURCE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SOURCE_ID");

                    b.ToTable("T_WB_OUTSOURCE_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TEST", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_A")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_B")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_C")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_D")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("OPTION_E")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("TRAINNAME")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SOURCE_ID");

                    b.ToTable("T_WB_OUTSOURCE_TEST");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISEND")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CREATE_TEST")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("OFFLINE_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("OFFLINE_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("OFFLINE_TOTAL_TIME")
                        .HasColumnType("int");

                    b.Property<DateTime?>("ONLINE_END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("ONLINE_START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ONLINE_TOTAL_TIME")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<int>("TOTAL_TIME")
                        .HasColumnType("int");

                    b.Property<string>("TRAIN_ADDR")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("TRAIN_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("TRAIN_TYPE")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ANSWER")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<string>("FILE_PATH")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_ONLINE")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_WATCH")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORDER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NO")
                        .HasColumnType("int");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<int>("SCOREVAL")
                        .HasColumnType("int");

                    b.Property<Guid>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("TEST_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDERID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORDER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("SOURCE_ID");

                    b.HasIndex("TEST_ID");

                    b.HasIndex("T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDERID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_PAPER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RECORD_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PHOTO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_PHOTO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_OFF", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTSOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTSOURCE_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_OFF");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_ON", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("OUTSOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("OUTSOURCE_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_ON");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("DEAL_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<int?>("EXAMINATION_RESULTS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("SCORE")
                        .HasColumnType("int");

                    b.Property<int>("SIGN_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_USERS");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS_FILES", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_OUTSOURCE_TRAIN_RECORD_USERS_FILES");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_OUTSOURCE_TYPE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_VIDEO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SOURCE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("VIDEO_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SOURCE_ID");

                    b.HasIndex("VIDEO_ID");

                    b.ToTable("T_WB_OUTSOURCE_VIDEO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("CONSTRUCTION_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_CONSTRUCTION")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LAUNCH_DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("LAUNCH_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("MAJOR_RISK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MAJOR_WORK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("SCENE_USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_SAFE")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("WB_USER_CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("WB_USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("WB_USER_PASSWORD")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("WB_USER_PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("SCENE_USER_ID");

                    b.HasIndex("USER_ID");

                    b.HasIndex("USER_ID_SAFE");

                    b.ToTable("T_WB_PROJECT_INPUT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_PROJECT_INPUT_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CONSTRUCTION_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<string>("UNIT_NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("WB_USER_NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("WB_USER_PHONE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_WB_REGISTER");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AGREEMENT_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("AGREEMENT_TYPE")
                        .HasColumnType("int");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PROJECT_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("START_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_1");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_1_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("AGE")
                        .HasColumnType("int");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("CURRENT_ADRESS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("EMERGENCY_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("EMERGENCY_PHONE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("ENABLE_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ID_CARD")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_LOGIN")
                        .HasMaxLength(100)
                        .HasColumnType("bit");

                    b.Property<string>("JOBTYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PHONE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<double>("SCORE")
                        .HasColumnType("float");

                    b.Property<int?>("SEX")
                        .HasMaxLength(100)
                        .HasColumnType("int");

                    b.Property<Guid?>("USERID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("VALID_DATE")
                        .HasMaxLength(100)
                        .HasColumnType("datetime2");

                    b.Property<int?>("WORKTYPE")
                        .HasMaxLength(100)
                        .HasColumnType("int");

                    b.Property<Guid?>("WORKTYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("WORKTYPE_ID");

                    b.ToTable("T_WB_REGISTER_2");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE1", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_2_FILE1");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE2", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_2_FILE2");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE3", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_2_FILE3");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE4", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_2_FILE4");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_JOB_TYPE_ENUM", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid>("JOBTYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("REGISTERT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("JOBTYPE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("REGISTERT_ID");

                    b.ToTable("T_WB_REGISTER_2_JOB_TYPE_ENUM");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CERTIFICATE_NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("CERTIFICATE_TYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("LEVEL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TYPE")
                        .HasColumnType("int");

                    b.Property<DateTime?>("VALID_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("LEVEL_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_3");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_3_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("DATE_LIMIT")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_SPECIAL_DEVICE")
                        .HasColumnType("bit");

                    b.Property<string>("MAIN_SAFE_DEVICE")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<string>("MODEL")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<int>("NUMBER")
                        .HasMaxLength(300)
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("UNIT")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("USETO")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_4");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("VALID_TIME")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_REGISTER_4_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_RELATED_LEVEL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("TYPE")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_RELATED_LEVEL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("CHECK_CATEGORY")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("HIDDEN_DANGER_COUNT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.ToTable("T_WB_SAFE_CHECK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_SAFE_CHECK_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_PHOTO", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_SAFE_CHECK_PHOTO");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("AUDIT_OPINION")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TASK_DETAIL_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_WB_SAFE_CHECK_RECORD");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ADRESS")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("ISORNOT")
                        .HasColumnType("int");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_DETAIL_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("TASK_DETAIL_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_SAFE_CHECK_RECORD_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_SAFE_CHECK_RECORD_DETAIL_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_FILE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("IMG_FILE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("IMG_FILE_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.ToTable("T_WB_SAFE_CHECK_RECORD_FILE");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CHECK_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int>("CREACTTYPE")
                        .HasColumnType("int");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENTID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("ISSENDRECORD")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_CANCEL")
                        .HasColumnType("bit");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<DateTime?>("LIMITDATETIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("MineType")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("MineTypeShow")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PLAN_SET_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("REMARK_CANCEL")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<int>("STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USERID_DOPLAN")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID_CANCEL")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("TASK_ID");

                    b.ToTable("T_WB_SAFE_CHECK_TASK");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_AREA", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("CHECK_TASK_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_AREA_ID");

                    b.HasIndex("CHECK_TASK_ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_SAFE_CHECK_TASK_AREA");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AREA_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CHECK_BASIS")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("CHECK_CONTENT")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MAIN_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int?>("MineType")
                        .HasColumnType("int");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PARENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("ROW_NUM")
                        .HasColumnType("int");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("AREA_ID");

                    b.HasIndex("MAIN_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PARENT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_SAFE_CHECK_TASK_DETAIL");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_TRAIN_SELECT", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("END_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("PROJECT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("PROJECT_ID");

                    b.HasIndex("USER_ID");

                    b.ToTable("T_WB_TRAIN_SELECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_WORKTYPE", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("CODE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CREATE_TIME")
                        .HasColumnType("datetime2");

                    b.Property<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

                    b.Property<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("int");

                    b.Property<int>("FLOW_STATUS")
                        .HasColumnType("int");

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<bool>("IS_DELETED")
                        .HasColumnType("bit");

                    b.Property<Guid?>("MODIFIER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("MODIFY_TIME")
                        .HasColumnType("datetime2");

                    b.Property<string>("NAME")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int?>("WORKTYPE")
                        .HasMaxLength(100)
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.ToTable("T_WB_WORKTYPE");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_HMI", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM", "Nav_Enum")
                        .WithMany()
                        .HasForeignKey("ENUM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_ITEM", "Nav_EnumItem")
                        .WithMany()
                        .HasForeignKey("ENUM_ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Enum");

                    b.Navigation("Nav_EnumItem");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_Picture")
                        .WithMany("Nav_PictureFiles")
                        .HasForeignKey("PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Picture");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PLACE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PLACE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_SERVER_INFO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_SYSTEM_INFO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_WORD_TEMPLATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_API", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD", "Nav_AutoPrintRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("AUTO_PRINT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AutoPrintRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_ADD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_CONFIG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_ConsPicture")
                        .WithMany()
                        .HasForeignKey("APP_CONS_PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_PictureBg")
                        .WithMany()
                        .HasForeignKey("BACK_PIC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_HMI", "Nav_HMI")
                        .WithMany()
                        .HasForeignKey("CURRENT_VOLTAGE_HMI_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_HMI", "Nav_HomeHmi")
                        .WithMany()
                        .HasForeignKey("HOME_HMI_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_PictureLogo")
                        .WithMany()
                        .HasForeignKey("LOGO_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_LowPicture")
                        .WithMany()
                        .HasForeignKey("LOWER_PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_MESSAGE_TEMPLATE", "Nav_MessageTemplate")
                        .WithMany()
                        .HasForeignKey("MESSAGE_TEMPLATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_TopPicture")
                        .WithMany()
                        .HasForeignKey("T0P_PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ConsPicture");

                    b.Navigation("Nav_HMI");

                    b.Navigation("Nav_HomeHmi");

                    b.Navigation("Nav_LowPicture");

                    b.Navigation("Nav_MessageTemplate");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PictureBg");

                    b.Navigation("Nav_PictureLogo");

                    b.Navigation("Nav_TopPicture");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_ENERGY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_BASE_INFO", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_ITEM", "Nav_FundEunmItem")
                        .WithMany()
                        .HasForeignKey("FUND_ENUM_ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PLACE", "Nav_Place")
                        .WithMany()
                        .HasForeignKey("PLACE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_ITEM", "Nav_PropEunmItem")
                        .WithMany()
                        .HasForeignKey("PROP_ENUM_ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_FundEunmItem");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Place");

                    b.Navigation("Nav_PropEunmItem");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY", "Nav_Holiday")
                        .WithMany()
                        .HasForeignKey("HOLIDAY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Holiday");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR_CLASS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", null)
                        .WithMany("Nav_CalendarClass")
                        .HasForeignKey("CALENDAR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", "Nav_Calendar")
                        .WithMany()
                        .HasForeignKey("Nav_CalendarID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Calendar");

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CLASS_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", null)
                        .WithMany("Nav_ClassDetail")
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_COST_CENTER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_COST_CENTER", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGEUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany()
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_Unit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_Person");

                    b.Navigation("Nav_Unit");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", "Nav_Calendar")
                        .WithMany()
                        .HasForeignKey("CALENDAR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_DepartmentCalendarConfig")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Calendar");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", "Nav_DepartmentCalendarConfig")
                        .WithMany("Nav_DepartmentCalendarConfigDetail")
                        .HasForeignKey("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_DepartmentCalendarConfig");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", "Nav_DepartmentCalendarConfig")
                        .WithMany("Nav_DepartmentCalendarConfigTeam")
                        .HasForeignKey("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DepartmentCalendarConfig");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_COMPLETION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_COMPLETION_SORT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST", "Nav_DepartmentPost")
                        .WithMany("Nav_Users")
                        .HasForeignKey("DEPARTMENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepartmentPost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_PRODUCTION_UNIT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_ProdutionUnit")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_DepartUnit")
                        .WithMany()
                        .HasForeignKey("DEPART_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", "Nav_Enums")
                        .WithMany()
                        .HasForeignKey("ENUMS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartUnit");

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SAFEUSER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_SafeUser")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", "Nav_DepartmentCalendarConfig")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_CALENDAR_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartMent")
                        .WithMany("Nav_DepartmentScheduling")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_DepartMent");

                    b.Navigation("Nav_DepartmentCalendarConfig");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING", "Nav_DepartmentScheduling")
                        .WithMany("Nav_DepartmentSchedulingDetail")
                        .HasForeignKey("DEPARTMENT_SCHEDULING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany()
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepartmentScheduling");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_DepartmentUser")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_TYPE", "Nav_EnumType")
                        .WithMany()
                        .HasForeignKey("ENUM_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EnumType");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_ITEM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUM", "Nav_Enum")
                        .WithMany("Nav_EnumItems")
                        .HasForeignKey("ENUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Enum");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EQUIPMENT_INTEGRATION_TASK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_ASYNCH_TEMP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG", "Nav_ExtConnConfig")
                        .WithMany("Nav_Details")
                        .HasForeignKey("EXT_CONN_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExtConnConfig");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_TRANS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HIDDEN_DANGER_RECTIFICATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY", null)
                        .WithMany("Nav_HolidayDetails")
                        .HasForeignKey("HOLIDAY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG", "Nav_ImportConfig")
                        .WithMany("Nav_Details")
                        .HasForeignKey("IMPORT_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("Nav_ParentID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImportConfig");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_FIELD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_DETAIL", "Nav_ImportConfigDetail")
                        .WithMany("Nav_Fields")
                        .HasForeignKey("IMPORT_CONFIG_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImportConfigDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_INFO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_JOB_ACTIVITY_COMPLETION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_MESSAGE_TEMPLATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_MONITORING", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTICE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION_ACCEPTED", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION", "Nav_Notification")
                        .WithMany("Nav_Accepteds")
                        .HasForeignKey("NOTIFICATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notification");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION_PERMIT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION", "Nav_Notification")
                        .WithMany("Nav_Permits")
                        .HasForeignKey("NOTIFICATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notification");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL_BELONG_ROLE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_BelongRole")
                        .WithMany("Nav_Panels")
                        .HasForeignKey("BELONG_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PANEL", "Nav_Panel")
                        .WithMany()
                        .HasForeignKey("PANEL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRole");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Panel");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL_INFO", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_INFO", "Nav_Info")
                        .WithMany()
                        .HasForeignKey("INFO_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PANEL", null)
                        .WithMany("Nav_PanelInfo")
                        .HasForeignKey("PANEL_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Nav_Info");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET", "Nav_Param")
                        .WithMany("Nav_Departments")
                        .HasForeignKey("PARAM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Param");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartMent")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DepartMent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_CERTIFICATE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_PersonCertificateFiles")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_EDUCATION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_PersonEducationFiles")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_IDCARD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_PersonIDCardFiles")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_SKILLS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_PersonSkills")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON_WORK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_PersonWorks")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PLAN_PARAM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PRINTER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PRINTER_TASK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_RISK_LEVEL_PROPORTION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_RISK_TYPE_PROPORTION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_Role")
                        .WithMany()
                        .HasForeignKey("ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Role");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP_BELONG_ROLE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_BelongRole")
                        .WithMany()
                        .HasForeignKey("BELONG_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", "Nav_RoleGroup")
                        .WithMany("Nav_BelongRoles")
                        .HasForeignKey("ROLE_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRole");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RoleGroup");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PermissionForm")
                        .WithMany()
                        .HasForeignKey("PERMISSION_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_Role")
                        .WithMany("Nav_MenuPermissions")
                        .HasForeignKey("ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PermissionForm");

                    b.Navigation("Nav_Role");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM_BTN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_BTN", "Nav_Btn")
                        .WithMany()
                        .HasForeignKey("BTN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM", "Nav_RoleMenuPermission")
                        .WithMany("Nav_PermissionBtns")
                        .HasForeignKey("ROLE_MENU_PERMISSION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Btn");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RoleMenuPermission");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM_COL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_COLUMN", "Nav_Column")
                        .WithMany()
                        .HasForeignKey("COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM", "Nav_RoleMenuPermission")
                        .WithMany("Nav_PermissionColumns")
                        .HasForeignKey("ROLE_MENU_PERMISSION_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Nav_Column");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RoleMenuPermission");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("ACCEPT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT", "Nav_Snapshot")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SNAPSHOT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Snapshot");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_ATTR", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PLAN_PARAM", "Nav_PlanParam")
                        .WithMany()
                        .HasForeignKey("PLAN_PARAM_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanParam");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_BELONG_ROLE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_BelongRole")
                        .WithMany()
                        .HasForeignKey("Nav_BelongRoleID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRole");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_DYNAMIC", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PLAN_PARAM", "Nav_PlanParam")
                        .WithMany()
                        .HasForeignKey("PLAN_PARAM_ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanParam");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_STAGE_PLAN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LIMIT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_LOG_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_TASK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SYNC_USER_RULE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Dep")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Dep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_ChargePerson")
                        .WithMany()
                        .HasForeignKey("CHARGE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChargePerson");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_TEAM_PERSON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithMany("Nav_TeamPersons")
                        .HasForeignKey("PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany("Nav_TeamPersons")
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_UNIT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_UserList")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", "Nav_Person")
                        .WithOne("Nav_User")
                        .HasForeignKey("APT.BaseData.Domain.Entities.FM.T_FM_USER", "PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_User")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_ROLE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_BelongRole")
                        .WithMany("Nav_UserBelongRoles")
                        .HasForeignKey("BELONG_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_BelongRoles")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRole");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_ROLE_GROUP", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", "Nav_BelongRoleGroup")
                        .WithMany()
                        .HasForeignKey("BELONG_ROLE_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_BelongRoleGroups")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRoleGroup");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_BELONG_USER_GROUP", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", "Nav_BelongUserGroup")
                        .WithMany()
                        .HasForeignKey("BELONG_USER_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_BelongUserGroups")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongUserGroup");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("Nav_UserID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_COL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_COLUMN", "Nav_Column")
                        .WithMany()
                        .HasForeignKey("COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_TAB", "Nav_HiddenTable")
                        .WithMany("Nav_HiddenColumns")
                        .HasForeignKey("USER_CUSTOM_CONFIG_H_TAB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Column");

                    b.Navigation("Nav_HiddenTable");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_TAB", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_PageTable")
                        .WithMany()
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", "Nav_UserCustomConfig")
                        .WithMany("Nav_HiddenTables")
                        .HasForeignKey("USER_CUSTOM_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTable");

                    b.Navigation("Nav_UserCustomConfig");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", "Nav_PageEdit")
                        .WithMany()
                        .HasForeignKey("PAGE_EDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", "Nav_UserCustomConfig")
                        .WithMany("Nav_Edits")
                        .HasForeignKey("USER_CUSTOM_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageEdit");

                    b.Navigation("Nav_UserCustomConfig");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT_COL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", "Nav_EditColumn")
                        .WithMany()
                        .HasForeignKey("EDIT_COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT", "Nav_UserCCEdit")
                        .WithMany("Nav_EditColumns")
                        .HasForeignKey("USER_C_C_EDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EditColumn");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserCCEdit");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT_H_COL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", "Nav_EditColumn")
                        .WithMany()
                        .HasForeignKey("EDIT_COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT", "Nav_UserCCEdit")
                        .WithMany("Nav_HiddenCols")
                        .HasForeignKey("USER_C_C_EDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EditColumn");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserCCEdit");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", "Nav_UserCustomConfig")
                        .WithMany("Nav_Querys")
                        .HasForeignKey("USER_CUSTOM_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");

                    b.Navigation("Nav_UserCustomConfig");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_FIELD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_GROUP", "Nav_UserCCQueryGroup")
                        .WithMany()
                        .HasForeignKey("USER_C_C_QUERY_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY", "Nav_UserCCQuery")
                        .WithMany("Nav_Fields")
                        .HasForeignKey("USER_C_C_QUERY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserCCQuery");

                    b.Navigation("Nav_UserCCQueryGroup");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_GROUP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_GROUP", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY", "Nav_UserCCQuery")
                        .WithMany("Nav_Groups")
                        .HasForeignKey("USER_C_C_QUERY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_UserCCQuery");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_PageTable")
                        .WithMany()
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", "Nav_UserCustomConfig")
                        .WithMany("Nav_Tabls")
                        .HasForeignKey("USER_CUSTOM_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTable");

                    b.Navigation("Nav_UserCustomConfig");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE_COL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_COLUMN", "Nav_Column")
                        .WithMany()
                        .HasForeignKey("COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE", "Nav_UserCCTable")
                        .WithMany("Nav_Columns")
                        .HasForeignKey("USER_C_C_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Column");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserCCTable");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany("Nav_UserDeparts")
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_ROLE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_BelongRole")
                        .WithMany()
                        .HasForeignKey("BELONG_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", "Nav_UserGroup")
                        .WithMany("Nav_BelongRoles")
                        .HasForeignKey("USER_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRole");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserGroup");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_R_G", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", "Nav_BelongRoleGroup")
                        .WithMany()
                        .HasForeignKey("BELONG_ROLE_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", "Nav_UserGroup")
                        .WithMany("Nav_BelongRoleGroups")
                        .HasForeignKey("USER_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongRoleGroup");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserGroup");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP_BELONG_U_G", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", "Nav_BelongUserGroup")
                        .WithMany()
                        .HasForeignKey("BELONG_USER_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", "Nav_UserGroup")
                        .WithMany("Nav_BelongUserGroups")
                        .HasForeignKey("USER_GROUP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BelongUserGroup");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserGroup");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PHOTO_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_UserPhotoFiles")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_Post")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", "Nav_Enums")
                        .WithMany()
                        .HasForeignKey("ENUMS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_Unit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_ProdutionUnit")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Unit");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_SIGN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany("Nav_UserSignFiles")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_TEST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UserPost")
                        .WithMany("Nav_UserTests")
                        .HasForeignKey("USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserPost");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_VACATION_SET", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Agent")
                        .WithMany()
                        .HasForeignKey("AGENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Agent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_WORK_TICKET_COMPLETION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_PF_SYS_LOG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_LogForm")
                        .WithMany()
                        .HasForeignKey("LOG_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LogForm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.LG.T_LG_OPRATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ENTERPRISE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.NW.T_NW_ENTERPRISE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ROLE_DATA_PERM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ROLE_MENU", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ALLUSER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE_VERSION", "Nav_Version")
                        .WithMany()
                        .HasForeignKey("VERSION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Version");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE_VERSION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", "Nav_Rule")
                        .WithMany("Nav_Versions")
                        .HasForeignKey("RULE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rule");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CHARGE_TIME_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CLIENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_CLINET_OPENID", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_CLIENT", "NavClient")
                        .WithMany()
                        .HasForeignKey("CLIENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("NavClient");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_COMMON_QUESTION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_FILE_FIRMWARE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_MEMBER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_CARD", "Nav_RechargeCard")
                        .WithMany()
                        .HasForeignKey("RECHARGE_CARD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RechargeCard");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_MENU", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_MenuForm")
                        .WithMany()
                        .HasForeignKey("MENU_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_MENU", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MenuForm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE", "Nav_Notice")
                        .WithMany("Nav_NoticeDetails")
                        .HasForeignKey("NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notice");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_PEAK_VALLEY_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_CARD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_RFID_CARD", "Nav_CardRfid")
                        .WithMany()
                        .HasForeignKey("RFID_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CardRfid");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_ORDER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_CARD", "Nav_RechargeCard")
                        .WithMany()
                        .HasForeignKey("RECHARGE_CARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RechargeCard");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RECHARGE_SETTING", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_RFID_CARD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ROLE_MENU", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_DB_CONN", "Nav_TenantDB")
                        .WithMany()
                        .HasForeignKey("DB_CONN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", "Nav_Tenant")
                        .WithMany()
                        .HasForeignKey("TEMPLATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tenant");

                    b.Navigation("Nav_TenantDB");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_DB_CONN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_DOMAIN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", "Nav_Tenant")
                        .WithMany("Nav_Domains")
                        .HasForeignKey("TENANT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tenant");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT_EXPIRATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", "Nav_TENANT")
                        .WithMany()
                        .HasForeignKey("TENANT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TENANT");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", "Nav_Tenant")
                        .WithMany()
                        .HasForeignKey("TEMPLATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tenant");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION_MENU", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_VERSION_TENANT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_OPERATION_ROLE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_Approve")
                        .WithMany("Nav_ApproveRoles")
                        .HasForeignKey("APPROVAL_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_Role")
                        .WithMany()
                        .HasForeignKey("ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Role");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_REJECT_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_APPROVE_ROLE_DEPARTMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_Approve")
                        .WithMany("Nav_ApproveDeparts")
                        .HasForeignKey("APPROVAL_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_COMPLAINT_LOG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE_DETAIL", "Nav_ApproveDetails")
                        .WithMany()
                        .HasForeignKey("APPROVE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApproveUser")
                        .WithMany()
                        .HasForeignKey("COMPLAINT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApproveDetails");

                    b.Navigation("Nav_ApproveUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_FORM_RELATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.PF.T_PF_VERSION_MANAGE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_CODE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_GRADE", "Nav_DefectGrade")
                        .WithMany("Nav_DefectCodes")
                        .HasForeignKey("BAD_GRADE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_CODE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DefectGrade");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_GRADE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_ECM_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION", "Nav_AppVersion")
                        .WithMany("Nav_Files")
                        .HasForeignKey("APP_VERSION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AppVersion");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_FM_NOTIFICATION_TASK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_FM_NOTIFICATION_TASK_TIME_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT", "Nav_Annourcement")
                        .WithMany("Nav_Files")
                        .HasForeignKey("ANNOURCEMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Annourcement");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT_ORG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT", "Nav_Annourcement")
                        .WithMany("Nav_Orgs")
                        .HasForeignKey("ANNOURCEMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_OrgSub")
                        .WithMany()
                        .HasForeignKey("ORG_ID_SUB")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Annourcement");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_OrgSub");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPMENU", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_MenuForm")
                        .WithMany()
                        .HasForeignKey("MENU_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPMENU", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_Picture")
                        .WithMany()
                        .HasForeignKey("PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MenuForm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_Picture");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany("Nav_ApproveDetails")
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApproveUser")
                        .WithMany()
                        .HasForeignKey("APPROVE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_ApproveUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP", "Nav_ApproveTemp")
                        .WithMany("Nav_ApproveTempDetails")
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DefaultApproveUser")
                        .WithMany()
                        .HasForeignKey("DEFAULT_APPROVE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_ApproveTemp");

                    b.Navigation("Nav_DefaultApproveUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIPLAY_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BITITLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID_CREATER")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID_CREATER")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG", "Nav_BIFile")
                        .WithMany("Nav_Files")
                        .HasForeignKey("VIDEOIMG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BIFile");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", null)
                        .WithMany("Nav_Btns")
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CLIENT_MENU", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_MenuForm")
                        .WithMany()
                        .HasForeignKey("MENU_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_CLIENT_MENU", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MenuForm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CLIENT_SCOPES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_DATA_CHANNEL", "Nav_DataChanel")
                        .WithMany("Nav_ClientScopes")
                        .HasForeignKey("DATA_CHANNEL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_SCOPES", "Nav_Scope")
                        .WithMany()
                        .HasForeignKey("SCOPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DataChanel");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Scope");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE_RUN_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CODE_RULE_SERIAL_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_COLUMN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_PageTable")
                        .WithMany("Nav_Columns")
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE_PANEL", "Nav_PageTablePanel")
                        .WithMany()
                        .HasForeignKey("PAGE_TABLE_PANEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTable");

                    b.Navigation("Nav_PageTablePanel");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_COLUMN_FILTER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_COLUMN", "Nav_Column")
                        .WithMany("Nav_Filters")
                        .HasForeignKey("COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Column");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_DATA_CHANNEL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_DATA_FREQUENCY", "Nav_DataFrequency")
                        .WithMany()
                        .HasForeignKey("DATA_FREQUENCY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", "Nav_Tenant")
                        .WithMany()
                        .HasForeignKey("TENANT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DataFrequency");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tenant");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_DATA_FREQUENCY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", "Nav_PageEdit")
                        .WithMany("Nav_Columns")
                        .HasForeignKey("PAGE_EDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT_PANEL", "Nav_PageEditPanel")
                        .WithMany()
                        .HasForeignKey("PAGE_EDIT_PANEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageEdit");

                    b.Navigation("Nav_PageEditPanel");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", "Nav_EditColumn")
                        .WithMany("Nav_FillMaps")
                        .HasForeignKey("EDIT_COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EditColumn");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP_D", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP", "Nav_EditColumnFillMap")
                        .WithMany("Nav_Details")
                        .HasForeignKey("EDIT_COLUMN_FILL_MAP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EditColumnFillMap");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILTER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", "Nav_EditColumn")
                        .WithMany("Nav_Filters")
                        .HasForeignKey("EDIT_COLUMN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EditColumn");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FDDEBACK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FDDEBACK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FDDEBACK", "Nav_FeedBack")
                        .WithMany("Nav_Files")
                        .HasForeignKey("FDDEBACK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_FeedBack");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_DB", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_DB_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE_DB", "Nav_FileDB")
                        .WithMany("Nav_Files")
                        .HasForeignKey("FILE_DB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_FileDB");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Form")
                        .WithMany()
                        .HasForeignKey("FrmId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FLOW_SCHEME", "InstanceScheme")
                        .WithMany()
                        .HasForeignKey("InstanceSchemeId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Form");

                    b.Navigation("InstanceScheme");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE_OPER_HIS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE", "FlowInstance")
                        .WithMany("OperationHistorys")
                        .HasForeignKey("InstanceId");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("FlowInstance");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE_TRANS_HIS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE", "FlowInstance")
                        .WithMany("TransitionHistorys")
                        .HasForeignKey("InstanceId");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("FlowInstance");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_SCHEME", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Form")
                        .WithMany()
                        .HasForeignKey("FrmId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "PermitForm")
                        .WithMany()
                        .HasForeignKey("PermitFrmId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Form");

                    b.Navigation("Nav_Org");

                    b.Navigation("PermitForm");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION_D", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION", "Nav_FormConfigVersion")
                        .WithMany("Nav_Details")
                        .HasForeignKey("FORM_CONFIG_VERSION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_FormConfigVersion");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_CHART", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", null)
                        .WithMany("Nav_HomeCharts")
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_HMI", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_HMI", "Nav_Hmi")
                        .WithMany()
                        .HasForeignKey("HMI_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", null)
                        .WithMany("Nav_HomeHmis")
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hmi");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_RANKING", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", null)
                        .WithMany("Nav_HomeRankings")
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_HOME_STATISTIC", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", null)
                        .WithMany("Nav_HomeStatistics")
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_QUERY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_HOME_TITLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE", "Nav_File")
                        .WithMany("Nav_ImgFiles")
                        .HasForeignKey("FILE_ID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_File");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE", "Nav_File")
                        .WithMany()
                        .HasForeignKey("FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany("Nav_Details")
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_File");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_LABEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MENU", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_MenuForm")
                        .WithMany()
                        .HasForeignKey("MENU_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_MENU", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_Picture")
                        .WithMany()
                        .HasForeignKey("PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MenuForm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_Picture");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG_THEME", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG", "Nav_MqttConfig")
                        .WithMany("Nav_MqttConfigTheme")
                        .HasForeignKey("MQTT_CONFIG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MqttConfig");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_NOTICE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_NOTICE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_NOTICE", "Nav_Notice")
                        .WithMany("Nav_Files")
                        .HasForeignKey("NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Notice");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART_PARAM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART", "Nav_PageChart")
                        .WithMany("Nav_Params")
                        .HasForeignKey("PAGE_CHART_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageChart");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CUSTOM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", "Nav_ParamScheme")
                        .WithMany("Nav_PageEdits")
                        .HasForeignKey("PARAM_SCHEME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");

                    b.Navigation("Nav_ParamScheme");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT_PANEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", "Nav_PageEdit")
                        .WithMany("Nav_Panels")
                        .HasForeignKey("PAGE_EDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageEdit");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", "Nav_ParamScheme")
                        .WithMany("Nav_PageTables")
                        .HasForeignKey("PARAM_SCHEME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");

                    b.Navigation("Nav_ParamScheme");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE_PANEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_PageTable")
                        .WithMany("Nav_Panels")
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTable");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TREE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PARAM_ITEM", "Nav_ParamItem")
                        .WithMany()
                        .HasForeignKey("PARAM_ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", "Nav_ParamScheme")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PARAM_SCHEME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ParamItem");

                    b.Navigation("Nav_ParamScheme");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_Form")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", "Nav_Picture")
                        .WithMany()
                        .HasForeignKey("PICTURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Form");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Picture");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER", "Nav_PicFilter")
                        .WithMany("Nav_PicFilterDetail")
                        .HasForeignKey("PIC_FILTER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PicFilter");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUERY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_PageForm")
                        .WithMany()
                        .HasForeignKey("PAGE_FORM_ID");

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM_QUERY", "Nav_PageFormQuery")
                        .WithMany("Nav_Querys")
                        .HasForeignKey("PAGE_FORM_QUERY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageForm");

                    b.Navigation("Nav_PageFormQuery");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUERY_APP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUESTION_FEEDBACK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_SCOPES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_TABLE_PARAMS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", "Nav_PageTable")
                        .WithMany("Nav_TableParams")
                        .HasForeignKey("PAGE_TABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTable");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_TREE_COLUMN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_PAGE_TREE", "Nav_PageTree")
                        .WithMany("Nav_Columns")
                        .HasForeignKey("PAGE_TREE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PageTree");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_VERSION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.DataUpdateRecord", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_FM_ORGANIZATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_PF_CODE_RULE_SERIAL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REASON_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_TYPE", "Nav_AccidentType")
                        .WithMany()
                        .HasForeignKey("ACCIDENT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AccidentType");

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_Report")
                        .WithMany("Nav_Files")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Report");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_KIND", "Nav_AccidentKind")
                        .WithMany()
                        .HasForeignKey("KIND_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_EventReport")
                        .WithMany("Nav_ListAccidentListKind")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AccidentKind");

                    b.Navigation("Nav_EventReport");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListAdmPunishment")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListCasualties")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT", "Nav_DamageObject")
                        .WithMany()
                        .HasForeignKey("DAMAGE_OBJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListSurveyDamageObject")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DamageObject");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", "Nav_Equipment")
                        .WithMany()
                        .HasForeignKey("EQUIPMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", "Nav_Facilities")
                        .WithMany()
                        .HasForeignKey("FACILITIES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListEquipmentLoss")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Equipment");

                    b.Navigation("Nav_Facilities");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_FilesSurvey")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListForensics")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS", "Nav_SurveyForensics")
                        .WithMany("Nav_FilesSurvey")
                        .HasForeignKey("SURVEY_FORENSICS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyForensics");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_PFILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_FilesP")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", "Nav_SurveyResult")
                        .WithMany("Nav_ListReason")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON", "Nav_SurveyReason")
                        .WithMany("Nav_ListReasonType")
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REASON_TYPE", "Nav_ReasonType")
                        .WithMany()
                        .HasForeignKey("REASON_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ReasonType");

                    b.Navigation("Nav_SurveyReason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_AccidentEventReport")
                        .WithMany()
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_RiskSubmit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AccidentEventReport");

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskSubmit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_KIND", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_LEVEL_DAYS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", "Nav_TeamMember")
                        .WithMany("Nav_DeputyLeaderUser")
                        .HasForeignKey("TEAM_MEMBER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamMember");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LeaderUser")
                        .WithMany()
                        .HasForeignKey("LEADER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_AccidentEventReport")
                        .WithMany()
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_SurveyUser")
                        .WithMany()
                        .HasForeignKey("SURVEY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AccidentEventReport");

                    b.Navigation("Nav_LeaderUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", "Nav_TeamMember")
                        .WithMany("Nav_TeamMembers")
                        .HasForeignKey("TEAM_MEMBER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamMember");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_DOSET_DEPARTMENT_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_Accident")
                        .WithMany()
                        .HasForeignKey("ACCIDENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LeaderUser")
                        .WithMany()
                        .HasForeignKey("LEADER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", "Nav_TeamMember")
                        .WithMany()
                        .HasForeignKey("TEAM_MEMBER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Accident");

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_LeaderUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamMember");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_ACC_FILES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", "Nav_Record")
                        .WithMany("Nav_FilesAcc")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_ASK_USERS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", "Nav_Record")
                        .WithMany("Nav_UsersAsk")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_CHART_FILES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", "Nav_Record")
                        .WithMany("Nav_FilesChart")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", "Nav_Record")
                        .WithMany("Nav_UsersInvestigation")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD_NOTES_FILES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", "Nav_Record")
                        .WithMany("Nav_NotesFilesNotes")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_ACTIVE_USER_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSCHECKTYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSCHECKTYPE_YEAR", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSRISK_INFO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECKTYPE_YEAR", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_BSSAFECHECK_YEAR", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_CLOSE_TASKS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HOME_BSRISKREASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISKCHANGE_PEC", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISK_COUNT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_HRISK_TOP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_LOGIN_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RISK_LEVEL1", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RISK_LEVEL2", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ParentDepartment")
                        .WithMany()
                        .HasForeignKey("PARENT_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ParentDepartment");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_RUNLOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_SAFETASK_FINISH", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_SUMMARY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BI.T_BI_TRAIN_PLAN_COUNT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", "Nav_Content")
                        .WithMany("Nav_ListContentCheckTypes")
                        .HasForeignKey("CHECK_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("Nav_CheckProjectCategoryID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE_LEVEL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE", "Nav_CheckContentCheckType")
                        .WithMany("Nav_ListContentCheckTypeLevels")
                        .HasForeignKey("CHECK_CONTENT_CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("T_BS_CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckContentCheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_HM_RISK_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", "Nav_Content")
                        .WithMany("Nav_ListContentAreas")
                        .HasForeignKey("CHECK_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("HM_RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_MAIN_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", "Nav_Main")
                        .WithMany("Nav_ListMainDep")
                        .HasForeignKey("MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Main");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_QUESTION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", "Nav_Content")
                        .WithMany("Nav_ListContentQuestions")
                        .HasForeignKey("CHECK_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_PROJECT_CATEGORY", "Nav_CheckProjectProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_CheckQuestion")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_CheckProjectProjectCategory");

                    b.Navigation("Nav_CheckQuestion");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN_LAW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", "Nav_Main")
                        .WithMany("Nav_ListLaw")
                        .HasForeignKey("CHECK_MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_Standard")
                        .WithMany()
                        .HasForeignKey("STANDARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Main");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Standard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY_CHECKTYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_ProjectCategory")
                        .WithMany("Nav_ListCategoryType")
                        .HasForeignKey("PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProjectCategory");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY_OBJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_ProjectCategory")
                        .WithMany("Nav_ListOBJECT")
                        .HasForeignKey("PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProjectCategory");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_PROJECT_CATEGORY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany("Nav_ListCheckProjectProjectCategory")
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany("Nav_ListCheckQuestion")
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany("Nav_ListCheckTypeLevel")
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", "Nav_Enums")
                        .WithMany()
                        .HasForeignKey("CheckLevel_ENUMS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_MINETYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany("Nav_ListMineType")
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", "Nav_Enums")
                        .WithMany()
                        .HasForeignKey("MINETYPE_ENUMS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_DEPARTMENT_AREAOBJECT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENTID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_OPERATE_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserSend")
                        .WithMany()
                        .HasForeignKey("USER_ID_SEND")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserSend");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListArea")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_DEPARTMENT_OUT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListDepOut")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_DEP_OBJECT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListSetDepObject")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET_OBJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListSetObject")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_CATEGORY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_LEVEL_DELAY_DAYS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_Check")
                        .WithMany()
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserActualDeal")
                        .WithMany()
                        .HasForeignKey("ACTUAL_DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", "Nav_CheckMain")
                        .WithMany()
                        .HasForeignKey("CHECK_MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_PROJECT_CATEGORY", "Nav_CheckProjectProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserCheck")
                        .WithMany()
                        .HasForeignKey("CHECK_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany("Nav_ListRiskSubmitContent")
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", "Nav_SubmitNotice")
                        .WithMany("Nav_ListRiskSubmitContent")
                        .HasForeignKey("RISK_SUBMIT_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", "Nav_SubmitNoticePerson")
                        .WithMany("Nav_ListRiskSubmitContent")
                        .HasForeignKey("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_Submit")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_CheckMain");

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_CheckProjectProjectCategory");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentDeal");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RiskArea");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_SafeCheckDetail");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitNotice");

                    b.Navigation("Nav_SubmitNoticePerson");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserActualDeal");

                    b.Navigation("Nav_UserCheck");

                    b.Navigation("Nav_UserDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_BACK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserActualDeal")
                        .WithMany()
                        .HasForeignKey("ACTUAL_DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", "Nav_CheckMain")
                        .WithMany()
                        .HasForeignKey("CHECK_MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserCheck")
                        .WithMany()
                        .HasForeignKey("CHECK_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_SubmitContent")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", "Nav_SubmitNoticePerson")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_CheckMain");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentDeal");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_SafeCheckDetail");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitContent");

                    b.Navigation("Nav_SubmitNoticePerson");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserActualDeal");

                    b.Navigation("Nav_UserCheck");

                    b.Navigation("Nav_UserDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserActualDeal")
                        .WithMany()
                        .HasForeignKey("ACTUAL_DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserCheck")
                        .WithMany()
                        .HasForeignKey("CHECK_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_SubmitContent")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", "Nav_SubmitNotice")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", "Nav_SubmitNoticePerson")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitContent");

                    b.Navigation("Nav_SubmitNotice");

                    b.Navigation("Nav_SubmitNoticePerson");

                    b.Navigation("Nav_UserActualDeal");

                    b.Navigation("Nav_UserCheck");

                    b.Navigation("Nav_UserDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", "Nav_RiskSubmitContentDeal")
                        .WithMany("Nav_FilesAfter")
                        .HasForeignKey("RISK_SUBMIT_CONTENT_DEAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskSubmitContentDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", "Nav_RiskSubmitContentDeal")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_SUBMIT_CONTENT_DEAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskSubmitContentDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", "Nav_ContentDeal")
                        .WithMany("Nav_ListCheckUserSign")
                        .HasForeignKey("SUBMIT_CONTENT_DEAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("SUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ContentDeal");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", "Nav_ContentDeal")
                        .WithMany("Nav_ListUserSign")
                        .HasForeignKey("SUBMIT_CONTENT_DEAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("SUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ContentDeal");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_RiskSubmitContent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_RiskSubmit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_BACK", null)
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_BS_RISK_SUBMIT_CONTENT_BACKID");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskSubmit");

                    b.Navigation("Nav_RiskSubmitContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_REASON", "Nav_RiskReason")
                        .WithMany()
                        .HasForeignKey("RISK_REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_RiskSubmitContent")
                        .WithMany("Nav_ListRiskQuestionReason")
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_BACK", null)
                        .WithMany("Nav_ListRiskQuestionReason")
                        .HasForeignKey("T_BS_RISK_SUBMIT_CONTENT_BACKID");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskReason");

                    b.Navigation("Nav_RiskSubmitContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_TEMP", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_CheckQuestion")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_SubmitContent")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserAudit")
                        .WithMany()
                        .HasForeignKey("USER_ID_AUDIT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID_EDIT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_CheckQuestion");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskArea");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_SafeCheckDetail");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitContent");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserAudit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentApply")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_SubmitContent")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", "Nav_SubmitNoticePerson")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_DepartmentApply");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitContent");

                    b.Navigation("Nav_SubmitNoticePerson");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", "Nav_SubmitContent")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY", "Nav_Apply")
                        .WithMany("Nav_ListApplyDetail")
                        .HasForeignKey("RISK_SUBMIT_DELAY_APPLY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", "Nav_SubmitNoticePerson")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Apply");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_SubmitContent");

                    b.Navigation("Nav_SubmitNoticePerson");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_RiskSubmit")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskSubmit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Submit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", "Nav_Submit")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", "Nav_SubmitNotice")
                        .WithMany()
                        .HasForeignKey("RISK_SUBMIT_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_SubmitNotice");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_TPM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_ApproveCheckAudit")
                        .WithMany()
                        .HasForeignKey("APPROVE_CHECKAUDIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP", "Nav_ApproveTemp")
                        .WithMany()
                        .HasForeignKey("APPROVE_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE_LEVEL", "Nav_CheckTypeLevel")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENTID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", "Nav_PlanSet")
                        .WithMany()
                        .HasForeignKey("PLAN_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_Check")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USERID_DOPLAN")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_ApproveCheckAudit");

                    b.Navigation("Nav_ApproveTemp");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", "Nav_CheckMain")
                        .WithMany()
                        .HasForeignKey("CHECK_MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_PROJECT_CATEGORY", "Nav_CheckProjectProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_CheckQuestion")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_CheckArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_ListSafeCheckDetail")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckArea");

                    b.Navigation("Nav_CheckMain");

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_CheckProjectProjectCategory");

                    b.Navigation("Nav_CheckQuestion");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_LAW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_ListLaw")
                        .HasForeignKey("CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_Standard")
                        .WithMany()
                        .HasForeignKey("STANDARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Standard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_QUESTION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany("Nav_ListCheckDetailQuestion")
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_SafeCheckDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REASON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_ListCheckDetailReason")
                        .HasForeignKey("CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_RISK_REASON", "Nav_RiskReason")
                        .WithMany()
                        .HasForeignKey("RISK_REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskReason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_Check")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT", "Nav_Reject")
                        .WithMany("Nav_Files")
                        .HasForeignKey("REJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reject");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany("Nav_ListCheckDetailUser")
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_SafeCheckDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_PROJECT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", "Nav_CheckProject")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_ListCheckProject")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckProject");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_PROJECT_CATEGORY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", "Nav_CheckProjectCategory")
                        .WithMany()
                        .HasForeignKey("CHECK_PROJECT_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_ListCheckProjectCategory")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckProjectCategory");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", "Nav_SafeCheckDetail")
                        .WithMany()
                        .HasForeignKey("SAFE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD", "Nav_CheckRecord")
                        .WithMany("Nav_ListRecordDetail")
                        .HasForeignKey("SAFE_CHECK_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheckDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RISK_AREA", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_ListCheckRiskArea")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskArea");

                    b.Navigation("Nav_SafeCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_USERSIGN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", "Nav_SafeCheck")
                        .WithMany("Nav_ListCheckUserSign")
                        .HasForeignKey("SAFE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("SUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeCheck");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE_PROJECT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE", "Nav_Evaluate")
                        .WithMany("Nav_ListProject")
                        .HasForeignKey("EVALUATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_ABILITY_PROJECT", "Nav_EvaluateProject")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluate");

                    b.Navigation("Nav_EvaluateProject");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE", "Nav_AbilityEvaluate")
                        .WithMany("Nav_Users")
                        .HasForeignKey("ABILITY_EVALUATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AbilityEvaluate");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_PROJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_CONFIG", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_CONTINGENCY_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_COVERAGE_INFLUENCE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE_ITEM_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE", "Nav_Estimate")
                        .WithMany("Nav_ListEstimateRecord")
                        .HasForeignKey("ESTIMEATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE_ITEM_TYPE", "Nav_Item")
                        .WithMany()
                        .HasForeignKey("ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Estimate");

                    b.Navigation("Nav_Item");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_NAME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_NAME", "Nav_Name")
                        .WithMany()
                        .HasForeignKey("NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN", "Nav_PLAN")
                        .WithMany("Nav_listPlanDetail")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Name");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PLAN");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_STANDARD_CREATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", "Nav_Plan")
                        .WithMany("Nav_ListStandard")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_StandardCreate")
                        .WithMany()
                        .HasForeignKey("STANDARD_CREATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_StandardCreate");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_NAME", "Nav_Name")
                        .WithMany()
                        .HasForeignKey("NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", "Nav_PlanDetail")
                        .WithMany()
                        .HasForeignKey("PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserManage")
                        .WithMany()
                        .HasForeignKey("USER_ID_MANAGE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserRecord")
                        .WithMany()
                        .HasForeignKey("USER_ID_RECORD")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Name");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanDetail");

                    b.Navigation("Nav_UserManage");

                    b.Navigation("Nav_UserRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany("Nav_ListDepartment")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany("Nav_FilesRecord")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_SUMMARY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany("Nav_FilesSummary")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_USER_ESTIMATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany("Nav_ListUserEstimate")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_SUMMARY_REQUIREMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
                        .WithMany("Nav_ListSummaryRequirement")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE", "Nav_TypeRequirement")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_TypeRequirement");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY", "Nav_EQDSurvey")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("DEMAND_SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", "Nav_MaterialLibrary")
                        .WithMany()
                        .HasForeignKey("LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", "Nav_SurveyMaster")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("SURVEY_MASTER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_TYPE", "Nav_MaterialType")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EQDSurvey");

                    b.Navigation("Nav_MaterialLibrary");

                    b.Navigation("Nav_MaterialType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyMaster");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY", "Nav_EQDSurvey")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEMAND_SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EQDSurvey");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", "Nav_SurveyMaster")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SURVEY_MASTER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyMaster");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EVENT_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARMTNET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_TYPE", "Nav_MaterialType")
                        .WithMany()
                        .HasForeignKey("MATERIAL_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_MaterialType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", "Nav_MaterialLibrary")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MATERIAL_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_MaterialLibrary");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", "Nav_Material")
                        .WithMany()
                        .HasForeignKey("MATERIAL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_DETAIL", "Nav_Detail")
                        .WithMany()
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_RECORD", "Nav_Record")
                        .WithMany("Nav_listDetail")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Material");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", "Nav_Mastera")
                        .WithMany()
                        .HasForeignKey("MASTERA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", "Nav_Material")
                        .WithMany()
                        .HasForeignKey("MATERIAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_RECORD", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserOperate")
                        .WithMany()
                        .HasForeignKey("USER_ID_OPERATE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Mastera");

                    b.Navigation("Nav_Material");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserOperate");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_TYPE", "Nav_AccidentType")
                        .WithMany()
                        .HasForeignKey("ACCIDENT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentReport")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID_REPORT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_Event")
                        .WithMany()
                        .HasForeignKey("EVENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserManage")
                        .WithMany()
                        .HasForeignKey("USER_ID_MANAGE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserReport")
                        .WithMany()
                        .HasForeignKey("USER_ID_REPORT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AccidentType");

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentReport");

                    b.Navigation("Nav_Event");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserManage");

                    b.Navigation("Nav_UserReport");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_CONDITION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_CONDITIONS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_CONDITION", "Nav_RspEstimateCondition")
                        .WithMany()
                        .HasForeignKey("CONDITION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", "Nav_RspEstimate")
                        .WithMany("Nav_ListRspConditions")
                        .HasForeignKey("ESTIMATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RspEstimate");

                    b.Navigation("Nav_RspEstimateCondition");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_ESTIMATE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", "Nav_RspEstimate")
                        .WithMany("Nav_ListEstimate")
                        .HasForeignKey("ESTIMATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RspEstimate");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_EVENT_KIND", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", "Nav_RspEstimate")
                        .WithMany("Nav_ListEventKind")
                        .HasForeignKey("ESTIMATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_KIND", "Nav_RspAccdentKind")
                        .WithMany()
                        .HasForeignKey("KIND_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RspAccdentKind");

                    b.Navigation("Nav_RspEstimate");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE_JOIN_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", "Nav_RspEstimate")
                        .WithMany("Nav_ListJoin")
                        .HasForeignKey("ESTIMATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RspEstimate");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_AREAR_INFLUENCE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_COVERAGE_INFLUENCE", "Nav_CoverageInfluence")
                        .WithMany()
                        .HasForeignKey("COVERAGE_INFLUENCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", "Nav_UrgentEvent")
                        .WithMany("Nav_ListArearInfluence")
                        .HasForeignKey("URGENT_EVENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CoverageInfluence");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UrgentEvent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_EVENT_TYPE", "Nav_EventType")
                        .WithMany()
                        .HasForeignKey("EVENT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EventType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT_CONTINGENCY_PLAN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_CONTINGENCY_TYPE", "Nav_ContingencyType")
                        .WithMany()
                        .HasForeignKey("CONTINGENCY_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", "Nav_UrgentEvent")
                        .WithMany("Nav_ListEventContingencyPlan")
                        .HasForeignKey("URGENT_EVENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ContingencyType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UrgentEvent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT_RISK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_RiskType")
                        .WithMany()
                        .HasForeignKey("RISK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", "Nav_UrgentEvent")
                        .WithMany("Nav_ListEventRiskType")
                        .HasForeignKey("URGENT_EVENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskType");

                    b.Navigation("Nav_UrgentEvent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_CATEGORY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_CATEGORY", "Nav_Category")
                        .WithMany()
                        .HasForeignKey("CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_Device")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UserPost")
                        .WithMany()
                        .HasForeignKey("USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_UseDepartment")
                        .WithMany()
                        .HasForeignKey("USE_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UseUser")
                        .WithMany()
                        .HasForeignKey("USE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UseUserPost")
                        .WithMany()
                        .HasForeignKey("USE_USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Category");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_UseDepartment");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserPost");

                    b.Navigation("Nav_UseUser");

                    b.Navigation("Nav_UseUserPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany("Nav_ListCheck")
                        .HasForeignKey("DEVICEBASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", null)
                        .WithMany("Nav_ListCheckCircle")
                        .HasForeignKey("T_DM_DEVICE_BASEID");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK", "Nav_DeviceBaseCheck")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("BASECHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DeviceBaseCheck");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany("Nav_Inspection")
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany("Nav_Overhaul")
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL", "Nav_FileParent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("FILE_PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_FileParent");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_CATEGORY", "Nav_Category")
                        .WithMany()
                        .HasForeignKey("CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE", "Nav_DevicePurchase")
                        .WithMany("Nav_Details")
                        .HasForeignKey("DEVICE_PURCHASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ManageUser")
                        .WithMany()
                        .HasForeignKey("MANAGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Category");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_DevicePurchase");

                    b.Navigation("Nav_ManageUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL", "Nav_PurchaseDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_PURCHASE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PurchaseDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL_RECEIPT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL", "Nav_PurchaseDetail")
                        .WithMany("Nav_ReceiptFiles")
                        .HasForeignKey("DEVICE_PURCHASE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PurchaseDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICEBASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING", "Nav_Scheduling")
                        .WithMany()
                        .HasForeignKey("SCHEDULIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Scheduling");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK", "Nav_BaseCheck")
                        .WithMany()
                        .HasForeignKey("BASECHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", "Nav_DeviceCheck")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("DEVICE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BaseCheck");

                    b.Navigation("Nav_DeviceCheck");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_DetailFiles")
                        .HasForeignKey("CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", "Nav_Check")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", "Nav_Check")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", "Nav_Check")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICEBASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLANID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_MAINTENANCE_CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", "Nav_Check")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICEBASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", "Nav_Plan")
                        .WithMany("Nav_PlanDetails")
                        .HasForeignKey("DEVICE_MAINTENANCE_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", "Nav_Plan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PPLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR", "Nav_Repair")
                        .WithMany()
                        .HasForeignKey("REPAIR_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Repair");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL", "Nav_Overhaul")
                        .WithMany("Nav_Files")
                        .HasForeignKey("OVERHAUL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Overhaul");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE", "Nav_Purchase")
                        .WithMany()
                        .HasForeignKey("BASE_PURCHASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Purchase");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_CATEGORY", "Nav_Category")
                        .WithMany()
                        .HasForeignKey("CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE", "Nav_DevicePurchase")
                        .WithMany("Nav_Details")
                        .HasForeignKey("DEVICE_PURCHASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ManageUser")
                        .WithMany()
                        .HasForeignKey("MANAGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Category");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_DevicePurchase");

                    b.Navigation("Nav_ManageUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL", "Nav_PurchaseDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_PURCHASE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PurchaseDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL_RECEIPT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL", "Nav_PurchaseDetail")
                        .WithMany("Nav_ReceiptFiles")
                        .HasForeignKey("DEVICE_PURCHASE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PurchaseDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Repair_Charge_User")
                        .WithMany()
                        .HasForeignKey("REPAIR_CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Repair_User")
                        .WithMany()
                        .HasForeignKey("REPAIR_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Repair_Charge_User");

                    b.Navigation("Nav_Repair_User");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR", "Nav_Repair")
                        .WithMany("Nav_Files")
                        .HasForeignKey("REPAIR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Repair");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_SCRAP", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICEBASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN_CONTENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN", "Nav_TimeSet")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("TIME_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TimeSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_DepartmentPost")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Editor")
                        .WithMany()
                        .HasForeignKey("EDITOR_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentPost");

                    b.Navigation("Nav_Editor");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_AFTER_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", "Nav_ChangeShiftRecord")
                        .WithMany("Nav_AfterUsers")
                        .HasForeignKey("CHANGE_SHIFT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChangeShiftRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", "Nav_ChangeShiftRecord")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CHANGE_SHIFT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChangeShiftRecord");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD_PRE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", "Nav_ChangeShiftRecord")
                        .WithMany("Nav_PreUsers")
                        .HasForeignKey("CHANGE_SHIFT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChangeShiftRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_DEAL_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_DealMeasures")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", "Nav_JobScheme")
                        .WithMany()
                        .HasForeignKey("JOB_SCHEME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MonitorUser")
                        .WithMany()
                        .HasForeignKey("MONITOR_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany()
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("TERRITORY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_JobScheme");

                    b.Navigation("Nav_MonitorUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", "Nav_JobScheme")
                        .WithMany()
                        .HasForeignKey("JOB_SCHEME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MonitorUser")
                        .WithMany()
                        .HasForeignKey("MONITOR_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany()
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("TERRITORY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_JobScheme");

                    b.Navigation("Nav_MonitorUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_Risks")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_DEAL_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_DealMeasures")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_CrucialLicensePerson")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_Risks")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_SafeConfirms")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_SafeMeasures")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_CrucialLicensePerson")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", "Nav_Train")
                        .WithMany()
                        .HasForeignKey("TRAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Train");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_SafeConfirms")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_SAFE_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_CrucialLicenseJob")
                        .WithMany("Nav_SafeMeasures")
                        .HasForeignKey("CRUCIAL_LICENSE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CrucialLicenseJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("CLASS_TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_DepartmentPost")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Editor")
                        .WithMany()
                        .HasForeignKey("EDITOR_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentPost");

                    b.Navigation("Nav_Editor");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", "Nav_CurrentClassRecord")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CURRENT_CLASS_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CurrentClassRecord");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", "Nav_CurrentClassRecord")
                        .WithMany("Nav_LabourSupplies")
                        .HasForeignKey("CURRENT_CLASS_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LABOUR_SUPPLY", "Nav_LabourSupply")
                        .WithMany()
                        .HasForeignKey("Nav_LabourSupplyID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CurrentClassRecord");

                    b.Navigation("Nav_LabourSupply");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", "Nav_CurrentClassRecord")
                        .WithMany("Nav_Users")
                        .HasForeignKey("CURRENT_CLASS_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CurrentClassRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_EDUCATIONAL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_ALLOWFILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", "Nav_Company")
                        .WithMany("Nav_AllowFiles")
                        .HasForeignKey("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", "Nav_Company")
                        .WithMany("Nav_Files")
                        .HasForeignKey("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_SAFEFILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", "Nav_Company")
                        .WithMany("Nav_SafeFiles")
                        .HasForeignKey("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_UNIT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", "Nav_Company")
                        .WithMany("Nav_ProUnits")
                        .HasForeignKey("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION_WORKFILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", "Nav_Company")
                        .WithMany("Nav_WorkFiles")
                        .HasForeignKey("ENTERPRISE_INFORMATION_REGISTRATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Company")
                        .WithMany()
                        .HasForeignKey("COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DispatchUser")
                        .WithMany()
                        .HasForeignKey("DISPATCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_FireDepartment")
                        .WithMany()
                        .HasForeignKey("FIRE_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_FireUser")
                        .WithMany()
                        .HasForeignKey("FIRE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MonitorUser")
                        .WithMany()
                        .HasForeignKey("MONITOR_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_SafeUser")
                        .WithMany()
                        .HasForeignKey("SAFE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_DispatchUser");

                    b.Navigation("Nav_FireDepartment");

                    b.Navigation("Nav_FireUser");

                    b.Navigation("Nav_MonitorUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_SafeUser");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_Details")
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailFiles")
                        .HasForeignKey("FIRE_JOB_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_Files")
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_FIRE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_FireFiles")
                        .HasForeignKey("FIRE_JOB_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_MONITOR_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_MonitorFiles")
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_Risks")
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany("Nav_Users")
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", "Nav_Train")
                        .WithMany()
                        .HasForeignKey("TRAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_TYPE", "Nav_UserType")
                        .WithMany()
                        .HasForeignKey("USER_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Train");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER", "Nav_Job")
                        .WithMany("Nav_UserFiles")
                        .HasForeignKey("FIRE_JOB_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Company")
                        .WithMany()
                        .HasForeignKey("COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DispatchUser")
                        .WithMany()
                        .HasForeignKey("DISPATCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MonitorUser")
                        .WithMany()
                        .HasForeignKey("MONITOR_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany()
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_DispatchUser");

                    b.Navigation("Nav_MonitorUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_Related");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_Details")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailFiles")
                        .HasForeignKey("FIRE_JOB_WB_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_Files")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FIRE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_FireFiles")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_FIRE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_FireUser")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_MONITOR_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_MonitorFiles")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_Risks")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_SAFE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_SafeUser")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", "Nav_Job")
                        .WithMany("Nav_Users")
                        .HasForeignKey("FIRE_JOB_WB_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_TYPE", "Nav_UserType")
                        .WithMany()
                        .HasForeignKey("USER_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER", "Nav_JobUser")
                        .WithMany("Nav_UserFiles")
                        .HasForeignKey("FIRE_JOB_WB_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_JobUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER_SIGN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER", "Nav_JobUser")
                        .WithMany("Nav_Signs")
                        .HasForeignKey("FIRE_JOB_WB_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_JobUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS", "Nav_Holidays")
                        .WithMany("Nav_Details")
                        .HasForeignKey("HOLIDAYS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Holidays");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", "Nav_JobActivityRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("JOB_ACTIVITY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobActivityRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_DETAIL", "Nav_Details")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_ACTIVITY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", "Nav_JobActivityRecord")
                        .WithMany("Nav_Flow")
                        .HasForeignKey("JOB_ACTIVITY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobActivityRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW", "Nav_Flow")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_ACTIVITY_FLOW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Flow");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", "Nav_JobActivityRecord")
                        .WithMany("Nav_Measure")
                        .HasForeignKey("JOB_ACTIVITY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobActivityRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE", "Nav_Measure")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_ACTIVITY_MEASURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Measure");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", "Nav_JobActivityRecord")
                        .WithMany("Nav_JobActivityPerson")
                        .HasForeignKey("JOB_ACTIVITY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_RelatedUser")
                        .WithMany()
                        .HasForeignKey("RELATED_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_JobActivityRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RelatedUser");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_JobName")
                        .WithMany()
                        .HasForeignKey("JOB_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_JobNameOut")
                        .WithMany()
                        .HasForeignKey("JOB_NAME_OUTSOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", "Nav_TechDisclosure")
                        .WithMany()
                        .HasForeignKey("TECH_DISCLOSURE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_JobName");

                    b.Navigation("Nav_JobNameOut");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", "Nav_JobEventRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("JOB_EVENT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobEventRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_DETAIL", "Nav_Details")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_EVENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", "Nav_JobEventRecord")
                        .WithMany("Nav_Flow")
                        .HasForeignKey("JOB_EVENT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobEventRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW", "Nav_Flow")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_EVENT_FLOW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Flow");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", "Nav_JobEventRecord")
                        .WithMany("Nav_Measure")
                        .HasForeignKey("JOB_EVENT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobEventRecord");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE", "Nav_Measure")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_FO_JOB_EVENT_MEASURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Measure");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", "Nav_JobEventRecord")
                        .WithMany("Nav_JobEventPerson")
                        .HasForeignKey("JOB_EVENT_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_JobEventRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LABOUR_SUPPLY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Company")
                        .WithMany()
                        .HasForeignKey("COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_AFTERUSER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AfterUser")
                        .WithMany()
                        .HasForeignKey("AFTER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", "Nav_Record")
                        .WithMany("Nav_AfterUsers")
                        .HasForeignKey("LEADER_WELL_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AfterUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("LEADER_WELL_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_AFTERUSER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AfterUser")
                        .WithMany()
                        .HasForeignKey("AFTER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", "Nav_Detail")
                        .WithMany("Nav_AfterUsers")
                        .HasForeignKey("LEADER_WELL_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AfterUser");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailAreas")
                        .HasForeignKey("LEADER_WELL_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailFiles")
                        .HasForeignKey("LEADER_WELL_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL_PREUSER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", "Nav_Detail")
                        .WithMany("Nav_PreUsers")
                        .HasForeignKey("LEADER_WELL_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_PreUser")
                        .WithMany()
                        .HasForeignKey("PRE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("LEADER_WELL_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_PREUSER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", "Nav_Record")
                        .WithMany("Nav_PreUsers")
                        .HasForeignKey("LEADER_WELL_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_PreUser")
                        .WithMany()
                        .HasForeignKey("PRE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreUser");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("LEADER_WELL_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("LANUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", "Nav_PreOperSch")
                        .WithMany("Nav_PreOperSchFile")
                        .HasForeignKey("PRE_OPER_SCH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreOperSch");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", "Nav_PreOperSch")
                        .WithMany("Nav_PreOperSchUser")
                        .HasForeignKey("PRE_OPER_SCH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_RealDepartmentPost")
                        .WithMany()
                        .HasForeignKey("REAL_DEPARTMENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreOperSch");

                    b.Navigation("Nav_RealDepartmentPost");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Monitor")
                        .WithMany()
                        .HasForeignKey("MONITOR_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Monitor");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Team");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_PreShiftMeetingRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PRE_SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreShiftMeetingRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL", "Nav_PreShiftMeetingDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("PRE_SHIFT_MEETING_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_PreShiftMeetingDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_PreShiftMeetingRecord")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PRE_SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreShiftMeetingRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_PreShiftMeetingRecord")
                        .WithMany("Nav_Users")
                        .HasForeignKey("PRE_SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_RealDepartmentPost")
                        .WithMany()
                        .HasForeignKey("REAL_DEPARTMENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PreShiftMeetingRecord");

                    b.Navigation("Nav_RealDepartmentPost");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_CATEGORY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Company")
                        .WithMany()
                        .HasForeignKey("COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_EDUCATIONAL", "Nav_Educational")
                        .WithMany()
                        .HasForeignKey("EDUCATIONAL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_CATEGORY", "Nav_Category")
                        .WithMany()
                        .HasForeignKey("PROFESSIONAL_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_POST", "Nav_TechPost")
                        .WithMany()
                        .HasForeignKey("TECH_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Category");

                    b.Navigation("Nav_Company");

                    b.Navigation("Nav_Educational");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechPost");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_CertificateFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_EducationalFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_MedicalFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_OTHER_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_OtherFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_POST_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_PostFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_TRAIN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", "Nav_Professional")
                        .WithMany("Nav_TrainFiles")
                        .HasForeignKey("PROFESSIONAL_RESUME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Professional");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
                        .WithMany()
                        .HasForeignKey("CLASS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Driver")
                        .WithMany()
                        .HasForeignKey("DRIVER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Tech")
                        .WithMany()
                        .HasForeignKey("TECH_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Class");

                    b.Navigation("Nav_Driver");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tech");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE", "Nav_Template")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SCHEDULING_TEMPLATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Template");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("NOTE_AKER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Taem")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MainUser")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MainUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Taem");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY", "Nav_TeamActivity")
                        .WithMany("Nav_TeamActivityFile")
                        .HasForeignKey("TEAM_ACTIVITY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamActivity");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY", "Nav_TeamActivity")
                        .WithMany("Nav_TeamActivityUser")
                        .HasForeignKey("TEAM_ACTIVITY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamActivity");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_SLOGAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", "Nav_Team")
                        .WithMany()
                        .HasForeignKey("TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Team");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", "Nav_TechDisclosure")
                        .WithMany("Nav_Files")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DisclosuredPerson")
                        .WithMany()
                        .HasForeignKey("DISCLOSURED_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DisclosurePerson")
                        .WithMany()
                        .HasForeignKey("DISCLOSURE_PERSON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_FireJob")
                        .WithMany()
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", "Nav_JobName")
                        .WithMany()
                        .HasForeignKey("JOB_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", "Nav_JobNameOut")
                        .WithMany()
                        .HasForeignKey("JOB_NAME_OUTSOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DisclosuredPerson");

                    b.Navigation("Nav_DisclosurePerson");

                    b.Navigation("Nav_FireJob");

                    b.Navigation("Nav_JobName");

                    b.Navigation("Nav_JobNameOut");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", "Nav_Job")
                        .WithMany()
                        .HasForeignKey("FIRE_JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE", "Nav_TechDisclosure")
                        .WithMany("Nav_Files")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE", "Nav_TechDisclosure")
                        .WithMany("Nav_Person")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH", "Nav_TechDisclosure")
                        .WithMany("Nav_Files")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH", "Nav_TechDisclosure")
                        .WithMany("Nav_Person")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TechDisclosure");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_PERSON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_RelatedUser")
                        .WithMany()
                        .HasForeignKey("RELATED_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", "Nav_TechDisclosure")
                        .WithMany("Nav_Person")
                        .HasForeignKey("TECH_DISCLOSURE_FROM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RelatedUser");

                    b.Navigation("Nav_TechDisclosure");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_CATEGORY", "Nav_Category")
                        .WithMany()
                        .HasForeignKey("PROFESSIONAL_CATEGORY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Category");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_USER_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ANALYSIS_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", "Nav_LicenseAnalysis")
                        .WithMany("Nav_AnalysisPerson")
                        .HasForeignKey("LICENSE_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_LicenseAnalysis");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_ANALYSIS_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL", "Nav_Details")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CRUCIAL_TASK_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_ANALYSIS_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", "Nav_CrucialTaskAnalysis")
                        .WithMany("Nav_CrucialAnalysisPerson")
                        .HasForeignKey("CRUCIAL_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CrucialTaskAnalysis");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_OperationAnalyze")
                        .WithMany()
                        .HasForeignKey("OPERATION_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationAnalyze");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", "Nav_CrucialTaskAnalysis")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CRUCIAL_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_CrucialTaskAnalysis");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL", "Nav_Details")
                        .WithMany("Nav_DetailRisk")
                        .HasForeignKey("CRUCIAL_TASK_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentLiable")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MONITOR_MEASURES", "Nav_MonitorMeasures")
                        .WithMany()
                        .HasForeignKey("MONITOR_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OCCUPATIONAL_RISK", "Nav_OccupationalRisk")
                        .WithMany()
                        .HasForeignKey("OCCUPATIONALRISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_PostLiable")
                        .WithMany()
                        .HasForeignKey("POST_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DepartmentLiable");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_MonitorMeasures");

                    b.Navigation("Nav_OccupationalRisk");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostLiable");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardDepartment")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_EDUCATION_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", "Nav_EducationMeasures")
                        .WithMany()
                        .HasForeignKey("EDUCATION_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardEducationMeasures")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EducationMeasures");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_EMERGENCY_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", "Nav_EmergencyMeasures")
                        .WithMany()
                        .HasForeignKey("EMERGENCY_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardEmergencyMeasures")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EmergencyMeasures");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_ENGINEERING_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", "Nav_EngineeringMeasures")
                        .WithMany()
                        .HasForeignKey("ENGINEERING_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardEngineeringMeasures")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EngineeringMeasures");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_INDIVIDUAL_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardIndividualMeasures")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", "Nav_IndividualMeasures")
                        .WithMany()
                        .HasForeignKey("INDIVIDUAL_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_IndividualMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD_MANAGEMENT_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany("Nav_EvaluateHazardManagementMeasures")
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", "Nav_ManagementMeasures")
                        .WithMany()
                        .HasForeignKey("MANAGEMENT_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_ManagementMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_REQUIREMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_NoteTaker")
                        .WithMany()
                        .HasForeignKey("NOTE_TAKER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_REQUIREMENT", "Nav_Requirement")
                        .WithMany()
                        .HasForeignKey("REQUIREMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_NoteTaker");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Requirement");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", "Nav_EvaluateResult")
                        .WithMany("Nav_Files")
                        .HasForeignKey("EVALUATE_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluateResult");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentLiable")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany()
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", "Nav_EvaluateResult")
                        .WithMany("Nav_Hazards")
                        .HasForeignKey("EVALUATE_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MONITOR_MEASURES", "Nav_MonitorMeasures")
                        .WithMany()
                        .HasForeignKey("MONITOR_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OCCUPATIONAL_RISK", "Nav_OccupationalRisk")
                        .WithMany()
                        .HasForeignKey("OCCUPATIONALRISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_PostLiable")
                        .WithMany()
                        .HasForeignKey("POST_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DepartmentLiable");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_EvaluateResult");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_MonitorMeasures");

                    b.Navigation("Nav_OccupationalRisk");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostLiable");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_EDUCATION_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", "Nav_EducationMeasures")
                        .WithMany()
                        .HasForeignKey("EDUCATION_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", "Nav_EvaluationResultHazard")
                        .WithMany("Nav_EvaluateHazardEducationMeasures")
                        .HasForeignKey("EVALUATE_RESULT_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EducationMeasures");

                    b.Navigation("Nav_EvaluationResultHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_EMERGENCY_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", "Nav_EmergencyMeasures")
                        .WithMany()
                        .HasForeignKey("EMERGENCY_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", "Nav_EvaluationResultHazard")
                        .WithMany("Nav_EvaluateHazardEmergencyMeasures")
                        .HasForeignKey("EVALUATE_RESULT_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EmergencyMeasures");

                    b.Navigation("Nav_EvaluationResultHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_ENGINEERING_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", "Nav_EngineeringMeasures")
                        .WithMany()
                        .HasForeignKey("ENGINEERING_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", "Nav_EvaluationResultHazard")
                        .WithMany("Nav_EvaluateHazardEngineeringMeasures")
                        .HasForeignKey("EVALUATE_RESULT_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EngineeringMeasures");

                    b.Navigation("Nav_EvaluationResultHazard");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_INDIVIDUAL_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", "Nav_EvaluationResultHazard")
                        .WithMany("Nav_EvaluateHazardIndividualMeasures")
                        .HasForeignKey("EVALUATE_RESULT_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", "Nav_IndividualMeasures")
                        .WithMany()
                        .HasForeignKey("INDIVIDUAL_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultHazard");

                    b.Navigation("Nav_IndividualMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD_MANAGEMENT_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", "Nav_EvaluationResultHazard")
                        .WithMany("Nav_EvaluateHazardManagementMeasures")
                        .HasForeignKey("EVALUATE_RESULT_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", "Nav_ManagementMeasures")
                        .WithMany()
                        .HasForeignKey("MANAGEMENT_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultHazard");

                    b.Navigation("Nav_ManagementMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentLiable")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", "Nav_EvaluateResult")
                        .WithMany("Nav_Risks")
                        .HasForeignKey("EVALUATE_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_PostLiable")
                        .WithMany()
                        .HasForeignKey("POST_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DepartmentLiable");

                    b.Navigation("Nav_EvaluateResult");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostLiable");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", "Nav_EducationMeasures")
                        .WithMany()
                        .HasForeignKey("EDUCATION_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskEducationMeasures")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EducationMeasures");

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", "Nav_EmergencyMeasures")
                        .WithMany()
                        .HasForeignKey("EMERGENCY_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskEmergencyMeasures")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EmergencyMeasures");

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", "Nav_EngineeringMeasures")
                        .WithMany()
                        .HasForeignKey("ENGINEERING_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskEngineeringMeasures")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EngineeringMeasures");

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_EQUIPMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", "Nav_Equipment")
                        .WithMany()
                        .HasForeignKey("EQUIPMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskEquipment")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Equipment");

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_FACILITIES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskFacilities")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", "Nav_Facilities")
                        .WithMany()
                        .HasForeignKey("FACILITIES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Facilities");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskIndividualMeasures")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", "Nav_IndividualMeasures")
                        .WithMany()
                        .HasForeignKey("INDIVIDUAL_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_IndividualMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskManagementMeasures")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", "Nav_ManagementMeasures")
                        .WithMany()
                        .HasForeignKey("MANAGEMENT_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_ManagementMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK_WORKDUTY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", "Nav_EvaluationResultRisk")
                        .WithMany("Nav_EvaluateRiskWorkduty")
                        .HasForeignKey("EVALUATION_RESULT_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("WORKDUTY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationResultRisk");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentLiable")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_PostLiable")
                        .WithMany()
                        .HasForeignKey("POST_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_SourceDepartment")
                        .WithMany()
                        .HasForeignKey("SOURCE_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", null)
                        .WithMany("Nav_Risk")
                        .HasForeignKey("T_BI_AREA_TREEID");

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DepartmentLiable");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostLiable");

                    b.Navigation("Nav_SourceDepartment");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskDepartment")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EDUCATION_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EDUCATION_MEASURES", "Nav_EducationMeasures")
                        .WithMany()
                        .HasForeignKey("EDUCATION_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskEducationMeasures")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EducationMeasures");

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EMERGENCY_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EMERGENCY_MEASURES", "Nav_EmergencyMeasures")
                        .WithMany()
                        .HasForeignKey("EMERGENCY_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskEmergencyMeasures")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EmergencyMeasures");

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_ENGINEERING_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ENGINEERING_MEASURES", "Nav_EngineeringMeasures")
                        .WithMany()
                        .HasForeignKey("ENGINEERING_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskEngineeringMeasures")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EngineeringMeasures");

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_EQUIPMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", "Nav_Equipment")
                        .WithMany()
                        .HasForeignKey("EQUIPMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskEquipment")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Equipment");

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_FACILITIES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskFacilities")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", "Nav_Facilities")
                        .WithMany()
                        .HasForeignKey("FACILITIES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Facilities");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskIndividualMeasures")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", "Nav_IndividualMeasures")
                        .WithMany()
                        .HasForeignKey("INDIVIDUAL_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_IndividualMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_LEC", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskManagementMeasures")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", "Nav_ManagementMeasures")
                        .WithMany()
                        .HasForeignKey("MANAGEMENT_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_ManagementMeasures");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK_WORKDUTY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluationRisk")
                        .WithMany("Nav_EvaluateRiskWorkduty")
                        .HasForeignKey("EVALUATION_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationRisk");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_EvaluationPlan")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_EvaluationPlan");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Areas")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL_IDENTIFYING", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Identifyings")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_EvaluationPlan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationPlan");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DeputyGroupLeader")
                        .WithMany()
                        .HasForeignKey("DEPUTY_GROUP_LEADER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_GroupLeader")
                        .WithMany()
                        .HasForeignKey("GROUP_LEADER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ReleaseUser")
                        .WithMany()
                        .HasForeignKey("RELEASE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DeputyGroupLeader");

                    b.Navigation("Nav_GroupLeader");

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ReleaseUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_SCHEDULE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", "Nav_CrucialTaskAnalysis")
                        .WithMany()
                        .HasForeignKey("CRUCIAL_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", "Nav_LicenseAnalysis")
                        .WithMany()
                        .HasForeignKey("LICENSE_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", "Nav_OrdinaryTaskAnalysis")
                        .WithMany()
                        .HasForeignKey("ORDINARY_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_CrucialTaskAnalysis");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_LicenseAnalysis");

                    b.Navigation("Nav_OrdinaryTaskAnalysis");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH_AREA", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH", "Nav_FilePublish")
                        .WithMany("Nav_Area")
                        .HasForeignKey("FILE_PUBLISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_FilePublish");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_NoteTaker")
                        .WithMany()
                        .HasForeignKey("NOTE_TAKER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("Nav_TaskID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_NoteTaker");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", "Nav_EvaluateHazard")
                        .WithMany()
                        .HasForeignKey("EVALUATE_HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OCCUPATIONAL_RISK", "Nav_OccupationalRisk")
                        .WithMany()
                        .HasForeignKey("OCCUPATIONALRISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", "Nav_HazardRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_EvaluateHazard");

                    b.Navigation("Nav_HazardRecord");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_OccupationalRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", "Nav_Task")
                        .WithMany("Nav_Areas")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("RECORD_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", "Nav_Task")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL_IDENTIFYING", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL", "Nav_Task_Detail")
                        .WithMany("Nav_Identifyings")
                        .HasForeignKey("TASK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task_Detail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL", "Nav_Task_Detail")
                        .WithMany("Nav_Users")
                        .HasForeignKey("TASK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task_Detail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", "Nav_Task")
                        .WithMany("Nav_Files")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_IDENTIFYING", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", "Nav_Task")
                        .WithMany("Nav_Identifyings")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_INDIVIDUAL_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", "Nav_JobtaskIdentify")
                        .WithMany("Nav_Details")
                        .HasForeignKey("JOBTASK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_JobtaskIdentify");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailPost")
                        .HasForeignKey("JOBTASK_IDENTIFY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL", "Nav_Detail")
                        .WithMany("Nav_DetailRisk")
                        .HasForeignKey("JOBTASK_IDENTIFY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", "Nav_JobtaskIdentify")
                        .WithMany("Nav_Files")
                        .HasForeignKey("JOBTASK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_JobtaskIdentify");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", "Nav_JobtaskIdentify")
                        .WithMany("Nav_IdentifyUser")
                        .HasForeignKey("JOBTASK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_JobtaskIdentify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_OperationAnalyze")
                        .WithMany()
                        .HasForeignKey("OPERATION_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationAnalyze");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", "Nav_LicenseAnalysis")
                        .WithMany("Nav_Details")
                        .HasForeignKey("LICENSE_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_WORK_PERMIT_TYPE", "Nav_WorkPermitType")
                        .WithMany()
                        .HasForeignKey("WORK_PERMIT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_LicenseAnalysis");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_WorkPermitType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL", "Nav_Details")
                        .WithMany("Nav_DetailRisk")
                        .HasForeignKey("LICENSE_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL", "Nav_Details")
                        .WithMany("Nav_Files")
                        .HasForeignKey("LICENSE_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_MANAGEMENT_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_MONITOR_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ReleaseUser")
                        .WithMany()
                        .HasForeignKey("RELEASE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ReleasDepartment")
                        .WithMany()
                        .HasForeignKey("RELEAS_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", "Nav_TaskAnalyze")
                        .WithMany()
                        .HasForeignKey("TASK_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_ReleasDepartment");

                    b.Navigation("Nav_ReleaseUser");

                    b.Navigation("Nav_TaskAnalyze");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE", "Nav_NoticeRelease")
                        .WithMany("Nav_ReleaseRange")
                        .HasForeignKey("NOTICE_RELEASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_NoticeRelease");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE", "Nav_NoticeRelease")
                        .WithMany("Nav_Files")
                        .HasForeignKey("NOTICE_RELEASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_NoticeRelease");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OCCUPATIONAL_RISK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_INSTRUCTION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_Files")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_Unit")
                        .WithMany()
                        .HasForeignKey("UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_WORK_PERMIT_TYPE", "Nav_WorkPermitType")
                        .WithMany()
                        .HasForeignKey("WORK_PERMIT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Unit");

                    b.Navigation("Nav_WorkPermitType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_LinkArea")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_EVALUATE_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_OperationLinkEvaluateRisk")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_DETAIL", null)
                        .WithMany("Nav_OperationLinkEvaluateRisk")
                        .HasForeignKey("T_HM_OPERATION_TASK_DISTINGUISH_DETAILID");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_LinkPost")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_DEAL_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany("Nav_DealMeasures")
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany("Nav_SafeConfirms")
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP_SAFE_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany("Nav_SafeMeasures")
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_DEAL_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", "Nav_TaskAnalyzeDetail")
                        .WithMany()
                        .HasForeignKey("Nav_TaskAnalyzeDetailID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyzeDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", "Nav_TaskAnalyzeDetail")
                        .WithMany()
                        .HasForeignKey("Nav_TaskAnalyzeDetailID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyzeDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_ANALYZE_SAFE_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", "Nav_TaskAnalyzeDetail")
                        .WithMany()
                        .HasForeignKey("Nav_TaskAnalyzeDetailID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyzeDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DEAL_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_DealMeasures")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", "Nav_JobtaskIdentify")
                        .WithMany()
                        .HasForeignKey("JOBTASK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_JobtaskIdentify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E", "Nav_DistinguishAnalyzeE")
                        .WithMany()
                        .HasForeignKey("ANALYZE_E_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H", "Nav_DistinguishAnalyzeH")
                        .WithMany()
                        .HasForeignKey("ANALYZE_H_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L", "Nav_DistinguishAnalyzeL")
                        .WithMany()
                        .HasForeignKey("ANALYZE_L_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P", "Nav_DistinguishAnalyzeP")
                        .WithMany()
                        .HasForeignKey("ANALYZE_P_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R", "Nav_DistinguishAnalyzeR")
                        .WithMany()
                        .HasForeignKey("ANALYZE_R_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_DistinguishAnalyze")
                        .WithMany("Nav_AnalyzeDetails")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_WORK_PERMIT_TYPE", "Nav_WorkPermitType")
                        .WithMany()
                        .HasForeignKey("WORK_PERMIT_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DistinguishAnalyze");

                    b.Navigation("Nav_DistinguishAnalyzeE");

                    b.Navigation("Nav_DistinguishAnalyzeH");

                    b.Navigation("Nav_DistinguishAnalyzeL");

                    b.Navigation("Nav_DistinguishAnalyzeP");

                    b.Navigation("Nav_DistinguishAnalyzeR");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_WorkPermitType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_DistinguishAnalyze")
                        .WithMany("Nav_AnalyzeFiles")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DistinguishAnalyze");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL", "Nav_AnalyzeDetails")
                        .WithMany("Nav_DetailRisk")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AnalyzeDetails");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_DistinguishAnalyze")
                        .WithMany("Nav_Users")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DistinguishAnalyze");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", "Nav_OperationTaskDistinguish")
                        .WithMany("Nav_DistinguishDetails")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Workduty")
                        .WithMany()
                        .HasForeignKey("WORKDUTY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_WORK_TYPE", "Nav_WorkType")
                        .WithMany()
                        .HasForeignKey("WORK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_OperationTaskDistinguish");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Workduty");

                    b.Navigation("Nav_WorkType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", "Nav_OperationTaskDistinguish")
                        .WithMany("Nav_Files")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_OperationTaskDistinguish");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", "Nav_OperationTaskDistinguish")
                        .WithMany("Nav_Users")
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationTaskDistinguish");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_SafeConfirms")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_SAFE_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany("Nav_SafeMeasures")
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_ANALYSIS_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL", "Nav_Details")
                        .WithMany("Nav_Files")
                        .HasForeignKey("ORDINARY_TASK_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_ANALYSIS_PERSON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", "Nav_OrdinaryTaskAnalysis")
                        .WithMany("Nav_OrdinaryAnalysisPerson")
                        .HasForeignKey("ORDINARY_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OrdinaryTaskAnalysis");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("CREATER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_OperationAnalyze")
                        .WithMany()
                        .HasForeignKey("OPERATION_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationAnalyze");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", "Nav_OrdinaryTaskAnalysis")
                        .WithMany("Nav_Details")
                        .HasForeignKey("ORDINARY_TASK_ANALYSIS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_OrdinaryTaskAnalysis");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL", "Nav_Details")
                        .WithMany("Nav_DetailRisk")
                        .HasForeignKey("ORDINARY_TASK_ANALYSIS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OTHER_APPROVE_LOG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_REQUEST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISKSOURCE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_NoteTaker")
                        .WithMany()
                        .HasForeignKey("NOTE_TAKER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_REQUEST", "Nav_Request")
                        .WithMany()
                        .HasForeignKey("REQUEST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_NoteTaker");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Request");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentLiable")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", "Nav_EvaluateRisk")
                        .WithMany()
                        .HasForeignKey("EVALUATE_RISK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_PostLiable")
                        .WithMany()
                        .HasForeignKey("POST_LIABLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_DepartmentLiable");

                    b.Navigation("Nav_EvaluateRisk");

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostLiable");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_EQUIPMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EQUIPMENT", "Nav_Equipment")
                        .WithMany()
                        .HasForeignKey("EQUIPMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", "Nav_RiskRecordDetail")
                        .WithMany("Nav_EvaluateRiskRecordEquipment")
                        .HasForeignKey("RISK_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Equipment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskRecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_FACILITIES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_FACILITIES", "Nav_Facilities")
                        .WithMany()
                        .HasForeignKey("FACILITIES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", "Nav_RiskRecordDetail")
                        .WithMany("Nav_EvaluateRiskRecordFacilities")
                        .HasForeignKey("RISK_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Facilities");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskRecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL_WORKDUTY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", "Nav_RiskRecordDetail")
                        .WithMany("Nav_EvaluateRiskRecordWorkduty")
                        .HasForeignKey("RISK_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Workduty")
                        .WithMany()
                        .HasForeignKey("WORKDUTY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskRecordDetail");

                    b.Navigation("Nav_Workduty");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_IDENTIFYING", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", "Nav_Record")
                        .WithMany("Nav_Identifyings")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_InitiatingDepartment")
                        .WithMany()
                        .HasForeignKey("INITIATING_DEPARTMENT")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LiableUser")
                        .WithMany()
                        .HasForeignKey("LIABLE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_REQUEST", "Nav_Request")
                        .WithMany()
                        .HasForeignKey("REQUEST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_InitiatingDepartment");

                    b.Navigation("Nav_LiableUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Request");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", "Nav_Task")
                        .WithMany("Nav_Areas")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("RECORD_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", "Nav_Task")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", "Nav_Task")
                        .WithMany("Nav_Files")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_IDENTIFYING", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Identifying")
                        .WithMany()
                        .HasForeignKey("IDENTIFYING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", "Nav_Task")
                        .WithMany("Nav_Identifyings")
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identifying");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_DETAIL", "Nav_Task_Detail")
                        .WithMany("Nav_Users")
                        .HasForeignKey("TASK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task_Detail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", "Nav_DistinguishAnalyze")
                        .WithMany()
                        .HasForeignKey("OPERATION_TASK_DISTINGUISH_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DistinguishAnalyze");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", "Nav_OperationLink")
                        .WithMany()
                        .HasForeignKey("OPERATION_LINK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", "Nav_TaskAnalyze")
                        .WithMany("Nav_AnalyzeDetails")
                        .HasForeignKey("TASK_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_OperationLink");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyze");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE", "Nav_File")
                        .WithMany()
                        .HasForeignKey("Nav_FileID");

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", "Nav_TaskAnalyzeDetail")
                        .WithMany("Nav_TaskAnalyzeDetailFiles")
                        .HasForeignKey("Nav_TaskAnalyzeDetailID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_File");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyzeDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", "Nav_TaskAnalyze")
                        .WithMany("Nav_Users")
                        .HasForeignKey("TASK_ANALYZE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TaskAnalyze");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_WORK_PERMIT_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_WORK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_WB_SAFE_CHECK_TASK_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT", "Nav_DemandReport")
                        .WithMany("Nav_DemandReportDetail")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DemandReport");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_LAW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", "Nav_DemandDistinguish")
                        .WithMany("Nav_DemandLaw")
                        .HasForeignKey("DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DemandDistinguish");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_OTHER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", "Nav_DemandDistinguish")
                        .WithMany("Nav_DemandOther")
                        .HasForeignKey("DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", "Nav_OtherDistinguish")
                        .WithMany()
                        .HasForeignKey("OTHER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DemandDistinguish");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_OtherDistinguish");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_TYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_TYPE", "Nav_DemandType")
                        .WithMany()
                        .HasForeignKey("DEMANDTYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", "Nav_DemandDistinguish")
                        .WithMany("Nav_DemandTypes")
                        .HasForeignKey("DISTINGUISH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DemandDistinguish");

                    b.Navigation("Nav_DemandType");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", "Nav_OtherDistinguish")
                        .WithMany("Nav_DemandUser")
                        .HasForeignKey("OTHER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_OtherDistinguish");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_INTEGRATE_UPDATE_TIME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_TYPE", "Nav_LawType")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LawType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INSTITUTION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_SCSystem")
                        .WithMany()
                        .HasForeignKey("SC_SYSTEM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE_DETAIL", "Nav_LawIntegrateUpdateDetail")
                        .WithMany("Nav_LRLawInstitution")
                        .HasForeignKey("UPDATE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LawIntegrateUpdateDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SCSystem");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE", "Nav_LawIntegrate")
                        .WithMany("Nav_IntegrateDetail")
                        .HasForeignKey("LAW_INTEGRATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_SCSystem")
                        .WithMany()
                        .HasForeignKey("SYSTEM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_LawIntegrate");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SCSystem");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE", "Nav_LawIntegrateUpdate")
                        .WithMany("Nav_IntegrateUpdateDetail")
                        .HasForeignKey("INTEGRATE_UPDATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_LawIntegrateUpdate");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_SC_SYSTEM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany("Nav_LawSCSystem")
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_SCSystem")
                        .WithMany()
                        .HasForeignKey("SC_SYSTEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SCSystem");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_UPDATE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany("Nav_LawVersion")
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION", "Nav_Version")
                        .WithMany("Nav_Files")
                        .HasForeignKey("VERSION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Version");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW_TYPE", "Nav_DemandType")
                        .WithMany()
                        .HasForeignKey("DEMANDTYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST", "Nav_LegalList")
                        .WithMany("Nav_LegalListDetail")
                        .HasForeignKey("LEGAL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", "Nav_OtherDistinguish")
                        .WithMany()
                        .HasForeignKey("OTHER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DemandType");

                    b.Navigation("Nav_LegalList");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_OtherDistinguish");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL", "Nav_LegalListDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("LEGAL_LIST_DETAIL")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_LegalListDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL", "Nav_LegalListDetail")
                        .WithMany("Nav_LegalListDetailUser")
                        .HasForeignKey("LEGAL_LIST_DETAIL")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LegalListDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LRCONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_AGENCY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_AGENCY", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_AGENCY_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_AGENCY", "Nav_Agency")
                        .WithMany("Nav_Users")
                        .HasForeignKey("AGENCY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Agency");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REPORT", "Nav_ApproveRewardPunishmentReport")
                        .WithMany("Nav_ApproveRewardPunishmentDetail")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveRewardPunishmentReport");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER", "Nav_CollectionUser")
                        .WithMany("Nav_Opinions")
                        .HasForeignKey("COLLECTION_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CollectionUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AHChargeUser")
                        .WithMany()
                        .HasForeignKey("AH_CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AHChargeUser");

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION", "Nav_Collection")
                        .WithMany("Nav_Users")
                        .HasForeignKey("COLLECTION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Collection");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER", "Nav_CollectionUser")
                        .WithMany("Nav_Files")
                        .HasForeignKey("COLLECTION_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CollectionUser");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_REPORT", "Nav_Opinion")
                        .WithMany("Nav_ImpFileList")
                        .HasForeignKey("EMPLOYEE_OPINION_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Opinion");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Assignee")
                        .WithMany()
                        .HasForeignKey("ASSIGNEE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DoDepartment")
                        .WithMany()
                        .HasForeignKey("DO_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DoUser")
                        .WithMany()
                        .HasForeignKey("DO_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", "Nav_ItemEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Assignee");

                    b.Navigation("Nav_DoDepartment");

                    b.Navigation("Nav_DoUser");

                    b.Navigation("Nav_ItemEnum");

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_REPORT", "Nav_Opinion")
                        .WithMany("Nav_FileList")
                        .HasForeignKey("EMPLOYEE_OPINION_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Opinion");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", "Nav_Opinion")
                        .WithMany("Nav_InvestigationFileList")
                        .HasForeignKey("EMPLOYEE_REFUSE_ITEM_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Opinion");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Assignee")
                        .WithMany()
                        .HasForeignKey("ASSIGNEE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ImplementDepartment")
                        .WithMany()
                        .HasForeignKey("IMPLEMENT_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ImplementUser")
                        .WithMany()
                        .HasForeignKey("IMPLEMENT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", "Nav_ItemEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Assignee");

                    b.Navigation("Nav_ImplementDepartment");

                    b.Navigation("Nav_ImplementUser");

                    b.Navigation("Nav_ItemEnum");

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", "Nav_Opinion")
                        .WithMany("Nav_FileList")
                        .HasForeignKey("EMPLOYEE_REFUSE_ITEM_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Opinion");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET", "Nav_Event")
                        .WithMany("Nav_Details")
                        .HasForeignKey("EVENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ReplyUser")
                        .WithMany()
                        .HasForeignKey("REPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Event");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ReplyUser");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL_ITEM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Items")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AHUser")
                        .WithMany()
                        .HasForeignKey("AH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DoDepartment")
                        .WithMany()
                        .HasForeignKey("DO_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DoUser")
                        .WithMany()
                        .HasForeignKey("DO_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AHUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DoDepartment");

                    b.Navigation("Nav_DoUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT", "Nav_Report")
                        .WithMany("Nav_Files")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Report");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT_SUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Assignee")
                        .WithMany()
                        .HasForeignKey("ASSIGNEE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_DETAIL", "Nav_ExternalContactDetail")
                        .WithMany()
                        .HasForeignKey("EXTERNAL_COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_SurveyDepartment")
                        .WithMany()
                        .HasForeignKey("SURVEY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_SurveyUser")
                        .WithMany()
                        .HasForeignKey("SURVEY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", "Nav_ItemEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Assignee");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_ExternalContactDetail");

                    b.Navigation("Nav_ItemEnum");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SurveyDepartment");

                    b.Navigation("Nav_SurveyUser");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE", "Nav_ExternalComplainAdvise")
                        .WithMany("Nav_FileList")
                        .HasForeignKey("EXTERNAL_COMPLAIN_ADVISE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExternalComplainAdvise");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE", "Nav_ExternalComplainAdvise")
                        .WithMany("Nav_SurveyFileList")
                        .HasForeignKey("EXTERNAL_COMPLAIN_ADVISE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExternalComplainAdvise");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DoDepartment")
                        .WithMany()
                        .HasForeignKey("DO_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DoUser")
                        .WithMany()
                        .HasForeignKey("DO_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_DETAIL", "Nav_ExternalContactDetail")
                        .WithMany()
                        .HasForeignKey("EXTERNAL_COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DoDepartment");

                    b.Navigation("Nav_DoUser");

                    b.Navigation("Nav_ExternalContactDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE", "Nav_ExternalContactCommunicate")
                        .WithMany("Nav_FileList")
                        .HasForeignKey("EXTERNAL_CONTACT_COMMUNICATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExternalContactCommunicate");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE", "Nav_ExternalContactCommunicate")
                        .WithMany("Nav_ImpFileList")
                        .HasForeignKey("EXTERNAL_CONTACT_COMMUNICATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExternalContactCommunicate");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DoDepartment")
                        .WithMany()
                        .HasForeignKey("DO_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DoUser")
                        .WithMany()
                        .HasForeignKey("DO_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_FormDepartment")
                        .WithMany()
                        .HasForeignKey("FORM_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_FromUser")
                        .WithMany()
                        .HasForeignKey("FROM_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ToDepartment")
                        .WithMany()
                        .HasForeignKey("TO_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ToUser")
                        .WithMany()
                        .HasForeignKey("TO_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DoDepartment");

                    b.Navigation("Nav_DoUser");

                    b.Navigation("Nav_FormDepartment");

                    b.Navigation("Nav_FromUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ToDepartment");

                    b.Navigation("Nav_ToUser");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT_DO_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT", "Nav_Contact")
                        .WithMany("Nav_DoFiles")
                        .HasForeignKey("CONTACT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contact");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT_ITEM_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT", "Nav_Contact")
                        .WithMany("Nav_ItemFiles")
                        .HasForeignKey("CONTACT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contact");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_OGCONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_PERSONNEL_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AppointAgreeUser")
                        .WithMany()
                        .HasForeignKey("APPOINT_AGREEUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_PERSONNEL_TYPE_ENUM", "Nav_AppointType")
                        .WithMany()
                        .HasForeignKey("APPOINT_TYPE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AppointAgreeUser");

                    b.Navigation("Nav_AppointType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AppointAgreeUser")
                        .WithMany()
                        .HasForeignKey("APPOINT_AGREEUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_PERSONNEL_TYPE_ENUM", "Nav_AppointType")
                        .WithMany()
                        .HasForeignKey("APPOINT_TYPE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", "Nav_PolicyDocument")
                        .WithMany("Nav_Details")
                        .HasForeignKey("POLICY_DOCUMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AppointAgreeUser");

                    b.Navigation("Nav_AppointType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PolicyDocument");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL", "Nav_PolicyDocumentDetail")
                        .WithMany("Nav_AppointUsers")
                        .HasForeignKey("POLICY_DOCUMENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", null)
                        .WithMany("Nav_AppointUsers")
                        .HasForeignKey("T_OG_POLICY_DOCUMENTID");

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PolicyDocumentDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL", "Nav_PolicyDocumentDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("POLICY_DOCUMENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", null)
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_OG_POLICY_DOCUMENTID");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PolicyDocumentDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany("Nav_Agreements")
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT", "Nav_Agreement")
                        .WithMany("Nav_Files")
                        .HasForeignKey("AGREEMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Agreement");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany()
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE", "Nav_Estimate")
                        .WithMany("Nav_Details")
                        .HasForeignKey("ESTIMATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE_ITEM", "Nav_Item")
                        .WithMany()
                        .HasForeignKey("ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Estimate");

                    b.Navigation("Nav_Item");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_FIRE_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany("Nav_FireUser")
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_LEVEL", "Nav_Level")
                        .WithMany()
                        .HasForeignKey("LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany("Nav_Qualifications")
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Level");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL_ITEM", "Nav_Item")
                        .WithMany()
                        .HasForeignKey("ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION", "Nav_Qualification")
                        .WithMany("Nav_Details")
                        .HasForeignKey("QUALIFICATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Item");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Qualification");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_LEVEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_SAFE_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany("Nav_SafeUser")
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED", "Nav_Related")
                        .WithMany("Nav_Users")
                        .HasForeignKey("RELATED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Related");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_HEALTH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_RelatedUser")
                        .WithMany("Nav_Healths")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RelatedUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_INSURANCE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_RelatedUser")
                        .WithMany("Nav_Insurances")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RelatedUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_SIGN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", "Nav_RelatedUser")
                        .WithMany("Nav_Signs")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RelatedUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_ITEM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_PLAN_INPUT", "Nav_SafeAssessPlanInput")
                        .WithMany("Nav_SafeAssessItem")
                        .HasForeignKey("ASSESS_PLAN_INPUT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeAssessPlanInput");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_PLAN_INPUT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", "Nav_Check")
                        .WithMany()
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD", "Nav_SafeAssessRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SAFE_ASSESS_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_SafeAssessRecord");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_ITEM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_ITEM", "Nav_SafeAssessItem")
                        .WithMany()
                        .HasForeignKey("ASSESS_ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_DETAIL", "Nav_SafeAssessRecordDetail")
                        .WithMany("Nav_SafeAssessRecordItem")
                        .HasForeignKey("RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafeAssessItem");

                    b.Navigation("Nav_SafeAssessRecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", "Nav_SafePdtAssessPlanCheck")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafePdtAssessPlanCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_CreateUser")
                        .WithMany()
                        .HasForeignKey("Nav_CreateUserID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_StandardCreate")
                        .WithMany()
                        .HasForeignKey("STANDARD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_StandardCreate");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED", "Nav_SafePdtSigned")
                        .WithMany("Nav_SafePdtSignedPost")
                        .HasForeignKey("SAFE_PDT_SIGNED_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_SafePdtSigned");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_ACTION_PLAN_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_ACTION_PLAN_REL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_ACTION_PLAN_ENUM", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", "Nav_Review")
                        .WithMany("Nav_ActionPlanList")
                        .HasForeignKey("REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Review");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_PERSON_REL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", "Nav_Review")
                        .WithMany("Nav_ReviewUserList")
                        .HasForeignKey("REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Review");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_ITEMS_REL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM", "Nav_Item")
                        .WithMany()
                        .HasForeignKey("ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", "Nav_Review")
                        .WithMany("Nav_ReviewItemsList")
                        .HasForeignKey("REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Item");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Review");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_RESULT_REL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM", "Nav_Result")
                        .WithMany()
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", "Nav_Review")
                        .WithMany("Nav_ReviewResultList")
                        .HasForeignKey("REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Result");

                    b.Navigation("Nav_Review");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_HostUser")
                        .WithMany()
                        .HasForeignKey("HOST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_HostUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_EXAM_NOTICE_OCC_HAZARD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Hazard")
                        .WithMany()
                        .HasForeignKey("HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_REGISTER", "Nav_Register")
                        .WithMany("Nav_ListOccHazard")
                        .HasForeignKey("REGISTER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hazard");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Register");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_EXAM_RESULT_OCC_HAZARD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Hazard")
                        .WithMany()
                        .HasForeignKey("HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", "Nav_Result")
                        .WithMany()
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", null)
                        .WithMany("Nav_OccHazardList")
                        .HasForeignKey("T_OH_HEALTH_EXAM_RESULTID");

                    b.Navigation("Nav_Hazard");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Result");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB", "Nav_Job")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("JOB_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RULE", "Nav_Rule")
                        .WithMany()
                        .HasForeignKey("RULE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Job");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rule");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB", "Nav_MonitorJob")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_MonitorJob");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT", "Nav_Report")
                        .WithMany("Nav_Files")
                        .HasForeignKey("REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Report");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RULE", "Nav_Rule")
                        .WithMany()
                        .HasForeignKey("RULE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT_SUM", "Nav_Sum")
                        .WithMany("Nav_ListMonitorResult")
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rule");

                    b.Navigation("Nav_Sum");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT_SUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RULE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentWarn")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID_WARN")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentWorkshop")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID_WORKSHOP")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_RecordPost")
                        .WithMany()
                        .HasForeignKey("RECORD_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_WarnPost")
                        .WithMany()
                        .HasForeignKey("WARN_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentWarn");

                    b.Navigation("Nav_DepartmentWorkshop");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordPost");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_WarnPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Hazard")
                        .WithMany()
                        .HasForeignKey("HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", "Nav_Record")
                        .WithMany("Nav_ListOccHazard")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hazard");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_CYCLE_POST_MID", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_SCPost")
                        .WithMany()
                        .HasForeignKey("SC_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_SCPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_PLAN_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN", "Nav_Plan")
                        .WithMany("Nav_ListDepartment")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH_DEPARTMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", "Nav_Batch")
                        .WithMany("Nav_ListDepartment")
                        .HasForeignKey("BATCH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Batch");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", "Nav_ExamCycle")
                        .WithMany("Nav_ListDepartmentInfo")
                        .HasForeignKey("EXAM_CYCLE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_ExamCycle");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO", "Nav_DepartmentInfo")
                        .WithMany("Nav_ListDepartmentInfoPost")
                        .HasForeignKey("DEPARTMENTINFO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepartmentInfo");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", "Nav_ExamBatch")
                        .WithMany()
                        .HasForeignKey("EXAM_BATCH_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_ExamBatch");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", "Nav_Notice")
                        .WithMany("Nav_Files")
                        .HasForeignKey("NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Notice");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_REGISTER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", "Nav_Cycle")
                        .WithMany()
                        .HasForeignKey("CYCLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentWorkshop")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID_WORKSHOP")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", "Nav_ExamBatch")
                        .WithMany()
                        .HasForeignKey("EXAM_BATCH_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", "Nav_Notice")
                        .WithMany("Nav_ListNoticeRegister")
                        .HasForeignKey("NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Cycle");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentWorkshop");

                    b.Navigation("Nav_ExamBatch");

                    b.Navigation("Nav_Notice");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentWorkshop")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID_WORKSHOP")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", "Nav_ExamCycle")
                        .WithMany()
                        .HasForeignKey("EXAM_CYCLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN", "Nav_Plan")
                        .WithMany("Nav_ListPlanRegister")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EAXM_PLAN_DEPARTMENT", "Nav_PlanDEP")
                        .WithMany()
                        .HasForeignKey("PLAN_ID_DEP")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentWorkshop");

                    b.Navigation("Nav_ExamCycle");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_PlanDEP");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_IDENTIFYING", "Nav_Hazard")
                        .WithMany()
                        .HasForeignKey("HAZARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER", "Nav_Register")
                        .WithMany("Nav_ListHazard")
                        .HasForeignKey("REGISTER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hazard");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Register");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_REGISTER", "Nav_NoticeRegister")
                        .WithMany()
                        .HasForeignKey("NOTICE_REGISTER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_NoticeRegister");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_IMPORT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", "Nav_ExamNotice")
                        .WithMany()
                        .HasForeignKey("NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ExamNotice");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE", "Nav_OccDisease")
                        .WithMany()
                        .HasForeignKey("OCC_DISEASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL", "Nav_OccDiseaseSeverity")
                        .WithMany()
                        .HasForeignKey("OCC_DISEASE_SEVERITY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", "Nav_Result")
                        .WithMany("Nav_OccDiseaseList")
                        .HasForeignKey("RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OccDisease");

                    b.Navigation("Nav_OccDiseaseSeverity");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Result");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE", "Nav_Disease")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DISEASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Disease");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_RUNCONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_COLORSET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PC.T_PC_INFO", "Nav_Info")
                        .WithMany("Nav_Colors")
                        .HasForeignKey("INFO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Info");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR", "Nav_InfoColor")
                        .WithMany("Nav_Areas")
                        .HasForeignKey("COLOR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_InfoColor");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR_POINT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR", "Nav_InfoColor")
                        .WithMany("Nav_ColorPoints")
                        .HasForeignKey("INFO_COLOR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PC.T_PC_INFO", "Nav_Info")
                        .WithMany()
                        .HasForeignKey("INFO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Info");

                    b.Navigation("Nav_InfoColor");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.PC.T_PC_INFO", "Nav_Info")
                        .WithMany("Nav_Files")
                        .HasForeignKey("INFO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Info");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", "Nav_Role")
                        .WithMany()
                        .HasForeignKey("ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Role");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PF.T_PF_QUESTION_FEEDBACK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_QUESTION_FEEDBACK", "Nav_QuestionFeedback")
                        .WithMany("Nav_Files")
                        .HasForeignKey("T_PF_QUESTION_FEEDBACK")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_QuestionFeedback");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_DEPARTMENT_MONTH_RUN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_FORM_CHECK_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_FORM_RUN_ANALYSIS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_JOB_PROFILE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_MOULD_RUN_SUMMARY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_NOTIFICATION_TASK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_NOTIFICATION_TASK_NEW", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_SYSTEM_RUN_SUMMARY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY", "Nav_Apply")
                        .WithMany("Nav_Details")
                        .HasForeignKey("DEVICE_APPLY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UserPost")
                        .WithMany()
                        .HasForeignKey("USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Apply");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_BASE_RECEIPT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany("Nav_ReceiptFiles")
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY", "Nav_Apply")
                        .WithMany()
                        .HasForeignKey("APPLY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UserPost")
                        .WithMany()
                        .HasForeignKey("USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Apply");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE", "Nav_Issue")
                        .WithMany("Nav_Details")
                        .HasForeignKey("DEVICE_ISSUE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_UseUserPost")
                        .WithMany()
                        .HasForeignKey("USE_USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Issue");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UseUserPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_MAINTENANCE_CHECK_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", "Nav_Check")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DEVICE_MAINTENANCE_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", "Nav_SafePdtAssessPlanCheck")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_SafePdtAssessPlanCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL", "Nav_CheckDetail")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("CHECK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE", "Nav_Corrective")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_StandardName")
                        .WithMany()
                        .HasForeignKey("STANDARDIZED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Corrective");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_StandardName");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS", "Nav_CorrectiveProcess")
                        .WithMany()
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_PROCESS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CorrectiveProcess");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_MEASURE_CONSIDER", "Nav_Consider")
                        .WithMany()
                        .HasForeignKey("CONSIDER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", "Nav_Evaluation")
                        .WithMany("Nav_MeasureConsider")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Consider");

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", "Nav_Evaluation")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_MEASURE_CONSIDER", "Nav_Consider")
                        .WithMany()
                        .HasForeignKey("CONSIDER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_MeasureConsider")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Consider");

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE", "Nav_Corrective")
                        .WithMany()
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Corrective");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS", "Nav_Process")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_PROCESS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_StandardName")
                        .WithMany()
                        .HasForeignKey("STANDARDIZED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Process");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_StandardName");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", "Nav_ProcessDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProcessDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_EVALUATION_METHOD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_MEASURE_CONSIDER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_MONITOR_PROJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN", "Nav_EvaluationPlan")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SAFETY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_StandardName")
                        .WithMany()
                        .HasForeignKey("STANDARDIZED_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_EvaluationPlan");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_StandardName");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_METHOD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_EvaluationMethod")
                        .HasForeignKey("EVALUATION_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_EVALUATION_METHOD", "Nav_Method")
                        .WithMany()
                        .HasForeignKey("METHOD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Method");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_EvaluationUser")
                        .HasForeignKey("EVALUATION_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", "Nav_EvaluationPlanDetail")
                        .WithMany()
                        .HasForeignKey("EVALUATION_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN", "Nav_EvaluationPlan")
                        .WithMany()
                        .HasForeignKey("EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationPlan");

                    b.Navigation("Nav_EvaluationPlanDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Primary")
                        .WithMany()
                        .HasForeignKey("PRIMARY_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD", "Nav_EvaluationRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SAFETY_EVALUATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Second")
                        .WithMany()
                        .HasForeignKey("SECOND_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Three")
                        .WithMany()
                        .HasForeignKey("THREE_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_EvaluationRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Primary");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_Second");

                    b.Navigation("Nav_Three");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_METHOD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_EVALUATION_METHOD", "Nav_Method")
                        .WithMany()
                        .HasForeignKey("METHOD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_DETAIL", "Nav_RecordDetail")
                        .WithMany("Nav_EvaluationMethod")
                        .HasForeignKey("SAFETY_EVALUATION_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Method");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD", "Nav_EvaluationRecord")
                        .WithMany("Nav_RecordUser")
                        .HasForeignKey("SAFETY_EVALUATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_EvaluationRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_MONITOR_PROJECT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN", "Nav_MonitorPlan")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SAFETY_MONITOR_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_MonitorPlan");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN", "Nav_MonitorPlan")
                        .WithMany()
                        .HasForeignKey("SAFETY_MONITOR_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_MonitorPlan");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_MONITOR_PROJECT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD", "Nav_MonitorRecord")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SAFETY_MONITOR_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MonitorRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL", "Nav_MonitorDetails")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SAFETY_MONITOR_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_MonitorDetails");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD", "Nav_MonitorRecord")
                        .WithMany("Nav_MonitorUser")
                        .HasForeignKey("SAFETY_MONITOR_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_MonitorRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_STANDARDIZED_SCORE_AUTO_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Standardized")
                        .WithMany("Nav_Details")
                        .HasForeignKey("STANDARDIZED_SCORE_IMPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Standardized");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_ASSESSMENT_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Primary")
                        .WithMany()
                        .HasForeignKey("PRIMARY_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Second")
                        .WithMany()
                        .HasForeignKey("SECOND_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", "Nav_Three")
                        .WithMany()
                        .HasForeignKey("THREE_ELEMENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Primary");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_Second");

                    b.Navigation("Nav_Three");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_AUDIT_REQUIREMENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_ACCEPTANCE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", "Nav_Change")
                        .WithMany()
                        .HasForeignKey("CHANGE_IDENTIFY_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Change");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", "Nav_Change")
                        .WithMany("Nav_Tasks")
                        .HasForeignKey("CHANGE_IDENTIFY_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_PERFORM_TASK_SET", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Change");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", "Nav_Change")
                        .WithMany("Nav_Types")
                        .HasForeignKey("CHANGE_IDENTIFY_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Change");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", "Nav_Change")
                        .WithMany()
                        .HasForeignKey("CHANGE_IDENTIFY_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_PERFORM_TASK_SET", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Change");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT", "Nav_Implement")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CHANGE_TASK_IMPLEMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Implement");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT", "Nav_Implement")
                        .WithMany("Nav_Users")
                        .HasForeignKey("CHANGE_TASK_IMPLEMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Implement");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_AIR", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Airs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Deals")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Drugs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD_SERI", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Seris")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DEPARTMENT_STEP_LINK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_PICTURE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", "Nav_Design")
                        .WithMany("Nav_Pictures")
                        .HasForeignKey("DESIGN_DOCUMENT_REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Design");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", "Nav_Design")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DESIGN_DOCUMENT_REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Design");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", "Nav_Design")
                        .WithMany("Nav_Requirements")
                        .HasForeignKey("DESIGN_DOCUMENT_REVIEW_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_AUDIT_REQUIREMENT", "Nav_Requirement")
                        .WithMany()
                        .HasForeignKey("REQUIREMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Design");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Requirement");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("OUTBOUND_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("CARRY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany()
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_PLACE", "Nav_Place")
                        .WithMany()
                        .HasForeignKey("PLACE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", "Nav_Specify")
                        .WithMany()
                        .HasForeignKey("SPECIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Place");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Specify");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL", "Nav_RecordDetail")
                        .WithMany("Nav_Accepts")
                        .HasForeignKey("CARRY_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL", "Nav_RecordDetail")
                        .WithMany("Nav_Users")
                        .HasForeignKey("CARRY_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", "Nav_Carry")
                        .WithMany("Nav_Confirms")
                        .HasForeignKey("CARRY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Carry");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany()
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("OUTBOUND_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_PLACE", "Nav_Place")
                        .WithMany()
                        .HasForeignKey("PLACE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", "Nav_Specify")
                        .WithMany()
                        .HasForeignKey("SPECIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Place");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Specify");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL", "Nav_RecordDetail")
                        .WithMany("Nav_Accepts")
                        .HasForeignKey("OUTBOUND_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL", "Nav_RecordDetail")
                        .WithMany("Nav_Users")
                        .HasForeignKey("OUTBOUND_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_PLACE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany("Nav_Confirms")
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany("Nav_Specifys")
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE_SAFE_CONFIRM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany("Nav_Confirms")
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", "Nav_Carry")
                        .WithMany()
                        .HasForeignKey("CARRY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany()
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", "Nav_Specify")
                        .WithMany()
                        .HasForeignKey("SPECIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Carry");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Specify");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_CONFIRM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", "Nav_UseRecord")
                        .WithMany("Nav_Confirms")
                        .HasForeignKey("USE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UseRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany()
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", "Nav_Specify")
                        .WithMany()
                        .HasForeignKey("SPECIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", "Nav_Use")
                        .WithMany("Nav_Details")
                        .HasForeignKey("USE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Specify");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_Use");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL", "Nav_UseRecordDetail")
                        .WithMany("Nav_Confirms")
                        .HasForeignKey("USE_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UseRecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_PRINT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", "Nav_Drug")
                        .WithMany()
                        .HasForeignKey("DRUG_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET_SPECIFY", "Nav_Specify")
                        .WithMany()
                        .HasForeignKey("SPECIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", "Nav_Use")
                        .WithMany()
                        .HasForeignKey("USE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Drug");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Specify");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_Use");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", "Nav_UseRecord")
                        .WithMany("Nav_Users")
                        .HasForeignKey("USE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UseRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_DEAL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Deals")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_DRUG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Drugs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_INVE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Inves")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_MACH", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Machs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD_TUNG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Tungs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ASSISTANCE_APPLICATION", "Nav_Application")
                        .WithMany()
                        .HasForeignKey("APPLICATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Application");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD", "Nav_Record")
                        .WithMany("Nav_Acceptances")
                        .HasForeignKey("EXTERNAL_ACCEPTANCE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("EXTERNAL_ACCEPTANCE_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ASSISTANCE_APPLICATION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_DETAIL", "Nav_ExternalContactDetail")
                        .WithMany()
                        .HasForeignKey("EXTERNAL_COMPANY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR", "Nav_Monitor")
                        .WithMany()
                        .HasForeignKey("MONITOR_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_ExternalContactDetail");

                    b.Navigation("Nav_Monitor");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_DET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Dets")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_ORE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Ores")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_PRE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Pres")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD_SAM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Sams")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR", "Nav_RollStone")
                        .WithMany("Nav_Files")
                        .HasForeignKey("LANDSLIDE_ROLLSTONE_MONITOR_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RollStone");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD", "Nav_Map")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MAP_PROCESS_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Map");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PERFORM_TASK_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_CODE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FORM", "Nav_Form")
                        .WithMany()
                        .HasForeignKey("PF_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK", "Nav_PostForm")
                        .WithMany("Nav_Codes")
                        .HasForeignKey("POST_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Form");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostForm");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK", "Nav_PostForm")
                        .WithMany("Nav_Departments")
                        .HasForeignKey("POST_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostForm");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK_PARAM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK", "Nav_PostForm")
                        .WithMany("Nav_Params")
                        .HasForeignKey("POST_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PostForm");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK", "Nav_ProcessForm")
                        .WithMany("Nav_Details")
                        .HasForeignKey("POST_PROCESS_FORM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProcessForm");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", "Nav_OperationStep")
                        .WithMany()
                        .HasForeignKey("OPERATION_STEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PRODUCTION_OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("PRODUCTION_OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("SURVEY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SURVEY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("SURVEY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Details")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_DRUG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Drugs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_MEAS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Meas")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_SERI", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Seris")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD_TARG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", "Nav_Record")
                        .WithMany("Nav_Targs")
                        .HasForeignKey("OPERATION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY", "Nav_MonitorSummary")
                        .WithMany("Nav_Details")
                        .HasForeignKey("MONITOR_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_MonitorSummary");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", "Nav_SummaryDetail")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("MONOTOR_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SummaryDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany()
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT", "Nav_AssessmentPlan")
                        .WithMany("Nav_Details")
                        .HasForeignKey("ASSESSMENT_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AssessmentPlan");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", "Nav_AuditDetail")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("PLAN_AUDIT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AuditDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT", "Nav_AssessmentPlan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("ASSESSMENT_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AssessmentPlan");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", "Nav_AuditTempDetail")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("PLAN_AUDIT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_AuditTempDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_COLLECT_REQUIREMENTS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_FILE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_FORMULATE_REQUIREMENTS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_GOALS_AND_TARGET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany("Nav_Goals")
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany()
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", "Nav_IndeicatorDepartment")
                        .WithMany("Nav_DepartmentDetail")
                        .HasForeignKey("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_IndeicatorDepartment");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", "Nav_DepartmentDetail")
                        .WithMany("Nav_DetailContent")
                        .HasForeignKey("INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepartmentDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", "Nav_IndeicatorDepartment")
                        .WithMany("Nav_Files")
                        .HasForeignKey("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_IndeicatorDepartment");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", "Nav_IndeicatorDepartment")
                        .WithMany("Nav_TeamDetail")
                        .HasForeignKey("INDICATOR_FORMULATION_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_IndeicatorDepartment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", "Nav_TeamDetail")
                        .WithMany("Nav_DetailContent")
                        .HasForeignKey("INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TeamDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany("Nav_Files")
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_PLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany("Nav_PlanFiles")
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany("Nav_PlanResources")
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_PLAN_RESOURCES", "Nav_Resources")
                        .WithMany()
                        .HasForeignKey("RESOURCES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Resources");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_REQUIREMENTS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_FORMULATE_REQUIREMENTS", "Nav_Formulate")
                        .WithMany()
                        .HasForeignKey("FORMULATE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", "Nav_Indeicator")
                        .WithMany("Nav_Formulates")
                        .HasForeignKey("INDICATOR_FORMULATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Formulate");

                    b.Navigation("Nav_Indeicator");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INTENTIONAL_GUIDELINES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT", "Nav_MonitorAssessment")
                        .WithMany("Nav_Details")
                        .HasForeignKey("MONITOR_ASSESSMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_MonitorAssessment");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL", "Nav_MonitorDetail")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("MONITOR_ASSESSMENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MonitorDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT", "Nav_Monitor")
                        .WithMany("Nav_MonitorUser")
                        .HasForeignKey("MONITOR_ASSESSMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Monitor");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_PLAN_RESOURCES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INTENTIONAL_GUIDELINES", "Nav_Guidelines")
                        .WithMany()
                        .HasForeignKey("GUIDELINES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Guidelines");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_COLLECT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_COLLECT_REQUIREMENTS", "Nav_Collect")
                        .WithMany()
                        .HasForeignKey("COLLECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", "Nav_SafetyPolicy")
                        .WithMany("Nav_Collects")
                        .HasForeignKey("SAFETY_POLICY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Collect");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafetyPolicy");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_INTENTIONAL_GUIDELINES", "Nav_Guidelines")
                        .WithMany()
                        .HasForeignKey("GUIDELINES_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", "Nav_SafetyPolicy")
                        .WithMany("Nav_Feedbacks")
                        .HasForeignKey("SAFETY_POLICY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Guidelines");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafetyPolicy");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY_RANGE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", "Nav_SafetyPolicy")
                        .WithMany("Nav_Ranges")
                        .HasForeignKey("SAFETY_POLICY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafetyPolicy");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_TIME_SET", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", "Nav_DeviceBase")
                        .WithMany()
                        .HasForeignKey("DEVICE_BASE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.DM.T_DM_DEVICE", "Nav_Device")
                        .WithMany()
                        .HasForeignKey("DEVICE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_DeviceBase");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany("Nav_Depts")
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Depost")
                        .WithMany()
                        .HasForeignKey("DEPOST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT", "Nav_Dept")
                        .WithMany("Nav_Posts")
                        .HasForeignKey("DEPT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Depost");

                    b.Navigation("Nav_Dept");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY", "Nav_Library")
                        .WithMany("Nav_Details")
                        .HasForeignKey("DOCUMENT_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL", "Nav_Library")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DOCUMENT_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_Standard")
                        .WithMany("Nav_Files")
                        .HasForeignKey("STANDARD_CREATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Standard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONFIG", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", "Nav_ContentName")
                        .WithMany("Nav_ListContent")
                        .HasForeignKey("CONTENTNAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ContentName");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_DEAL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT", "Nav_Content")
                        .WithMany("Nav_ListContentDeal")
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_ENUMS", "Nav_Enums")
                        .WithMany()
                        .HasForeignKey("CheckLevel_ENUMS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_Minutes")
                        .WithMany()
                        .HasForeignKey("Nav_MinutesID");

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserHost")
                        .WithMany()
                        .HasForeignKey("USER_ID_HOST")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User_Originator")
                        .WithMany()
                        .HasForeignKey("USER_ID_ORIGINATOR")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserRecorder")
                        .WithMany()
                        .HasForeignKey("USER_ID_RECORDER")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Minutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User_Originator");

                    b.Navigation("Nav_UserHost");

                    b.Navigation("Nav_UserRecorder");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_BEGIN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", "Nav_ContentName")
                        .WithMany()
                        .HasForeignKey("CONTENTNAME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_ListMeetingContent")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ContentName");

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_END", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE_OFFICIALSEAL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_FilesOfficialseal")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_FILE_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_FilesRecord")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany()
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT", "Nav_Content")
                        .WithMany()
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListContent")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT_DEAL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_DEAL", "Nav_ContentDeal")
                        .WithMany()
                        .HasForeignKey("CONTENT_DEAL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT", "Nav_Content")
                        .WithMany("Nav_ListContentDeal")
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_ContentDeal");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserDeal")
                        .WithMany()
                        .HasForeignKey("DEAL_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListMinutesDetail")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepartmentDeal");

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL", "Nav_MeetingMinutesDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MEETING_MINUTES_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_MeetingMinutesDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PABSENCE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListPAbsence")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PALL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_ListPAll")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PASKFORLEAVE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListPAskForLeave")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PJOIN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListPJoin")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_PREVIEW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_ListPReView")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_THEME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_THEMES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", "Nav_Meeting")
                        .WithMany("Nav_ListThemes")
                        .HasForeignKey("MEETING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_THEME", "Nav_MeetingTheme")
                        .WithMany()
                        .HasForeignKey("THEME_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Meeting");

                    b.Navigation("Nav_MeetingTheme");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MINUTES_PREVIEW", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", "Nav_MeetingMinutes")
                        .WithMany("Nav_ListPReview")
                        .HasForeignKey("MEETING_MINUTES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MeetingMinutes");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", "Nav_ContentName")
                        .WithMany()
                        .HasForeignKey("CONTENTNAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_ContentName");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListSetDepartment")
                        .HasForeignKey("PLAN_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Depost")
                        .WithMany()
                        .HasForeignKey("DEPOST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Depost");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST_DEPOST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Depost")
                        .WithMany()
                        .HasForeignKey("DEPOST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany("Nav_Posts")
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Depost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST_SAFE_PDT_TEMPLATE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_File")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SC.T_SC_POST", "Nav_Post")
                        .WithMany("Nav_Files")
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_File");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_CERTIFICATE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENTID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE_DB", "Nav_FileDB")
                        .WithMany()
                        .HasForeignKey("FILE_DB_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_FileDB");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", "Nav_Cour")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("EDU_CARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany()
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Cour");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Test");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", "Nav_Cour")
                        .WithMany("Nav_Files")
                        .HasForeignKey("COURSEWEARLIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Cour");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_TestEnumPoint")
                        .WithMany()
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_DETAIL", "Nav_DepTrainPlanDetail")
                        .WithMany("Nav_DepTrainPlanContent")
                        .HasForeignKey("DEP_TRAIN_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DepTrainPlanDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TestEnumPoint");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_CHECK_TYPE_ENUM", "Nav_TrainCheckTypeEnum")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN", "Nav_DepTrainPlan")
                        .WithMany("Nav_DepTrainPlanDetail")
                        .HasForeignKey("DEP_TRAIN_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", "Nav_TrainTypeEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DepTrainPlan");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TrainCheckTypeEnum");

                    b.Navigation("Nav_TrainTypeEnum");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_CONTENT", "Nav_Content")
                        .WithMany()
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", "Nav_NewUser")
                        .WithMany("Nav_Files")
                        .HasForeignKey("NEW_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_NewUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_TEACHER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", "Nav_Users")
                        .WithMany("Nav_Teachers")
                        .HasForeignKey("NEW_USERS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", "Nav_NewUser")
                        .WithMany("Nav_NewUserDetail")
                        .HasForeignKey("EDU_CARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_DepartmentNext")
                        .WithMany()
                        .HasForeignKey("NEXT_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("USER_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("USER_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentNext");

                    b.Navigation("Nav_NewUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", "Nav_UserDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("USER_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_UserDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_PAPER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", "Nav_Record")
                        .WithMany("Nav_Papers")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany()
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", "Nav_Text")
                        .WithMany("Nav_ListPaper")
                        .HasForeignKey("TEXT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Test");

                    b.Navigation("Nav_Text");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_CERTIFICATE_TYPE", "Nav_CertificateType")
                        .WithMany()
                        .HasForeignKey("CERTIFICATE_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CertificateType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", "Nav_Renewal")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RENEWALD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Renewal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", "Nav_Safe")
                        .WithMany("Nav_JoinDepartment")
                        .HasForeignKey("SAFE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Safe");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", "Nav_Safe")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SAFE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Safe");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_PAPER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", "Nav_Safe")
                        .WithMany("Nav_Papers")
                        .HasForeignKey("SAFE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany()
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Safe");

                    b.Navigation("Nav_Test");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_LIST_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_Point")
                        .WithMany()
                        .HasForeignKey("POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", "Nav_Safe")
                        .WithMany("Nav_Points")
                        .HasForeignKey("SAFE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Point");

                    b.Navigation("Nav_Safe");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY_USER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", "Nav_Survey")
                        .WithMany("Nav_ListUsers")
                        .HasForeignKey("SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Survey");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SECONFIG", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVAL_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_LIST_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_Point")
                        .WithMany()
                        .HasForeignKey("POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany("Nav_Points")
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Point");

                    b.Navigation("Nav_Test");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST_LIST_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany("Nav_Posts")
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_Test");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_CONTENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_EDU_CARD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_CONTENT", "Nav_Content")
                        .WithMany()
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_EDU_CARD", "Nav_EDUCard")
                        .WithMany("Nav_TrainRecordList")
                        .HasForeignKey("EDU_CARD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EDUCard");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD", "Nav_TrainRecord")
                        .WithMany("Nav_TrainRecordFile")
                        .HasForeignKey("TRAIN_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TrainRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_SIGNATURE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD", "Nav_TrainRecord")
                        .WithMany("Nav_TrainSignatureFile")
                        .HasForeignKey("TRAIN_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TrainRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_END", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAINING_SURVEY_SUBJECT", "Nav_Subject")
                        .WithMany()
                        .HasForeignKey("SUBJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION", "Nav_TrainingEffect")
                        .WithMany("Nav_ResultList")
                        .HasForeignKey("TRAINING_EFFECT_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Subject");

                    b.Navigation("Nav_TrainingEffect");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_OPINION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION", "Nav_TrainingEffect")
                        .WithMany("Nav_OpinionList")
                        .HasForeignKey("TRAINING_EFFECT_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TrainingEffect");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY_RESULTS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAINING_SURVEY_SUBJECT", "Nav_Subject")
                        .WithMany()
                        .HasForeignKey("SUBJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY", "Nav_TrainingEffectSurvey")
                        .WithMany("Nav_ResultList")
                        .HasForeignKey("TRAINING_EFFECT_EVALUATION_SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Subject");

                    b.Navigation("Nav_TrainingEffectSurvey");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_SURVEY_SUBJECT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_CHECK_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_DEMAND_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecordUser")
                        .WithMany()
                        .HasForeignKey("RECORD_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_TrainDepartment")
                        .WithMany()
                        .HasForeignKey("TRAIN_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", "Nav_TrainType")
                        .WithMany()
                        .HasForeignKey("TRAIN_TYPE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserTeacher")
                        .WithMany()
                        .HasForeignKey("USER_ID_TEACHER")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordUser");

                    b.Navigation("Nav_TrainDepartment");

                    b.Navigation("Nav_TrainType");

                    b.Navigation("Nav_UserTeacher");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_CONTENT_REL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
                        .WithMany("Nav_TrainContentList")
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_Point")
                        .WithMany()
                        .HasForeignKey("POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Point");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", "Nav_Cour")
                        .WithMany()
                        .HasForeignKey("COURSEWEARLIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
                        .WithMany("Nav_ListCour")
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Cour");

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
                        .WithMany("Nav_Files")
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY_PERSONS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
                        .WithMany("Nav_TrainUserList")
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVAL_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", "Nav_Plan")
                        .WithMany("Nav_ListPlanDetail")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", "Nav_TrainTypeEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_TrainTypeEnum");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", "Nav_PlanDetail")
                        .WithMany("Nav_ListDetailDepartment")
                        .HasForeignKey("PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", "Nav_Plan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
                        .WithMany()
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_PAPER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", "Nav_Record")
                        .WithMany("Nav_Papers")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER", "Nav_RecordUser")
                        .WithMany()
                        .HasForeignKey("RECORD_UUSER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST", "Nav_Test")
                        .WithMany()
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_TEXT", "Nav_Text")
                        .WithMany("Nav_ListPaper")
                        .HasForeignKey("TEXT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_RecordUser");

                    b.Navigation("Nav_Test");

                    b.Navigation("Nav_Text");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_REPORT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_TEXT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", "Nav_Record")
                        .WithMany("Nav_Users")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER", "Nav_RecordUser")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_VIEW", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", "Nav_Survey")
                        .WithMany("Nav_Demands")
                        .HasForeignKey("SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Survey");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND_ITEM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_DEMAND_ENUM", "Nav_DEMAND")
                        .WithMany()
                        .HasForeignKey("DEMAND_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND", "Nav_List")
                        .WithMany("Nav_Items")
                        .HasForeignKey("LIST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DEMAND");

                    b.Navigation("Nav_List");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", "Nav_Survey")
                        .WithMany("Nav_JoinDepartment")
                        .HasForeignKey("SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Survey");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_Point")
                        .WithMany()
                        .HasForeignKey("POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", "Nav_Survey")
                        .WithMany("Nav_Points")
                        .HasForeignKey("SURVEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Point");

                    b.Navigation("Nav_Survey");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_USER_TEMP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TEST_ENUM_POINT", "Nav_TestEnumPoint")
                        .WithMany()
                        .HasForeignKey("CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DETAIL", "Nav_YearTrainPlanDetail")
                        .WithMany("Nav_YearTrainPlanContent")
                        .HasForeignKey("YEAR_TRAIN_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_TestEnumPoint");

                    b.Navigation("Nav_YearTrainPlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DEPARTMENT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", "Nav_YearTrainPlan")
                        .WithMany("Nav_YearTrainPlanDepartment")
                        .HasForeignKey("YEAR_TRAIN_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_YearTrainPlan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_CHECK_TYPE_ENUM", "Nav_TrainCheckTypeEnum")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ResponsibilityDep")
                        .WithMany()
                        .HasForeignKey("RESPONSIBILITY_DEP_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ResponsibilityUser")
                        .WithMany()
                        .HasForeignKey("RESPONSIBILITY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", "Nav_TrainTypeEnum")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", "Nav_YearTrainPlan")
                        .WithMany("Nav_YearTrainPlanDetail")
                        .HasForeignKey("YEAR_TRAIN_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ResponsibilityDep");

                    b.Navigation("Nav_ResponsibilityUser");

                    b.Navigation("Nav_TrainCheckTypeEnum");

                    b.Navigation("Nav_TrainTypeEnum");

                    b.Navigation("Nav_YearTrainPlan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", "Nav_YearTrainPlan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("YEAR_TRAIN_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_YearTrainPlan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREC", "Nav_SCOREC")
                        .WithMany()
                        .HasForeignKey("SCOREC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREE", "Nav_SCOREE")
                        .WithMany()
                        .HasForeignKey("SCOREE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREL", "Nav_SCOREL")
                        .WithMany()
                        .HasForeignKey("SCOREL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_SCOREC");

                    b.Navigation("Nav_SCOREE");

                    b.Navigation("Nav_SCOREL");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY", "Nav_Library")
                        .WithMany("Nav_Details")
                        .HasForeignKey("BASIC_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL", "Nav_LibraryDetail")
                        .WithMany("Nav_DetailContents")
                        .HasForeignKey("BASIC_LIBRARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_LibraryDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT", "Nav_DetailContent")
                        .WithMany("Nav_DetailBasics")
                        .HasForeignKey("BASIC_LIBRARY_DETAIL_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailContent");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT", "Nav_DetailContent")
                        .WithMany("Nav_DetailHiddens")
                        .HasForeignKey("BASIC_LIBRARY_DETAIL_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailContent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("BASIC_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Hiddens")
                        .HasForeignKey("BASIC_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Measures")
                        .HasForeignKey("BASIC_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE_LEVEL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE", "Nav_Measure")
                        .WithMany("Nav_Levels")
                        .HasForeignKey("BASIC_LIBRARY_TEMP_MEASURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Measure");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany("Nav_ContentsBasics")
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CYCLE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_Types")
                        .WithMany("Nav_CheckCycle")
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Types");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany("Nav_ListCheckQuestion")
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET", "Nav_CheckSet")
                        .WithMany("Nav_CheckSetContents")
                        .HasForeignKey("CHECK_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_CheckSet");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", "Nav_CheckSetContent")
                        .WithMany("Nav_ContentsAreas")
                        .HasForeignKey("CHECK_SET_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_CheckSetContent");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA_RISK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA", "Nav_CheckSetContentArea")
                        .WithMany("Nav_ContentsAreaRisks")
                        .HasForeignKey("CHECK_SET_CONTENTS_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckSetContentArea");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskName");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", "Nav_CheckSetContent")
                        .WithMany("Nav_ContentsBasics")
                        .HasForeignKey("CHECK_CONTENTS_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckSetContent");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", "Nav_CheckSetContent")
                        .WithMany("Nav_ContentsHiddens")
                        .HasForeignKey("CHECK_CONTENTS_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckSetContent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET", "Nav_CheckSet")
                        .WithMany("Nav_CheckUsers")
                        .HasForeignKey("CHECK_SET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckSet");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM", "Nav_Double")
                        .WithMany("Nav_DoubleDetails")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREC", "Nav_SCOREC")
                        .WithMany()
                        .HasForeignKey("SCOREC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREE", "Nav_SCOREE")
                        .WithMany()
                        .HasForeignKey("SCOREE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREL", "Nav_SCOREL")
                        .WithMany()
                        .HasForeignKey("SCOREL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Double");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_SCOREC");

                    b.Navigation("Nav_SCOREE");

                    b.Navigation("Nav_SCOREL");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", "Nav_DoubleDetail")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DoubleDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART", "Nav_DetailDepart")
                        .WithMany("Nav_DepartDetails")
                        .HasForeignKey("MECHANISM_DETAIL_DEPART_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DetailDepart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", "Nav_DoubleDetail")
                        .WithMany("Nav_DoubleDetailMeasures")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DoubleDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES", "Nav_DoubleDetailMeasure")
                        .WithMany("Nav_DetailMeasureContents")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_DoubleDetailMeasure");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", "Nav_DetailMeasureContent")
                        .WithMany("Nav_DetailMeasureContentBasics")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailMeasureContent");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_DEPART", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST", "Nav_DetailDepart")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DetailDepart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", "Nav_DetailMeasureContent")
                        .WithMany("Nav_DetailMeasureContentHiddens")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailMeasureContent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", "Nav_DetailMeasureContent")
                        .WithMany("Nav_DetailMeasureContentPosts")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DetailMeasureContent");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", "Nav_DoubleDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DoubleDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM", "Nav_Double")
                        .WithMany("Nav_DoubleFiles")
                        .HasForeignKey("DOUBLE_PREVENT_MECHANISM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Double");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREC", "Nav_SCOREC")
                        .WithMany()
                        .HasForeignKey("SCOREC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREE", "Nav_SCOREE")
                        .WithMany()
                        .HasForeignKey("SCOREE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREL", "Nav_SCOREL")
                        .WithMany()
                        .HasForeignKey("SCOREL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_SCOREC");

                    b.Navigation("Nav_SCOREE");

                    b.Navigation("Nav_SCOREL");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DEPART", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
                        .WithMany()
                        .HasForeignKey("APPROVE_ROLE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", "Nav_Library")
                        .WithMany("Nav_Departs")
                        .HasForeignKey("ENTERPRISE_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApproveRole");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", "Nav_Library")
                        .WithMany("Nav_Details")
                        .HasForeignKey("ENTERPRISE_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL", "Nav_LibraryDetail")
                        .WithMany("Nav_DetailContents")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_LibraryDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", "Nav_DetailContent")
                        .WithMany("Nav_DetailBasics")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailContent");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", "Nav_DetailContent")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DetailContent");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", "Nav_DetailContent")
                        .WithMany("Nav_DetailHiddens")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailContent");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART", "Nav_DetailDepart")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DetailDepart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART", "Nav_DetailDepart")
                        .WithMany("Nav_DetailUsers")
                        .HasForeignKey("ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_DetailDepart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", "Nav_Library")
                        .WithMany("Nav_Posts")
                        .HasForeignKey("ENTERPRISE_LIBRARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST", "Nav_LibraryPost")
                        .WithMany("Nav_PostDetails")
                        .HasForeignKey("ENTERPRISE_LIBRARY_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_LibraryPost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.HM.T_HM_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Contents")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT", "Nav_Content")
                        .WithMany("Nav_Departs")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_CONTENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Content");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_POST", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART", "Nav_Depart")
                        .WithMany("Nav_Posts")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Depart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_HIDDEN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Hiddens")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", "Nav_Library")
                        .WithMany("Nav_Measures")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Library");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE", "Nav_Measure")
                        .WithMany("Nav_Departs")
                        .HasForeignKey("ENTERPRISE_LIBRARY_TEMP_MEASURE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Measure");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT", "Nav_Report")
                        .WithMany()
                        .HasForeignKey("HIDDEN_DANGER_HAND_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecitifyUser")
                        .WithMany()
                        .HasForeignKey("RECITIFY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RecitifyUser");

                    b.Navigation("Nav_Report");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", "Nav_Confirm")
                        .WithMany("Nav_Basics")
                        .HasForeignKey("HIDDEN_DANGER_CONFIRM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Confirm");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", "Nav_Confirm")
                        .WithMany("Nav_Files")
                        .HasForeignKey("HIDDEN_DANGER_CONFIRM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Confirm");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_PHOTO", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", "Nav_Confirm")
                        .WithMany("Nav_Photos")
                        .HasForeignKey("HIDDEN_DANGER_CONFIRM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Confirm");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM_REASON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", "Nav_Confirm")
                        .WithMany("Nav_Reasons")
                        .HasForeignKey("HIDDEN_DANGER_CONFIRM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Confirm");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT", "Nav_Report")
                        .WithMany("Nav_ReportFiles")
                        .HasForeignKey("HIDDEN_DANGER_HAND_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Report");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_DELAY_APPLY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_RectifyRecord")
                        .WithMany()
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RectifyRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AcceptUser")
                        .WithMany()
                        .HasForeignKey("ACCEPT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE", "Nav_Rectify")
                        .WithMany("Nav_RectifyDetails")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ImplementUser")
                        .WithMany()
                        .HasForeignKey("IMPLEMENT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecitifyUser")
                        .WithMany()
                        .HasForeignKey("RECITIFY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AcceptUser");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_ImplementUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RecitifyUser");

                    b.Navigation("Nav_Rectify");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", "Nav_RectifyDetail")
                        .WithMany("Nav_RectifyDetailBasics")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RectifyDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", "Nav_RectifyDetail")
                        .WithMany("Nav_RectifyDetailFiles")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RectifyDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_REASON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", "Nav_RectifyDetail")
                        .WithMany("Nav_RectifyDetailReasons")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");

                    b.Navigation("Nav_RectifyDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE", "Nav_Rectify")
                        .WithMany("Nav_RectifyFiles")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_AcceptUser")
                        .WithMany()
                        .HasForeignKey("ACCEPT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ImplementUser")
                        .WithMany()
                        .HasForeignKey("IMPLEMENT_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecitifyUser")
                        .WithMany()
                        .HasForeignKey("RECITIFY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_AcceptUser");

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_ImplementUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RecitifyUser");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_Rectify")
                        .WithMany("Nav_RectifyBasics")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_Rectify")
                        .WithMany("Nav_RectifyFiles")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_Rectify")
                        .WithMany("Nav_RectifyPhotoas")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOB", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_Rectify")
                        .WithMany("Nav_RectifyPhotobs")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD_REASON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_Rectify")
                        .WithMany("Nav_RectifyReasons")
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");

                    b.Navigation("Nav_Rectify");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT", "Nav_Report")
                        .WithMany("Nav_ReportDetails")
                        .HasForeignKey("HIDDEN_DANGER_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecitifyUser")
                        .WithMany()
                        .HasForeignKey("RECITIFY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RecitifyUser");

                    b.Navigation("Nav_Report");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", "Nav_ReportDetail")
                        .WithMany("Nav_ReportDetailBasics")
                        .HasForeignKey("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ReportDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", "Nav_ReportDetail")
                        .WithMany("Nav_ReportDetailFiles")
                        .HasForeignKey("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ReportDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL_REASON", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", "Nav_ReportDetail")
                        .WithMany("Nav_ReportDetailReasons")
                        .HasForeignKey("HIDDEN_DANGER_REPORT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");

                    b.Navigation("Nav_ReportDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT", "Nav_Report")
                        .WithMany("Nav_ReportFiles")
                        .HasForeignKey("HIDDEN_DANGER_REPORT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Report");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany("Nav_Details")
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL", "Nav_PlanDetail")
                        .WithMany("Nav_DetailUsers")
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_EVALUATION", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", "Nav_Evaluation")
                        .WithMany()
                        .HasForeignKey("EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany("Nav_Evaluations")
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_REQUIRE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_Plan")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_HIDDEN", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_MEASURES", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_MAIN_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_POST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_TEMP", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_LIBRARY_IMPORT_TEMP_NEW", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ChargeUser")
                        .WithMany()
                        .HasForeignKey("CHARGE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", "Nav_RectifyRecord")
                        .WithMany()
                        .HasForeignKey("HIDDEN_DANGER_RECTIFY_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_MONITOR_DEPART", "Nav_MonitorDepart")
                        .WithMany()
                        .HasForeignKey("MONITOR_DEPART_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_ChargeUser");

                    b.Navigation("Nav_MonitorDepart");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RectifyRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE", "Nav_Major")
                        .WithMany("Nav_Files")
                        .HasForeignKey("MAJOR_ACCIDENT_HAZARD_MANAGE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Major");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE", "Nav_Major")
                        .WithMany("Nav_Users")
                        .HasForeignKey("MAJOR_ACCIDENT_HAZARD_MANAGE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Major");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MEASURE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MONITOR_DEPART", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserSend")
                        .WithMany()
                        .HasForeignKey("USER_ID_SEND")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_UserSend");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListArea")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_DEPARTMENT_OUT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListDepOut")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET_DEP_OBJECT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", "Nav_PlanSet")
                        .WithMany("Nav_ListSetDepObject")
                        .HasForeignKey("PLANSET_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PlanSet");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_REQUEST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Parent")
                        .WithMany("Nav_Children")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_plan")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", "Nav_Evaluation")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RISK_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREC", "Nav_SCOREC")
                        .WithMany()
                        .HasForeignKey("SCOREC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREE", "Nav_SCOREE")
                        .WithMany()
                        .HasForeignKey("SCOREE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREL", "Nav_SCOREL")
                        .WithMany()
                        .HasForeignKey("SCOREL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_SCOREC");

                    b.Navigation("Nav_SCOREE");

                    b.Navigation("Nav_SCOREL");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("RISK_EVALUATION_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_MEASURE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailMeasures")
                        .HasForeignKey("RISK_EVALUATION_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("RISK_EVALUATION_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST", "Nav_DetailPost")
                        .WithMany("Nav_PostDetails")
                        .HasForeignKey("RISK_EVALUATION_DETAIL_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailPost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", "Nav_Evaluation")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_REQUIRE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", "Nav_Evaluation")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("RISK_EVALUATION_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_plan")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", "Nav_Evaluation")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREC", "Nav_SCOREC")
                        .WithMany()
                        .HasForeignKey("SCOREC_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREE", "Nav_SCOREE")
                        .WithMany()
                        .HasForeignKey("SCOREE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SCOREL", "Nav_SCOREL")
                        .WithMany()
                        .HasForeignKey("SCOREL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_SCOREC");

                    b.Navigation("Nav_SCOREE");

                    b.Navigation("Nav_SCOREL");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_MEASURE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailMeasures")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", "Nav_EvaluationDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_EvaluationDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST", "Nav_DetailPost")
                        .WithMany("Nav_PostDetails")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_DETAIL_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailPost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", "Nav_Evaluation")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_REQUIRE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_EVALUATION", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", "Nav_Evaluation")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("RISK_EVALUATION_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Evaluation");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_plan")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", "Nav_Identify")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RISK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Identify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_MEASURE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL", "Nav_IdentifyDetail")
                        .WithMany("Nav_DetailMeasures")
                        .HasForeignKey("RISK_IDENTIFY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_IdentifyDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", "Nav_IdentifyDetail")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_IdentifyDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", "Nav_IdentifyDetail")
                        .WithMany("Nav_DetailMeasures")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_IdentifyDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", "Nav_IdentifyDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_IdentifyDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", "Nav_DetailPost")
                        .WithMany("Nav_ResultPostDets")
                        .HasForeignKey("RISK_IDENTIFY_DETAIL_RESULT_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DetailPost");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", "Nav_Identify")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identify");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_REQUIRE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", "Nav_Identify")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("RISK_IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Identify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_plan")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", "Nav_Identify")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Identify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", "Nav_IdentifyResult")
                        .WithMany("Nav_Details")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_IdentifyResult");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", "Nav_IdentifyResult")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_IdentifyResult");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_REQUIRE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", "Nav_IdentifyResult")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("RISK_IDENTIFY_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_IdentifyResult");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", "Nav_plan")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_EVALUATION_PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", "Nav_Identify")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", "Nav_IdentifyResult")
                        .WithMany()
                        .HasForeignKey("IDENTIFY_RESULT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_Identify");

                    b.Navigation("Nav_IdentifyResult");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_plan");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DEPART", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", "Nav_SummaryDetail")
                        .WithMany("Nav_DetailDeparts")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SummaryDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", "Nav_IdentifySummary")
                        .WithMany("Nav_Details")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", "Nav_RiskName")
                        .WithMany()
                        .HasForeignKey("RISK_NAME_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_IdentifySummary");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RiskName");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", "Nav_IdentifySummary")
                        .WithMany("Nav_Files")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_IdentifySummary");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_MEASURE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", "Nav_SummaryDetail")
                        .WithMany("Nav_DetailMeasures")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SummaryDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", "Nav_SummaryDetail")
                        .WithMany("Nav_DetailPosts")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SummaryDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", "Nav_SummaryPost")
                        .WithMany("Nav_SumPostDets")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_SummaryPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_REQUIRE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", "Nav_IdentifySummary")
                        .WithMany("Nav_Requires")
                        .HasForeignKey("IDENTIFY_RESULT_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_REQUEST", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_IdentifySummary");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_NAME", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREC", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SCOREL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", "Nav_CheckNotice")
                        .WithMany("Nav_CheckNoticeDetails")
                        .HasForeignKey("SECURITY_INSPECTION_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckNotice");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL", "Nav_CheckNoticeDetail")
                        .WithMany("Nav_CheckNoticeDetailBasics")
                        .HasForeignKey("SECURITY_INSPECTION_NOTICE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckNoticeDetail");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL", "Nav_CheckNoticeDetail")
                        .WithMany("Nav_CheckNoticeDetailUsers")
                        .HasForeignKey("SECURITY_INSPECTION_NOTICE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckNoticeDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", "Nav_CheckNotice")
                        .WithMany("Nav_CheckNoticeFiles")
                        .HasForeignKey("SECURITY_INSPECTION_NOTICE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckNotice");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_RecordUser")
                        .WithMany()
                        .HasForeignKey("RECORD_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");

                    b.Navigation("Nav_RecordUser");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD", "Nav_CheckRecord")
                        .WithMany("Nav_CheckRecordDetails")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecord");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailBasics")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailFiles")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailReasons")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailUsers")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD", "Nav_CheckRecord")
                        .WithMany("Nav_CheckRecordFiles")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecord");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_ApplyDepartment")
                        .WithMany()
                        .HasForeignKey("APPLY_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_ApplyUser")
                        .WithMany()
                        .HasForeignKey("APPLY_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_ProductionUnit")
                        .WithMany()
                        .HasForeignKey("PRODUCTION_UNIT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyDepartment");

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProductionUnit");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", "Nav_Contents")
                        .WithMany()
                        .HasForeignKey("CHECK_CONTENTS_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_CHECK_QUESTION", "Nav_Question")
                        .WithMany()
                        .HasForeignKey("CHECK_QUESTION_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_RiskArea")
                        .WithMany()
                        .HasForeignKey("RISK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY", "Nav_CheckRecord")
                        .WithMany("Nav_CheckRecordDetails")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecord");

                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Question");

                    b.Navigation("Nav_RiskArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_BASIC", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.LR.T_LR_LAW", "Nav_Law")
                        .WithMany()
                        .HasForeignKey("LAW_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailBasics")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Law");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailFiles")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_REASON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_REASON", "Nav_Reason")
                        .WithMany()
                        .HasForeignKey("REASON_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailReasons")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Reason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", "Nav_CheckRecordDetail")
                        .WithMany("Nav_CheckRecordDetailUsers")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckRecordDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY", "Nav_CheckRecord")
                        .WithMany("Nav_CheckRecordFiles")
                        .HasForeignKey("SECURITY_INSPECTION_RECORD_SUMMARY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckRecord");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_TIME_SET", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_VIDEO_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", "Nav_Area")
                        .WithMany("Nav_Videos")
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE_DB", "Nav_Viedo")
                        .WithMany()
                        .HasForeignKey("VIDEO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Viedo");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_COST_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", "Nav_Accident")
                        .WithMany()
                        .HasForeignKey("ACCIDENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Accident");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD", "Nav_Record")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_USER_RECORD", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD", "Nav_Record")
                        .WithMany("Nav_UserList")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN", "Nav_Plan")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN", "Nav_Plan")
                        .WithMany("Nav_Ranges")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE_TYPE", "Nav_Range")
                        .WithMany()
                        .HasForeignKey("RANGE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Range");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN", "Nav_Plan")
                        .WithMany("Nav_Sources")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE_TYPE", "Nav_Source")
                        .WithMany()
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_Source");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Manger")
                        .WithMany()
                        .HasForeignKey("MANAGER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN", "Nav_Plan")
                        .WithMany("Nav_ListProject")
                        .HasForeignKey("PLAN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Manger");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Plan");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK", "Nav_ProjectCheck")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PROJECT_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProjectCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK_WFFILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK", "Nav_ProjectCheck")
                        .WithMany("Nav_WFFiles")
                        .HasForeignKey("PROJECT_CHECK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProjectCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY", "Nav_Money")
                        .WithMany("Nav_Details")
                        .HasForeignKey("MONEY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Money");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL", "Nav_Detail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_RANGE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany("Nav_Ranges")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN_RANGE_TYPE", "Nav_Range")
                        .WithMany()
                        .HasForeignKey("RANGE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_Range");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_SOURCE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany("Nav_Sources")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PLAN_SOURCE_TYPE", "Nav_Source")
                        .WithMany()
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_Source");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_WFFILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_PROJECT", "Nav_Project")
                        .WithMany("Nav_WFFiles")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD", "Nav_SafePdtCostRecord")
                        .WithMany("Nav_Files")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafePdtCostRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD_TYPE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_COST_TYPE", "Nav_CostType")
                        .WithMany()
                        .HasForeignKey("COST_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD", "Nav_SafePdtCostRecord")
                        .WithMany("Nav_SafePdtCostRecordType")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CostType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SafePdtCostRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK", "Nav_Back")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("BACK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Back");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL", "Nav_BackDetail")
                        .WithMany("Nav_ListDetailUser")
                        .HasForeignKey("BACK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK", "Nav_Back")
                        .WithMany()
                        .HasForeignKey("BACK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Back");

                    b.Navigation("Nav_BackDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK", "Nav_Back")
                        .WithMany("Nav_Files")
                        .HasForeignKey("BACK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Back");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_APPROVE", "Nav_Approve")
                        .WithMany()
                        .HasForeignKey("APPROVE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD", "Nav_BackRecord")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("BACK_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_BackRecord");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_REQUIRE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_BACK", "Nav_Back")
                        .WithMany("Nav_ListBackRequire")
                        .HasForeignKey("BACK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_REQUIRE", "Nav_Require")
                        .WithMany()
                        .HasForeignKey("REQUIRE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Back");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Require");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_CACULATE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_CACULATE_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_CACULATE", "Nav_Caculate")
                        .WithMany("Nav_Files")
                        .HasForeignKey("CACULATE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Caculate");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM", "Nav_Sum")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK", "Nav_HighCheck")
                        .WithMany("Nav_Files")
                        .HasForeignKey("HIGH_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_HighCheck");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_OUT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_OUT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_OUT", "Nav_Out")
                        .WithMany("Nav_Files")
                        .HasForeignKey("OUT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Out");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PLAN_SET", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH", "Nav_Hight")
                        .WithMany("Nav_Files")
                        .HasForeignKey("HIGHT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hight");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT_FILE", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT", "Nav_Hight")
                        .WithMany("Nav_Files")
                        .HasForeignKey("HIGHT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Hight");

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE", "Nav_ProjectIntroduce")
                        .WithMany("Nav_Files")
                        .HasForeignKey("INTRODUCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_ProjectIntroduce");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_CHECK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", "Nav_Project")
                        .WithMany("Nav_FilesWatch")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", "Nav_Project")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD_WATCH_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", "Nav_Project")
                        .WithMany("Nav_FilesCheck")
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", "Nav_SlopeBank")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SLOPEBANK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SlopeBank");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_PROJ_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", "Nav_SlopeBank")
                        .WithMany("Nav_Files_Proj")
                        .HasForeignKey("SLOPEBANK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SlopeBank");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK_SUB_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", "Nav_SlopeBank")
                        .WithMany("Nav_Files_Sub")
                        .HasForeignKey("SLOPEBANK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SlopeBank");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK", "Nav_QualityCheck")
                        .WithMany("Nav_Files")
                        .HasForeignKey("QUALITY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_QualityCheck");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_REQUIRE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_SET_WATCH_DAYLY_ITEM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_TAILING", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY", "Nav_Dayly")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("DAYLY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_SET_WATCH_DAYLY_ITEM", "Nav_Item")
                        .WithMany()
                        .HasForeignKey("ITEM_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Dayly");

                    b.Navigation("Nav_Item");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL", "Nav_DaylyDetail")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("DAYLY_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_DaylyDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY", "Nav_Dayly")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("DAYLY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Dayly");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE", "Nav_Line")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("LINE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_POINT", "Nav_WatchLinePoint")
                        .WithMany()
                        .HasForeignKey("WATCH_LINE_POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Line");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_WatchLinePoint");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL", "Nav_LineDetail")
                        .WithMany("Nav_Files")
                        .HasForeignKey("LINE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_LineDetail");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL", "Nav_LineDetail")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("LINE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_LineDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE", "Nav_Move")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("MOVE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_POINT", "Nav_WatchMovePoint")
                        .WithMany()
                        .HasForeignKey("WATCH_MOVE_POINT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Move");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_WatchMovePoint");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL_USER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL", "Nav_MoveDetail")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("MOVE_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MoveDetail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_POINT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT", "Nav_Percent")
                        .WithMany("Nav_ListDetail")
                        .HasForeignKey("PERCENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", "Nav_Sum")
                        .WithMany()
                        .HasForeignKey("SUM_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Percent");

                    b.Navigation("Nav_Sum");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL", "Nav_PercentDetail")
                        .WithMany("Nav_ListUser")
                        .HasForeignKey("PERCENT_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_PercentDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PLAN_SET", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_SUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.TL.T_TL_TAILING", "Nav_Tailing")
                        .WithMany()
                        .HasForeignKey("TAILING_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Tailing");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_MAIN", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_CheckArea")
                        .WithMany()
                        .HasForeignKey("CHECK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckArea");

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
                        .WithMany()
                        .HasForeignKey("POST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_DisCloseUser")
                        .WithMany()
                        .HasForeignKey("DISCLOSE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_MointerDepartment")
                        .WithMany()
                        .HasForeignKey("MOINTER_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MointerUser")
                        .WithMany()
                        .HasForeignKey("MOINTER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_JOB_TYPE_ENUM", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DisCloseUser");

                    b.Navigation("Nav_MointerDepartment");

                    b.Navigation("Nav_MointerUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_AUDIT", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_Audit")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_DisCloseDetails")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_DisCloseFiles")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_DISCLOSE_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_DisCloseUsers")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_MointerDepartment")
                        .WithMany()
                        .HasForeignKey("MOINTER_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_MointerUser")
                        .WithMany()
                        .HasForeignKey("MOINTER_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_MointerRecordDetails")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_MointerDepartment");

                    b.Navigation("Nav_MointerUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_RecordDetails")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_USER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", "Nav_Parent")
                        .WithMany("Nav_Users")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", "Nav_Record")
                        .WithMany()
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL", "Nav_Detail")
                        .WithMany()
                        .HasForeignKey("DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", "Nav_Parent")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", "Nav_Notify")
                        .WithMany()
                        .HasForeignKey("NOTIFY_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Notify");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD", "Nav_Parent")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL_AFTER_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files2")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL_BEFORE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files1")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_JOB_TYPE_ENUM", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM_DETAIL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM", "Nav_Parent")
                        .WithMany("Nav_Detail")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TYPE", "Nav_Type")
                        .WithMany()
                        .HasForeignKey("TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Type");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Source")
                        .WithMany("Nav_Files")
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Source");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TEST", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Source")
                        .WithMany("Nav_Tests")
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Source");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_TRAIN_SELECT", "Nav_Parent")
                        .WithMany()
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS", "Nav_Order")
                        .WithMany("Nav_ListUserPaper")
                        .HasForeignKey("ORDER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany()
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Source")
                        .WithMany()
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TEST", "Nav_Test")
                        .WithMany()
                        .HasForeignKey("TEST_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDER", null)
                        .WithMany("Nav_ListUserPaper")
                        .HasForeignKey("T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDERID");

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Order");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_Source");

                    b.Navigation("Nav_Test");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDER", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Record")
                        .WithMany("Nav_ListPaperOrder")
                        .HasForeignKey("RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PHOTO", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany("Nav_Photos")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_OFF", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Outsource")
                        .WithMany()
                        .HasForeignKey("OUTSOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany("Nav_ListSourceOff")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Outsource");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_SOURCE_ON", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Outsource")
                        .WithMany()
                        .HasForeignKey("OUTSOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany("Nav_ListSourceOn")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Outsource");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", "Nav_Parent")
                        .WithMany("Nav_Users")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS_FILES", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_VIDEO", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", "Nav_Source")
                        .WithMany("Nav_Videos")
                        .HasForeignKey("SOURCE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE_DB", "Nav_Video")
                        .WithMany()
                        .HasForeignKey("VIDEO_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Source");

                    b.Navigation("Nav_Video");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
                        .WithMany()
                        .HasForeignKey("LAUNCH_DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_LaunchUser")
                        .WithMany()
                        .HasForeignKey("LAUNCH_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_SceneUser")
                        .WithMany()
                        .HasForeignKey("SCENE_USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_UserSafe")
                        .WithMany()
                        .HasForeignKey("USER_ID_SAFE")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_SceneUser");

                    b.Navigation("Nav_User");

                    b.Navigation("Nav_UserSafe");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER", "Nav_Parent")
                        .WithMany("Nav_Item1")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER", "Nav_Parent")
                        .WithMany("Nav_Item2")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_WORKTYPE", "Nav_WorkType")
                        .WithMany()
                        .HasForeignKey("WORKTYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_WorkType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE1", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", "Nav_Parent")
                        .WithMany("Nav_Files1")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE2", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", "Nav_Parent")
                        .WithMany("Nav_Files2")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE3", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", "Nav_Parent")
                        .WithMany("Nav_Files3")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_FILE4", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", "Nav_Parent")
                        .WithMany("Nav_Files4")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2_JOB_TYPE_ENUM", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_JOB_TYPE_ENUM", "Nav_JobType")
                        .WithMany()
                        .HasForeignKey("JOBTYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", "Nav_Register")
                        .WithMany("Nav_JobTypes")
                        .HasForeignKey("REGISTERT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_JobType");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Register");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_RELATED_LEVEL", "Nav_Level")
                        .WithMany()
                        .HasForeignKey("LEVEL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER", "Nav_Parent")
                        .WithMany("Nav_Item3")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Level");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER", "Nav_Parent")
                        .WithMany("Nav_Item4")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_RELATED_LEVEL", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_PHOTO", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", "Nav_Parent")
                        .WithMany("Nav_Photos")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", "Nav_TaskDetail")
                        .WithMany()
                        .HasForeignKey("TASK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");

                    b.Navigation("Nav_TaskDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", "Nav_Parent")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", "Nav_TaskDetail")
                        .WithMany()
                        .HasForeignKey("TASK_DETAIL_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_TaskDetail");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_FILE", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
                        .WithMany()
                        .HasForeignKey("IMG_FILE_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", "Nav_Parent")
                        .WithMany("Nav_Files")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_ImgFile");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_TYPE", "Nav_CheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", "Nav_Task")
                        .WithMany()
                        .HasForeignKey("TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CheckType");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_AREA", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_CheckArea")
                        .WithMany()
                        .HasForeignKey("CHECK_AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", "Nav_Task")
                        .WithMany("Nav_ListArea")
                        .HasForeignKey("CHECK_TASK_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_CheckArea");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Task");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", b =>
                {
                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_AREA_ENUM", "Nav_Area")
                        .WithMany()
                        .HasForeignKey("AREA_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_CHECK_MAIN", "Nav_Main")
                        .WithMany()
                        .HasForeignKey("MAIN_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", "Nav_Parent")
                        .WithMany("Nav_Details")
                        .HasForeignKey("PARENT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Area");

                    b.Navigation("Nav_Main");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Parent");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_TRAIN_SELECT", b =>
                {
                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
                        .WithMany()
                        .HasForeignKey("DEPARTMENT_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", "Nav_Project")
                        .WithMany()
                        .HasForeignKey("PROJECT_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
                        .WithMany()
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_Project");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_WORKTYPE", b =>
                {
                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PICTURE", b =>
                {
                    b.Navigation("Nav_PictureFiles");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.BD.T_BD_PLACE", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_AUTO_PRINT_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CALENDAR", b =>
                {
                    b.Navigation("Nav_CalendarClass");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", b =>
                {
                    b.Navigation("Nav_ClassDetail");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_COST_CENTER", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_DepartmentCalendarConfig");

                    b.Navigation("Nav_DepartmentScheduling");

                    b.Navigation("Nav_DepartmentUser");

                    b.Navigation("Nav_ProdutionUnit");

                    b.Navigation("Nav_SafeUser");

                    b.Navigation("Nav_UserDeparts");

                    b.Navigation("Nav_UserList");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_CALENDAR_CONFIG", b =>
                {
                    b.Navigation("Nav_DepartmentCalendarConfigDetail");

                    b.Navigation("Nav_DepartmentCalendarConfigTeam");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_POST", b =>
                {
                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT_SCHEDULING", b =>
                {
                    b.Navigation("Nav_DepartmentSchedulingDetail");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ENUM", b =>
                {
                    b.Navigation("Nav_EnumItems");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_EXT_CONN_CONFIG", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_HOLIDAY", b =>
                {
                    b.Navigation("Nav_HolidayDetails");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_IMPORT_CONFIG_DETAIL", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Fields");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_NOTIFICATION", b =>
                {
                    b.Navigation("Nav_Accepteds");

                    b.Navigation("Nav_Permits");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PANEL", b =>
                {
                    b.Navigation("Nav_PanelInfo");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PARAM_SET", b =>
                {
                    b.Navigation("Nav_Departments");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_PERSON", b =>
                {
                    b.Navigation("Nav_PersonCertificateFiles");

                    b.Navigation("Nav_PersonEducationFiles");

                    b.Navigation("Nav_PersonIDCardFiles");

                    b.Navigation("Nav_PersonSkills");

                    b.Navigation("Nav_PersonWorks");

                    b.Navigation("Nav_TeamPersons");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE", b =>
                {
                    b.Navigation("Nav_MenuPermissions");

                    b.Navigation("Nav_Panels");

                    b.Navigation("Nav_UserBelongRoles");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_GROUP", b =>
                {
                    b.Navigation("Nav_BelongRoles");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_ROLE_MENU_PERM", b =>
                {
                    b.Navigation("Nav_PermissionBtns");

                    b.Navigation("Nav_PermissionColumns");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_SNAPSHOT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_TEAM", b =>
                {
                    b.Navigation("Nav_TeamPersons");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER", b =>
                {
                    b.Navigation("Nav_BelongRoleGroups");

                    b.Navigation("Nav_BelongRoles");

                    b.Navigation("Nav_BelongUserGroups");

                    b.Navigation("Nav_ProdutionUnit");

                    b.Navigation("Nav_UserPhotoFiles");

                    b.Navigation("Nav_UserSignFiles");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG", b =>
                {
                    b.Navigation("Nav_Edits");

                    b.Navigation("Nav_HiddenTables");

                    b.Navigation("Nav_Querys");

                    b.Navigation("Nav_Tabls");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_CUSTOM_CONFIG_H_TAB", b =>
                {
                    b.Navigation("Nav_HiddenColumns");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_EDIT", b =>
                {
                    b.Navigation("Nav_EditColumns");

                    b.Navigation("Nav_HiddenCols");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY", b =>
                {
                    b.Navigation("Nav_Fields");

                    b.Navigation("Nav_Groups");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_QUERY_GROUP", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_C_C_TABLE", b =>
                {
                    b.Navigation("Nav_Columns");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_GROUP", b =>
                {
                    b.Navigation("Nav_BelongRoleGroups");

                    b.Navigation("Nav_BelongRoles");

                    b.Navigation("Nav_BelongUserGroups");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.FM.T_FM_USER_POST", b =>
                {
                    b.Navigation("Nav_UserTests");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.NW.T_NW_ENTERPRISE", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
                {
                    b.Navigation("Nav_Versions");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_MENU", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_NOTICE", b =>
                {
                    b.Navigation("Nav_NoticeDetails");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_TENANT", b =>
                {
                    b.Navigation("Nav_Domains");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_CODE", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.Platform.T_PF_DEFECT_GRADE", b =>
                {
                    b.Navigation("Nav_DefectCodes");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T4.T_PF_APP_VERSION", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_ANNOURCEMENT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Orgs");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPMENU", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE", b =>
                {
                    b.Navigation("Nav_ApproveDetails");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_APPROVE_TEMP", b =>
                {
                    b.Navigation("Nav_ApproveTempDetails");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BIVIDEOIMG", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_CLIENT_MENU", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_COLUMN", b =>
                {
                    b.Navigation("Nav_Filters");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_DATA_CHANNEL", b =>
                {
                    b.Navigation("Nav_ClientScopes");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN", b =>
                {
                    b.Navigation("Nav_FillMaps");

                    b.Navigation("Nav_Filters");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_EDIT_COLUMN_FILL_MAP", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FDDEBACK", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE", b =>
                {
                    b.Navigation("Nav_ImgFiles");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FILE_DB", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FLOW_INSTANCE", b =>
                {
                    b.Navigation("OperationHistorys");

                    b.Navigation("TransitionHistorys");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM", b =>
                {
                    b.Navigation("Nav_HomeCharts");

                    b.Navigation("Nav_HomeHmis");

                    b.Navigation("Nav_HomeRankings");

                    b.Navigation("Nav_HomeStatistics");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_CONFIG_VERSION", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_FORM_QUERY", b =>
                {
                    b.Navigation("Nav_Querys");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MENU", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_MQTT_CONFIG", b =>
                {
                    b.Navigation("Nav_MqttConfigTheme");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_NOTICE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_CHART", b =>
                {
                    b.Navigation("Nav_Params");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_EDIT", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Columns");

                    b.Navigation("Nav_Panels");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TABLE", b =>
                {
                    b.Navigation("Nav_Btns");

                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Columns");

                    b.Navigation("Nav_Panels");

                    b.Navigation("Nav_TableParams");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PAGE_TREE", b =>
                {
                    b.Navigation("Nav_Columns");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PARAM_SCHEME", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_PageEdits");

                    b.Navigation("Nav_PageTables");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_PIC_FILTER", b =>
                {
                    b.Navigation("Nav_PicFilterDetail");
                });

            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_QUESTION_FEEDBACK", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.Infrastructure.Core.T_FM_ORGANIZATION", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_REPORT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListAccidentListKind");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS", b =>
                {
                    b.Navigation("Nav_FilesSurvey");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_REASON", b =>
                {
                    b.Navigation("Nav_ListReasonType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_EVENT_SURVEY_RESULT", b =>
                {
                    b.Navigation("Nav_FilesP");

                    b.Navigation("Nav_FilesSurvey");

                    b.Navigation("Nav_ListAdmPunishment");

                    b.Navigation("Nav_ListCasualties");

                    b.Navigation("Nav_ListEquipmentLoss");

                    b.Navigation("Nav_ListForensics");

                    b.Navigation("Nav_ListReason");

                    b.Navigation("Nav_ListSurveyDamageObject");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", b =>
                {
                    b.Navigation("Nav_DeputyLeaderUser");

                    b.Navigation("Nav_TeamMembers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.AE.T_AE_INVESTIGATION_RECORD", b =>
                {
                    b.Navigation("Nav_FilesAcc");

                    b.Navigation("Nav_FilesChart");

                    b.Navigation("Nav_NotesFilesNotes");

                    b.Navigation("Nav_UsersAsk");

                    b.Navigation("Nav_UsersInvestigation");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT", b =>
                {
                    b.Navigation("Nav_ListContentAreas");

                    b.Navigation("Nav_ListContentCheckTypes");

                    b.Navigation("Nav_ListContentQuestions");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENTS", b =>
                {
                    b.Navigation("Nav_ListCheckQuestion");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_CONTENT_CHECK_TYPE", b =>
                {
                    b.Navigation("Nav_ListContentCheckTypeLevels");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_MAIN", b =>
                {
                    b.Navigation("Nav_ListLaw");

                    b.Navigation("Nav_ListMainDep");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT", b =>
                {
                    b.Navigation("Nav_ListCheckProjectProjectCategory");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_PROJECT_CATEGORY", b =>
                {
                    b.Navigation("Nav_ListCategoryType");

                    b.Navigation("Nav_ListOBJECT");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_CHECK_TYPE", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_ListCheckTypeLevel");

                    b.Navigation("Nav_ListMineType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_PLAN_SET", b =>
                {
                    b.Navigation("Nav_ListArea");

                    b.Navigation("Nav_ListDepOut");

                    b.Navigation("Nav_ListSetDepObject");

                    b.Navigation("Nav_ListSetObject");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListRiskSubmitContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListRiskQuestionReason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_BACK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListRiskQuestionReason");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_CONTENT_DEAL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_FilesAfter");

                    b.Navigation("Nav_ListCheckUserSign");

                    b.Navigation("Nav_ListUserSign");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_DELAY_APPLY", b =>
                {
                    b.Navigation("Nav_ListApplyDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE", b =>
                {
                    b.Navigation("Nav_ListRiskSubmitContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_RISK_SUBMIT_NOTICE_PERSON", b =>
                {
                    b.Navigation("Nav_ListRiskSubmitContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListCheckProject");

                    b.Navigation("Nav_ListCheckProjectCategory");

                    b.Navigation("Nav_ListCheckRiskArea");

                    b.Navigation("Nav_ListCheckUserSign");

                    b.Navigation("Nav_ListSafeCheckDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListCheckDetailQuestion");

                    b.Navigation("Nav_ListCheckDetailReason");

                    b.Navigation("Nav_ListCheckDetailUser");

                    b.Navigation("Nav_ListLaw");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_DETAIL_REJECT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.BS.T_BS_SAFE_CHECK_RECORD", b =>
                {
                    b.Navigation("Nav_ListRecordDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_ABILITY_EVALUATE", b =>
                {
                    b.Navigation("Nav_ListProject");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_ESTIMATE", b =>
                {
                    b.Navigation("Nav_ListEstimateRecord");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN", b =>
                {
                    b.Navigation("Nav_listPlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_ListStandard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", b =>
                {
                    b.Navigation("Nav_FilesRecord");

                    b.Navigation("Nav_FilesSummary");

                    b.Navigation("Nav_ListDepartment");

                    b.Navigation("Nav_ListSummaryRequirement");

                    b.Navigation("Nav_ListUserEstimate");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_LIBRARY", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_MATERIAL_OPERATE_RECORD", b =>
                {
                    b.Navigation("Nav_listDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_RSP_ESTIMATE", b =>
                {
                    b.Navigation("Nav_ListEstimate");

                    b.Navigation("Nav_ListEventKind");

                    b.Navigation("Nav_ListJoin");

                    b.Navigation("Nav_ListRspConditions");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_URGENT_EVENT", b =>
                {
                    b.Navigation("Nav_ListArearInfluence");

                    b.Navigation("Nav_ListEventContingencyPlan");

                    b.Navigation("Nav_ListEventRiskType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Inspection");

                    b.Navigation("Nav_ListCheck");

                    b.Navigation("Nav_ListCheckCircle");

                    b.Navigation("Nav_Overhaul");

                    b.Navigation("Nav_ReceiptFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_CHECK", b =>
                {
                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_INSPECTION", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_OVERHAUL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_BASE_PURCHASE_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ReceiptFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListDetail");

                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_CHECK_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListDetail");

                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_MAINTENANCE_PLAN", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_PlanDetails");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_OVERHAUL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_PURCHASE_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ReceiptFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_DEVICE_REPAIR", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.DM.T_DM_TIME_RUN", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CHANGE_SHIFT_RECORD", b =>
                {
                    b.Navigation("Nav_AfterUsers");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_PreUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB", b =>
                {
                    b.Navigation("Nav_CrucialLicensePerson");

                    b.Navigation("Nav_DealMeasures");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Risks");

                    b.Navigation("Nav_SafeConfirms");

                    b.Navigation("Nav_SafeMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE", b =>
                {
                    b.Navigation("Nav_CrucialLicensePerson");

                    b.Navigation("Nav_DealMeasures");

                    b.Navigation("Nav_Risks");

                    b.Navigation("Nav_SafeConfirms");

                    b.Navigation("Nav_SafeMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_CURRENT_CLASS_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_LabourSupplies");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_ENTERPRISE_INFORMATION_REGISTRATION", b =>
                {
                    b.Navigation("Nav_AllowFiles");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ProUnits");

                    b.Navigation("Nav_SafeFiles");

                    b.Navigation("Nav_WorkFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_FireFiles");

                    b.Navigation("Nav_MonitorFiles");

                    b.Navigation("Nav_Risks");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_USER", b =>
                {
                    b.Navigation("Nav_UserFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_FireFiles");

                    b.Navigation("Nav_FireUser");

                    b.Navigation("Nav_MonitorFiles");

                    b.Navigation("Nav_Risks");

                    b.Navigation("Nav_SafeUser");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_FIRE_JOB_WB_USER", b =>
                {
                    b.Navigation("Nav_Signs");

                    b.Navigation("Nav_UserFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_HOLIDAYS", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_FLOW", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_MEASURE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_ACTIVITY_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Flow");

                    b.Navigation("Nav_JobActivityPerson");

                    b.Navigation("Nav_Measure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_FLOW", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_MEASURE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_JOB_EVENT_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Flow");

                    b.Navigation("Nav_JobEventPerson");

                    b.Navigation("Nav_Measure");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD", b =>
                {
                    b.Navigation("Nav_AfterUsers");

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_PreUsers");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_LEADER_WELL_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_AfterUsers");

                    b.Navigation("Nav_DetailAreas");

                    b.Navigation("Nav_DetailFiles");

                    b.Navigation("Nav_PreUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_OPER_SCH", b =>
                {
                    b.Navigation("Nav_PreOperSchFile");

                    b.Navigation("Nav_PreOperSchUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME", b =>
                {
                    b.Navigation("Nav_CertificateFiles");

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_EducationalFiles");

                    b.Navigation("Nav_MedicalFiles");

                    b.Navigation("Nav_OtherFiles");

                    b.Navigation("Nav_PostFiles");

                    b.Navigation("Nav_TrainFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_PROFESSIONAL_RESUME_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING_TEMPLATE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TEAM_ACTIVITY", b =>
                {
                    b.Navigation("Nav_TeamActivityFile");

                    b.Navigation("Nav_TeamActivityUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_SAFE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_TECH_DISCLOSURE_FROM_TECH", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Person");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_ANALYSIS", b =>
                {
                    b.Navigation("Nav_CrucialAnalysisPerson");

                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_CRUCIAL_TASK_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailRisk");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_HAZARD", b =>
                {
                    b.Navigation("Nav_EvaluateHazardDepartment");

                    b.Navigation("Nav_EvaluateHazardEducationMeasures");

                    b.Navigation("Nav_EvaluateHazardEmergencyMeasures");

                    b.Navigation("Nav_EvaluateHazardEngineeringMeasures");

                    b.Navigation("Nav_EvaluateHazardIndividualMeasures");

                    b.Navigation("Nav_EvaluateHazardManagementMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Hazards");

                    b.Navigation("Nav_Risks");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_HAZARD", b =>
                {
                    b.Navigation("Nav_EvaluateHazardEducationMeasures");

                    b.Navigation("Nav_EvaluateHazardEmergencyMeasures");

                    b.Navigation("Nav_EvaluateHazardEngineeringMeasures");

                    b.Navigation("Nav_EvaluateHazardIndividualMeasures");

                    b.Navigation("Nav_EvaluateHazardManagementMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RESULT_RISK", b =>
                {
                    b.Navigation("Nav_EvaluateRiskEducationMeasures");

                    b.Navigation("Nav_EvaluateRiskEmergencyMeasures");

                    b.Navigation("Nav_EvaluateRiskEngineeringMeasures");

                    b.Navigation("Nav_EvaluateRiskEquipment");

                    b.Navigation("Nav_EvaluateRiskFacilities");

                    b.Navigation("Nav_EvaluateRiskIndividualMeasures");

                    b.Navigation("Nav_EvaluateRiskManagementMeasures");

                    b.Navigation("Nav_EvaluateRiskWorkduty");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATE_RISK", b =>
                {
                    b.Navigation("Nav_EvaluateRiskDepartment");

                    b.Navigation("Nav_EvaluateRiskEducationMeasures");

                    b.Navigation("Nav_EvaluateRiskEmergencyMeasures");

                    b.Navigation("Nav_EvaluateRiskEngineeringMeasures");

                    b.Navigation("Nav_EvaluateRiskEquipment");

                    b.Navigation("Nav_EvaluateRiskFacilities");

                    b.Navigation("Nav_EvaluateRiskIndividualMeasures");

                    b.Navigation("Nav_EvaluateRiskManagementMeasures");

                    b.Navigation("Nav_EvaluateRiskWorkduty");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_DETAIL", b =>
                {
                    b.Navigation("Nav_Areas");

                    b.Navigation("Nav_Identifyings");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_EVALUATION_PLAN", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_FILE_PUBLISH", b =>
                {
                    b.Navigation("Nav_Area");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK", b =>
                {
                    b.Navigation("Nav_Areas");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Identifyings");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_HAZARD_TASK_DETAIL", b =>
                {
                    b.Navigation("Nav_Identifyings");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_IdentifyUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_JOBTASK_IDENTIFY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailPost");

                    b.Navigation("Nav_DetailRisk");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS", b =>
                {
                    b.Navigation("Nav_AnalysisPerson");

                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_LICENSE_ANALYSIS_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailRisk");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_NOTICE_RELEASE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ReleaseRange");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_LINK", b =>
                {
                    b.Navigation("Nav_DealMeasures");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_LinkArea");

                    b.Navigation("Nav_LinkPost");

                    b.Navigation("Nav_OperationLinkEvaluateRisk");

                    b.Navigation("Nav_SafeConfirms");

                    b.Navigation("Nav_SafeMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_STEP", b =>
                {
                    b.Navigation("Nav_DealMeasures");

                    b.Navigation("Nav_SafeConfirms");

                    b.Navigation("Nav_SafeMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH", b =>
                {
                    b.Navigation("Nav_DistinguishDetails");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE", b =>
                {
                    b.Navigation("Nav_AnalyzeDetails");

                    b.Navigation("Nav_AnalyzeFiles");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailRisk");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_OPERATION_TASK_DISTINGUISH_DETAIL", b =>
                {
                    b.Navigation("Nav_OperationLinkEvaluateRisk");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_ANALYSIS", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_OrdinaryAnalysisPerson");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_ORDINARY_TASK_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailRisk");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_AREA", b =>
                {
                    b.Navigation("Nav_Children");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Identifyings");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_EvaluateRiskRecordEquipment");

                    b.Navigation("Nav_EvaluateRiskRecordFacilities");

                    b.Navigation("Nav_EvaluateRiskRecordWorkduty");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK", b =>
                {
                    b.Navigation("Nav_Areas");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Identifyings");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_RISK_TASK_DETAIL", b =>
                {
                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE", b =>
                {
                    b.Navigation("Nav_AnalyzeDetails");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.HM.T_HM_TASK_ANALYZE_DETAIL", b =>
                {
                    b.Navigation("Nav_TaskAnalyzeDetailFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH", b =>
                {
                    b.Navigation("Nav_DemandLaw");

                    b.Navigation("Nav_DemandOther");

                    b.Navigation("Nav_DemandTypes");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_DEMAND_DISTINGUISH_REPORT", b =>
                {
                    b.Navigation("Nav_DemandReportDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW", b =>
                {
                    b.Navigation("Nav_LawSCSystem");

                    b.Navigation("Nav_LawVersion");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE", b =>
                {
                    b.Navigation("Nav_IntegrateDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE", b =>
                {
                    b.Navigation("Nav_IntegrateUpdateDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_INTEGRATE_UPDATE_DETAIL", b =>
                {
                    b.Navigation("Nav_LRLawInstitution");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LAW_VERSION", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST", b =>
                {
                    b.Navigation("Nav_LegalListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_LEGAL_LIST_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_LegalListDetailUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.LR.T_LR_OTHER_DISTINGUISH", b =>
                {
                    b.Navigation("Nav_DemandUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_AGENCY", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_APPROVE_REWARD_PUNISHMENT_REPORT", b =>
                {
                    b.Navigation("Nav_ApproveRewardPunishmentDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION", b =>
                {
                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_COLLECTION_USER", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Opinions");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_OPINION_REPORT", b =>
                {
                    b.Navigation("Nav_FileList");

                    b.Navigation("Nav_ImpFileList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", b =>
                {
                    b.Navigation("Nav_FileList");

                    b.Navigation("Nav_InvestigationFileList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_GET_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Items");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EVENT_REPORT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_COMPLAIN_ADVISE", b =>
                {
                    b.Navigation("Nav_FileList");

                    b.Navigation("Nav_SurveyFileList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_EXTERNAL_CONTACT_COMMUNICATE", b =>
                {
                    b.Navigation("Nav_FileList");

                    b.Navigation("Nav_ImpFileList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_INNER_CONTACT", b =>
                {
                    b.Navigation("Nav_DoFiles");

                    b.Navigation("Nav_ItemFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT", b =>
                {
                    b.Navigation("Nav_AppointUsers");

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_POLICY_DOCUMENT_DETAIL", b =>
                {
                    b.Navigation("Nav_AppointUsers");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED", b =>
                {
                    b.Navigation("Nav_Agreements");

                    b.Navigation("Nav_FireUser");

                    b.Navigation("Nav_Qualifications");

                    b.Navigation("Nav_SafeUser");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_AGREEMENT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_ESTIMATE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_QUALIFICATION_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED_USER", b =>
                {
                    b.Navigation("Nav_Healths");

                    b.Navigation("Nav_Insurances");

                    b.Navigation("Nav_Signs");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_PLAN_INPUT", b =>
                {
                    b.Navigation("Nav_SafeAssessItem");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_ASSESS_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_SafeAssessRecordItem");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_SAFE_PDT_SIGNED", b =>
                {
                    b.Navigation("Nav_SafePdtSignedPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_STANDARDIZATION_SYSTEM_REVIEW", b =>
                {
                    b.Navigation("Nav_ActionPlanList");

                    b.Navigation("Nav_ReviewItemsList");

                    b.Navigation("Nav_ReviewResultList");

                    b.Navigation("Nav_ReviewUserList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB", b =>
                {
                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_JOB_REPORT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HAZARD_MONITOR_RESULT_SUM", b =>
                {
                    b.Navigation("Nav_ListMonitorResult");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_BATCH", b =>
                {
                    b.Navigation("Nav_ListDepartment");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE", b =>
                {
                    b.Navigation("Nav_ListDepartmentInfo");

                    b.Navigation("Nav_ListOccHazard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO", b =>
                {
                    b.Navigation("Nav_ListDepartmentInfoPost");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListNoticeRegister");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_NOTICE_REGISTER", b =>
                {
                    b.Navigation("Nav_ListOccHazard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN", b =>
                {
                    b.Navigation("Nav_ListDepartment");

                    b.Navigation("Nav_ListPlanRegister");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_PLAN_REGISTER", b =>
                {
                    b.Navigation("Nav_ListHazard");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT", b =>
                {
                    b.Navigation("Nav_OccDiseaseList");

                    b.Navigation("Nav_OccHazardList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OH.T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO", b =>
                {
                    b.Navigation("Nav_Colors");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PC.T_PC_INFO_COLOR", b =>
                {
                    b.Navigation("Nav_Areas");

                    b.Navigation("Nav_ColorPoints");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", b =>
                {
                    b.Navigation("Nav_ApproveDeparts");

                    b.Navigation("Nav_ApproveRoles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.BI.T_BI_AREA_TREE", b =>
                {
                    b.Navigation("Nav_Check");

                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Device");

                    b.Navigation("Nav_Post");

                    b.Navigation("Nav_Risk");

                    b.Navigation("Nav_Submit");

                    b.Navigation("Nav_User");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DETECTION_INSPECTION_RECORD", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_APPLY", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.DM.T_DM_DEVICE_ISSUE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.OG.T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_MeasureConsider");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_MeasureConsider");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_EvaluationMethod");

                    b.Navigation("Nav_EvaluationUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_RecordUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_EVALUATION_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_EvaluationMethod");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_PLAN", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_MonitorUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PE.T_PE_SAFETY_MONITOR_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PM.T_PE_STANDARDIZED_SCORE_IMPORT", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_IDENTIFY_EVALUATION", b =>
                {
                    b.Navigation("Nav_Tasks");

                    b.Navigation("Nav_Types");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CHANGE_TASK_IMPLEMENT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_CONTROLROOM_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Airs");

                    b.Navigation("Nav_Deals");

                    b.Navigation("Nav_Drugs");

                    b.Navigation("Nav_Seris");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DESIGN_DOCUMENT_REVIEW", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Pictures");

                    b.Navigation("Nav_Requirements");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD", b =>
                {
                    b.Navigation("Nav_Confirms");

                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_CARRY_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Accepts");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_OUTBOUND_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Accepts");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_SET", b =>
                {
                    b.Navigation("Nav_Confirms");

                    b.Navigation("Nav_Specifys");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_TYPE", b =>
                {
                    b.Navigation("Nav_Confirms");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD", b =>
                {
                    b.Navigation("Nav_Confirms");

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DRUG_USE_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Confirms");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_DUTY_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Deals");

                    b.Navigation("Nav_Drugs");

                    b.Navigation("Nav_Inves");

                    b.Navigation("Nav_Machs");

                    b.Navigation("Nav_Tungs");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXPERIMENTAL_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_EXTERNAL_ACCEPTANCE_RECORD", b =>
                {
                    b.Navigation("Nav_Acceptances");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LABORATORY_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Dets");

                    b.Navigation("Nav_Ores");

                    b.Navigation("Nav_Pres");

                    b.Navigation("Nav_Sams");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_LANDSLIDE_ROLLSTONE_MONITOR", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_MAP_PROCESS_RECORD", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK", b =>
                {
                    b.Navigation("Nav_Codes");

                    b.Navigation("Nav_Departments");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_POST_FORM_LINK_XK", b =>
                {
                    b.Navigation("Nav_Params");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PROCESS_FORM_XK", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_PRODUCTION_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SANDPUMP_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_SURVEY_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_THOUSANDPUMP_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PR.T_PR_TUNGPRE_OPERATION_RECORD", b =>
                {
                    b.Navigation("Nav_Drugs");

                    b.Navigation("Nav_Meas");

                    b.Navigation("Nav_Seris");

                    b.Navigation("Nav_Targs");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Formulates");

                    b.Navigation("Nav_Goals");

                    b.Navigation("Nav_PlanFiles");

                    b.Navigation("Nav_PlanResources");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT", b =>
                {
                    b.Navigation("Nav_DepartmentDetail");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_TeamDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", b =>
                {
                    b.Navigation("Nav_DetailContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_MonitorUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_MONITOR_ASSESSMENT_DETAIL", b =>
                {
                    b.Navigation("Nav_Contents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.PT.T_PT_SAFETY_POLICY_SURVEY", b =>
                {
                    b.Navigation("Nav_Collects");

                    b.Navigation("Nav_Feedbacks");

                    b.Navigation("Nav_Ranges");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DEPARTMENT", b =>
                {
                    b.Navigation("Nav_Posts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_DOCUMENT_LIBRARY_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT", b =>
                {
                    b.Navigation("Nav_ListContentDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_CONTENT_NAME", b =>
                {
                    b.Navigation("Nav_ListContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_FilesOfficialseal");

                    b.Navigation("Nav_FilesRecord");

                    b.Navigation("Nav_ListMeetingContent");

                    b.Navigation("Nav_ListPAll");

                    b.Navigation("Nav_ListPReView");

                    b.Navigation("Nav_ListThemes");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListContent");

                    b.Navigation("Nav_ListMinutesDetail");

                    b.Navigation("Nav_ListPAbsence");

                    b.Navigation("Nav_ListPAskForLeave");

                    b.Navigation("Nav_ListPJoin");

                    b.Navigation("Nav_ListPReview");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_CONTENT", b =>
                {
                    b.Navigation("Nav_ListContentDeal");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_MEETING_MINUTES_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_MT_PLAN_SET", b =>
                {
                    b.Navigation("Nav_ListSetDepartment");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SC.T_SC_POST", b =>
                {
                    b.Navigation("Nav_Depts");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Posts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_COURSEWEARLIBRARY", b =>
                {
                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN", b =>
                {
                    b.Navigation("Nav_DepTrainPlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_DEP_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_DepTrainPlanContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_NewUserDetail");

                    b.Navigation("Nav_Teachers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Papers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
                {
                    b.Navigation("Nav_ListPaper");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_SAFE_SURVEY", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_JoinDepartment");

                    b.Navigation("Nav_ListUsers");

                    b.Navigation("Nav_Papers");

                    b.Navigation("Nav_Points");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TEST", b =>
                {
                    b.Navigation("Nav_Points");

                    b.Navigation("Nav_Posts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_EDU_CARD", b =>
                {
                    b.Navigation("Nav_TrainRecordList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD", b =>
                {
                    b.Navigation("Nav_TrainRecordFile");

                    b.Navigation("Nav_TrainSignatureFile");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION", b =>
                {
                    b.Navigation("Nav_OpinionList");

                    b.Navigation("Nav_ResultList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAINING_EFFECT_EVALUATION_SURVEY", b =>
                {
                    b.Navigation("Nav_ResultList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListCour");

                    b.Navigation("Nav_TrainContentList");

                    b.Navigation("Nav_TrainUserList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListPlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_ListDetailDepartment");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Papers");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_TEXT", b =>
                {
                    b.Navigation("Nav_ListPaper");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_USER", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
                {
                    b.Navigation("Nav_Demands");

                    b.Navigation("Nav_JoinDepartment");

                    b.Navigation("Nav_Points");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY_LIST_DEMAND", b =>
                {
                    b.Navigation("Nav_Items");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_YearTrainPlanDepartment");

                    b.Navigation("Nav_YearTrainPlanDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_YEAR_TRAIN_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_YearTrainPlanContent");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailContents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.Navigation("Nav_DetailBasics");

                    b.Navigation("Nav_DetailHiddens");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP", b =>
                {
                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Hiddens");

                    b.Navigation("Nav_Measures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_BASIC_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.Navigation("Nav_Levels");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_CONTENTS", b =>
                {
                    b.Navigation("Nav_ContentsBasics");

                    b.Navigation("Nav_ListCheckQuestion");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET", b =>
                {
                    b.Navigation("Nav_CheckSetContents");

                    b.Navigation("Nav_CheckUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS", b =>
                {
                    b.Navigation("Nav_ContentsAreas");

                    b.Navigation("Nav_ContentsBasics");

                    b.Navigation("Nav_ContentsHiddens");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_SET_CONTENTS_AREA", b =>
                {
                    b.Navigation("Nav_ContentsAreaRisks");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_CHECK_TYPE", b =>
                {
                    b.Navigation("Nav_CheckCycle");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM", b =>
                {
                    b.Navigation("Nav_DoubleDetails");

                    b.Navigation("Nav_DoubleFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailPosts");

                    b.Navigation("Nav_DoubleDetailMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_DEPART", b =>
                {
                    b.Navigation("Nav_DepartDetails");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES", b =>
                {
                    b.Navigation("Nav_DetailMeasureContents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT", b =>
                {
                    b.Navigation("Nav_DetailMeasureContentBasics");

                    b.Navigation("Nav_DetailMeasureContentHiddens");

                    b.Navigation("Nav_DetailMeasureContentPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_POST", b =>
                {
                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY", b =>
                {
                    b.Navigation("Nav_Departs");

                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Posts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailContents");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT", b =>
                {
                    b.Navigation("Nav_DetailBasics");

                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailHiddens");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_DETAIL_CONTENT_DEPART", b =>
                {
                    b.Navigation("Nav_DetailPosts");

                    b.Navigation("Nav_DetailUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_POST", b =>
                {
                    b.Navigation("Nav_PostDetails");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP", b =>
                {
                    b.Navigation("Nav_Contents");

                    b.Navigation("Nav_Hiddens");

                    b.Navigation("Nav_Measures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT", b =>
                {
                    b.Navigation("Nav_Departs");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_CONTENT_DEPART", b =>
                {
                    b.Navigation("Nav_Posts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_ENTERPRISE_LIBRARY_TEMP_MEASURE", b =>
                {
                    b.Navigation("Nav_Departs");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_CONFIRM", b =>
                {
                    b.Navigation("Nav_Basics");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Photos");

                    b.Navigation("Nav_Reasons");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_HAND_REPORT", b =>
                {
                    b.Navigation("Nav_ReportFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE", b =>
                {
                    b.Navigation("Nav_RectifyDetails");

                    b.Navigation("Nav_RectifyFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL", b =>
                {
                    b.Navigation("Nav_RectifyDetailBasics");

                    b.Navigation("Nav_RectifyDetailFiles");

                    b.Navigation("Nav_RectifyDetailReasons");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_RECTIFY_RECORD", b =>
                {
                    b.Navigation("Nav_RectifyBasics");

                    b.Navigation("Nav_RectifyFiles");

                    b.Navigation("Nav_RectifyPhotoas");

                    b.Navigation("Nav_RectifyPhotobs");

                    b.Navigation("Nav_RectifyReasons");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT", b =>
                {
                    b.Navigation("Nav_ReportDetails");

                    b.Navigation("Nav_ReportFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_HIDDEN_DANGER_REPORT_DETAIL", b =>
                {
                    b.Navigation("Nav_ReportDetailBasics");

                    b.Navigation("Nav_ReportDetailFiles");

                    b.Navigation("Nav_ReportDetailReasons");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Evaluations");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_MAJOR_ACCIDENT_HAZARD_MANAGE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_PLAN_SET", b =>
                {
                    b.Navigation("Nav_ListArea");

                    b.Navigation("Nav_ListDepOut");

                    b.Navigation("Nav_ListSetDepObject");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_AREA", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Videos");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailMeasures");

                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_DETAIL_POST", b =>
                {
                    b.Navigation("Nav_PostDetails");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailMeasures");

                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_EVALUATION_SUMMARY_DETAIL_POST", b =>
                {
                    b.Navigation("Nav_PostDetails");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailMeasures");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", b =>
                {
                    b.Navigation("Nav_ResultPostDets");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailMeasures");

                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Requires");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", b =>
                {
                    b.Navigation("Nav_DetailDeparts");

                    b.Navigation("Nav_DetailMeasures");

                    b.Navigation("Nav_DetailPosts");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", b =>
                {
                    b.Navigation("Nav_SumPostDets");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", b =>
                {
                    b.Navigation("Nav_CheckNoticeDetails");

                    b.Navigation("Nav_CheckNoticeFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE_DETAIL", b =>
                {
                    b.Navigation("Nav_CheckNoticeDetailBasics");

                    b.Navigation("Nav_CheckNoticeDetailUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD", b =>
                {
                    b.Navigation("Nav_CheckRecordDetails");

                    b.Navigation("Nav_CheckRecordFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_CheckRecordDetailBasics");

                    b.Navigation("Nav_CheckRecordDetailFiles");

                    b.Navigation("Nav_CheckRecordDetailReasons");

                    b.Navigation("Nav_CheckRecordDetailUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY", b =>
                {
                    b.Navigation("Nav_CheckRecordDetails");

                    b.Navigation("Nav_CheckRecordFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_RECORD_SUMMARY_DETAIL", b =>
                {
                    b.Navigation("Nav_CheckRecordDetailBasics");

                    b.Navigation("Nav_CheckRecordDetailFiles");

                    b.Navigation("Nav_CheckRecordDetailReasons");

                    b.Navigation("Nav_CheckRecordDetailUsers");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_CLAIM_RECORD", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_INSURANCE_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_UserList");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PLAN", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListProject");

                    b.Navigation("Nav_Ranges");

                    b.Navigation("Nav_Sources");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Ranges");

                    b.Navigation("Nav_Sources");

                    b.Navigation("Nav_WFFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_CHECK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_WFFiles");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY", b =>
                {
                    b.Navigation("Nav_Details");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_PROJECT_MONEY_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TI.T_TI_SAFE_PDT_COST_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_SafePdtCostRecordType");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListBackRequire");

                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_DETAIL", b =>
                {
                    b.Navigation("Nav_ListDetailUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_BACK_RECORD", b =>
                {
                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_CACULATE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_FILE_SUM", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_HIGH_CHECK", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_OUT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_FINISH", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_HIGHT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_INTRODUCE", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_FilesCheck");

                    b.Navigation("Nav_FilesWatch");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_PROJECT_SLOPEBANK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Files_Proj");

                    b.Navigation("Nav_Files_Sub");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_QUALITY_CHECK", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY", b =>
                {
                    b.Navigation("Nav_ListDetail");

                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_DAYLY_DETAIL", b =>
                {
                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE", b =>
                {
                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_LINE_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE", b =>
                {
                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_MOVE_DETAIL", b =>
                {
                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT", b =>
                {
                    b.Navigation("Nav_ListDetail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.TL.T_TL_WATCH_PERCENT_DETAIL", b =>
                {
                    b.Navigation("Nav_ListUser");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB", b =>
                {
                    b.Navigation("Nav_Audit");

                    b.Navigation("Nav_Detail");

                    b.Navigation("Nav_DisCloseDetails");

                    b.Navigation("Nav_DisCloseFiles");

                    b.Navigation("Nav_DisCloseUsers");

                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_MointerRecordDetails");

                    b.Navigation("Nav_RecordDetails");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_DANGEROUS_JOB_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_NOTIFY_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_HIDDEN_DANGER_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Files1");

                    b.Navigation("Nav_Files2");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_JOB_SAFE_MEASURE_ENUM", b =>
                {
                    b.Navigation("Nav_Detail");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Tests");

                    b.Navigation("Nav_Videos");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListPaperOrder");

                    b.Navigation("Nav_ListSourceOff");

                    b.Navigation("Nav_ListSourceOn");

                    b.Navigation("Nav_Photos");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_PAPER_ORDER", b =>
                {
                    b.Navigation("Nav_ListUserPaper");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_OUTSOURCE_TRAIN_RECORD_USERS", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_ListUserPaper");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_PROJECT_INPUT", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER", b =>
                {
                    b.Navigation("Nav_Item1");

                    b.Navigation("Nav_Item2");

                    b.Navigation("Nav_Item3");

                    b.Navigation("Nav_Item4");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_1", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_2", b =>
                {
                    b.Navigation("Nav_Files1");

                    b.Navigation("Nav_Files2");

                    b.Navigation("Nav_Files3");

                    b.Navigation("Nav_Files4");

                    b.Navigation("Nav_JobTypes");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_3", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_REGISTER_4", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK", b =>
                {
                    b.Navigation("Nav_Files");

                    b.Navigation("Nav_Photos");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_RECORD_DETAIL", b =>
                {
                    b.Navigation("Nav_Files");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK", b =>
                {
                    b.Navigation("Nav_Details");

                    b.Navigation("Nav_ListArea");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.WB.T_WB_SAFE_CHECK_TASK_DETAIL", b =>
                {
                    b.Navigation("Nav_Users");
                });
#pragma warning restore 612, 618
        }
    }
}
