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

namespace APT.Data.Migrations.Migrations
{
    [DbContext(typeof(MigrationContext))]
    partial class MigrationContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(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<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<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("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<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("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<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_PERSON", 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<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<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<Guid?>("ORG_ID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    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.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_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>("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_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_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<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<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    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>("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>("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<string>("REMARK")
                        .HasMaxLength(300)
                        .HasColumnType("nvarchar(300)");

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

                    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.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.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    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>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ENUMS_ID");

                    b.HasIndex("ORG_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<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_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_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_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_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.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(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>("ISCANCEL")
                        .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>("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_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_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_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_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>("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_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.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(500)
                        .HasColumnType("nvarchar(500)");

                    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<int?>("WEEKDATA")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("CHECK_TYPE_LEVEL_ID");

                    b.HasIndex("ORG_ID");

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

            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_CANCEL")
                        .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<string>("REMARK_CANCEL")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    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.Property<Guid?>("USER_ID_CANCEL")
                        .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<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<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    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?>("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("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<string>("REMARK")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    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_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(500)
                        .HasColumnType("nvarchar(500)");

                    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?>("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("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")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    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>("IS_DELETED")
                        .HasColumnType("bit");

                    b.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?>("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?>("Nav_PlanID")
                        .HasColumnType("uniqueidentifier");

                    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("Nav_PlanID");

                    b.HasIndex("ORG_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_STANDER_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_STANDER_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<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_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<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<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("APPROVE_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("DEPARTMENT_ID_REPORT");

                    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?>("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("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.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<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<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    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.HasKey("ID");

                    b.HasIndex("APPLY_USER_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("SHIFT_MEETING_RECORD_ID");

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

            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<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<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    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.HasKey("ID");

                    b.HasIndex("APPLY_USER_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("SHIFT_MEETING_RECORD_ID");

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

            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_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<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_JOB_ACTIVITY_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_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<Guid?>("CREATER_ID")
                        .HasColumnType("uniqueidentifier");

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

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

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

                    b.Property<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<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>("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>("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.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.HasIndex("SHIFT_MEETING_RECORD_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_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<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<Guid?>("DEPARTMENT_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("DEPARTMENT_SCHEDULING_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<string>("JOB_CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

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

                    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>("OTHER_CONTENT")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

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

                    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<DateTime>("START_TIME")
                        .HasColumnType("datetime2");

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

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

                    b.HasKey("ID");

                    b.HasIndex("CLASS_ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_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_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_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.HasKey("ID");

                    b.HasIndex("NOTE_AKER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("TEAM_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_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?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    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("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_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.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<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.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(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_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(500)
                        .HasColumnType("nvarchar(500)");

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

                    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<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<int>("STATUS")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("DEPARTMENT_ID");

                    b.HasIndex("ORG_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<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.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_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_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_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<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_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_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.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>("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_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_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<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.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<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?>("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("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<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_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_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<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    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_SECONFIG", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    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<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("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>("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(300)
                        .HasColumnType("nvarchar(300)");

                    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<Guid?>("CHECK_TYPE_ID")
                        .HasColumnType("uniqueidentifier");

                    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<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

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

                    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<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?>("RECORD_USER_ID")
                        .HasColumnType("uniqueidentifier");

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

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

                    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.HasKey("ID");

                    b.HasIndex("CHECK_TYPE_ID");

                    b.HasIndex("LAUNCH_DEPARTMENT_ID");

                    b.HasIndex("LAUNCH_USER_ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_USER_ID");

                    b.HasIndex("TRAIN_TYPE");

                    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_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_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.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<int>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

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

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

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

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

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

                    b.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?>("USER_ID")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("ID");

                    b.HasIndex("ORG_ID");

                    b.HasIndex("RECORD_ID");

                    b.HasIndex("TEST_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<Guid?>("FLOW_ID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("FLOW_SEND_STATUS")
                        .HasColumnType("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?>("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_TYPE")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

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

                    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_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>("ENTITY_ORG_TPYE")
                        .HasColumnType("int");

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

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

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

                    b.Property<Guid?>("FORM_ID")
                        .HasColumnType("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>("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_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_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.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", "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_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_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_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);

                    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);

                    b.HasOne("APT.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_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_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_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_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.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.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", "Nav_User")
                        .WithMany("Nav_ProdutionUnit")
                        .HasForeignKey("USER_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Enums");

                    b.Navigation("Nav_Org");

                    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_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_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_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_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_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_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_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.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.Navigation("Nav_CheckType");

                    b.Navigation("Nav_CheckTypeLevel");

                    b.Navigation("Nav_Org");
                });

            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.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_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.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.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", "Nav_Plan")
                        .WithMany()
                        .HasForeignKey("Nav_PlanID");

                    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_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_STANDER_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_FilesStander")
                        .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_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.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.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_Approve");

                    b.Navigation("Nav_Department");

                    b.Navigation("Nav_DepartmentReport");

                    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.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
                        .WithMany()
                        .HasForeignKey("ORG_ID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Nav_Org");

                    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.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.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.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_Meeting")
                        .WithMany()
                        .HasForeignKey("SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_JobScheme");

                    b.Navigation("Nav_Meeting");

                    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_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.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.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_Meeting")
                        .WithMany()
                        .HasForeignKey("SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_ApplyUser");

                    b.Navigation("Nav_JobScheme");

                    b.Navigation("Nav_Meeting");

                    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_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_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)
                        .IsRequired();

                    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_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.HasOne("APT.MS.Domain.Entities.FO.T_FO_PRE_SHIFT_MEETING_RECORD", "Nav_Meeting")
                        .WithMany()
                        .HasForeignKey("SHIFT_MEETING_RECORD_ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("Nav_CreateUser");

                    b.Navigation("Nav_Meeting");

                    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_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.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.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_Org");

                    b.Navigation("Nav_Team");

                    b.Navigation("Nav_User");
                });

            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_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.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_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_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_JobName");

                    b.Navigation("Nav_JobNameOut");

                    b.Navigation("Nav_OperationStep");

                    b.Navigation("Nav_Org");
                });

            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.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.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.Navigation("Nav_Department");

                    b.Navigation("Nav_Org");
                });

            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.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_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_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_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_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_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.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.Navigation("Nav_Org");
                });

            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_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.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.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_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_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_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_SECONFIG", b =>
                {
                    b.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", b =>
                {
                    b.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.MS.Domain.Entities.SE.T_SE_TRAIN_CHECK_TYPE_ENUM", "Nav_TrainCheckType")
                        .WithMany()
                        .HasForeignKey("CHECK_TYPE_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", "Nav_RecordUser")
                        .WithMany()
                        .HasForeignKey("RECORD_USER_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.Navigation("Nav_LaunchDepartment");

                    b.Navigation("Nav_LaunchUser");

                    b.Navigation("Nav_Org");

                    b.Navigation("Nav_RecordUser");

                    b.Navigation("Nav_TrainCheckType");

                    b.Navigation("Nav_TrainType");
                });

            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_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_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_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_Org");

                    b.Navigation("Nav_Record");

                    b.Navigation("Nav_Test");

                    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_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_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_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.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_PERSON", b =>
                {
                    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_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_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_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_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.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_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_RECORD", b =>
                {
                    b.Navigation("Nav_FilesRecord");

                    b.Navigation("Nav_FilesStander");

                    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_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.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_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_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_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_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_Files");

                    b.Navigation("Nav_Users");
                });

            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_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_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.OG.T_OG_AGENCY", b =>
                {
                    b.Navigation("Nav_Children");

                    b.Navigation("Nav_Users");
                });

            modelBuilder.Entity("APT.MS.Domain.Entities.OG.T_OG_RELATED", b =>
                {
                    b.Navigation("Nav_Agreements");

                    b.Navigation("Nav_Qualifications");

                    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.PF.T_PF_APPROVAL_ROLE", b =>
                {
                    b.Navigation("Nav_ApproveDeparts");

                    b.Navigation("Nav_ApproveRoles");
                });

            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_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_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_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_TrainContentList");

                    b.Navigation("Nav_TrainUserList");
                });

            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_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");
                });
#pragma warning restore 612, 618
        }
    }
}
