// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Ropin.Inspection.Model.Entities;

namespace Ropin.Inspection.Model.Migrations
{
    [DbContext(typeof(InspectionDbContext))]
    [Migration("20211125051728_EditSys")]
    partial class EditSys
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("Relational:MaxIdentifierLength", 64)
                .HasAnnotation("ProductVersion", "5.0.4");

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.Report", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Data")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_GroupName")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateTime")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_End")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_Start")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Content", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_AlarmLevel")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroup", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_PatrolItem")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.Property<Guid>("G_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_LastUpdatedBy")
                        .HasColumnType("char(36)");

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

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

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroupItem", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_ContentCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_ContentGroupCode")
                        .HasColumnType("char(36)");

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Record", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordAlarm", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_InspectionRecordCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_SpotContentCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordImage", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_ImageURL")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_RecordItemCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordItem", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_ContentCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_InspectionContent")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<Guid>("C_RecordCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Region", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_ImageUrl")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Route", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_ImageUrl")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Spot", b =>
                {
                    b.Property<Guid>("C_Code")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_GPS")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ImageUrl")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasMaxLength(50)
                        .HasColumnType("char(50)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Number")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Position")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_QRCode")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("C_Code");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotContent", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_ContentCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRegion", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_RegionCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRoute", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_RouteCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotUser", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_UserCode")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_Record", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_SecurityContent")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_SpotCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordImage", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_ImageURL")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_SecurityRecordCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordItem", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_RecordItemCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_SecurityContent")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Code")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_FilePath")
                        .IsRequired()
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_TypeCode")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_EndDate")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_StartDate")
                        .HasColumnType("datetime(6)");

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

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

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

                    b.HasKey("C_ID");

                    b.HasIndex("C_Code")
                        .IsUnique();

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_TypeCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseType", b =>
                {
                    b.Property<Guid>("C_Code")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

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

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

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

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseTypePriv", b =>
                {
                    b.Property<Guid>("C_LicenseTypeCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_PrivilegeCode")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_LicenseTypeCode", "C_PrivilegeCode");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_PrivilegeCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Message", b =>
                {
                    b.Property<Guid>("C_Code")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Content")
                        .IsRequired()
                        .HasMaxLength(1000)
                        .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_LicenseCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_RelatedID")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_RelatedModule")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Type")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_UserID")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_UserID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Org", b =>
                {
                    b.Property<int>("K_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("C_Code")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_GIS")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Level")
                        .IsRequired()
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_LicenseCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Linker")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Lname")
                        .HasMaxLength(2550)
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

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

                    b.Property<string>("C_Phone")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_SName")
                        .HasMaxLength(16)
                        .HasColumnType("varchar(16) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_Type")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("K_ID");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_ParentCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Organize", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Address")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_GPS")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ImageUrl")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Number")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ParentCodeList")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ParentName")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.Property<Guid>("G_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_ParentCode")
                        .HasColumnType("char(36)");

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

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

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Post", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Code")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("varchar(20) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.Property<Guid>("G_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_LastUpdatedBy")
                        .HasColumnType("char(36)");

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

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Priv", b =>
                {
                    b.Property<string>("C_Code")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ImageUrl")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Module")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_PageUrl")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ParentCode")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Type")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_ParentCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Role", b =>
                {
                    b.Property<Guid>("C_Code")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Description")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_LicenseCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_RolePriv", b =>
                {
                    b.Property<Guid>("C_RoleCode")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_PrivilegeCode")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("C_RoleCode", "C_PrivilegeCode");

                    b.HasIndex("C_CreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_User", b =>
                {
                    b.Property<Guid>("C_UserID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Address")
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Email")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_IDNum")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_ImagePath")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_LicenseCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Mobile")
                        .HasMaxLength(20)
                        .HasColumnType("varchar(20) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Name")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_OrgCode")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Password")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Phone")
                        .HasMaxLength(20)
                        .HasColumnType("varchar(20) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_Post")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_ProgramID")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<string>("C_UserName")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_WechatID")
                        .HasMaxLength(100)
                        .HasColumnType("varchar(100) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_BirthDay")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

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

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

                    b.HasKey("C_UserID");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserPost", b =>
                {
                    b.Property<Guid>("G_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<Guid>("G_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_PostCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("G_UserCode")
                        .HasColumnType("char(36)");

                    b.HasKey("G_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserRole", b =>
                {
                    b.Property<Guid>("C_UserCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_RoleCode")
                        .HasColumnType("char(36)");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_UserCode", "C_RoleCode");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_RoleCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Version", b =>
                {
                    b.Property<Guid>("C_ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("C_AppCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<Guid>("C_CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_DownloadURL")
                        .IsRequired()
                        .HasMaxLength(1000)
                        .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("C_LastUpdatedBy")
                        .HasColumnType("char(36)");

                    b.Property<string>("C_Status")
                        .IsRequired()
                        .HasMaxLength(1)
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<string>("C_UpdateContent")
                        .IsRequired()
                        .HasMaxLength(1000)
                        .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");

                    b.Property<string>("C_VersionCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<DateTime>("D_CreateOn")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime?>("D_LastUpdatedOn")
                        .HasColumnType("datetime(6)");

                    b.HasKey("C_ID");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TaskInfoDto", b =>
                {
                    b.Property<string>("jobId")
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

                    b.Property<Guid?>("TasksQzId")
                        .HasColumnType("char(36)");

                    b.Property<string>("jobGroup")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("jobName")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("triggerGroup")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("triggerId")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("triggerName")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("triggerStatus")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.HasKey("jobId");

                    b.HasIndex("TasksQzId");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TasksQz", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("char(36)");

                    b.Property<string>("AssemblyName")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<DateTime?>("BeginTime")
                        .IsRequired()
                        .HasColumnType("datetime(6)");

                    b.Property<string>("C_LicenseCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("ClassName")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<Guid>("CreateBy")
                        .HasColumnType("char(36)");

                    b.Property<DateTime>("CreateTime")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Cron")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

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

                    b.Property<DateTime?>("EndTime")
                        .IsRequired()
                        .HasColumnType("datetime(6)");

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

                    b.Property<bool?>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsStart")
                        .HasColumnType("tinyint(1)");

                    b.Property<string>("JobGroup")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<string>("JobParams")
                        .HasColumnType("longtext CHARACTER SET utf8mb4");

                    b.Property<string>("Name")
                        .HasMaxLength(200)
                        .HasColumnType("varchar(200) CHARACTER SET utf8mb4");

                    b.Property<string>("Remark")
                        .HasMaxLength(1000)
                        .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");

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

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_LicenseType", "LicenseTypeTypeCode")
                        .WithMany()
                        .HasForeignKey("C_TypeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("LicenseTypeTypeCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseType", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseTypePriv", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_LicenseType", "LicenseTypeCode")
                        .WithMany()
                        .HasForeignKey("C_LicenseTypeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Priv", "PrivPrivilegeCode")
                        .WithMany()
                        .HasForeignKey("C_PrivilegeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("LicenseTypeCode");

                    b.Navigation("PrivPrivilegeCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Message", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersUserID")
                        .WithMany()
                        .HasForeignKey("C_UserID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

                    b.Navigation("UsersLastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Org", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Org", "OrgParentCode")
                        .WithMany()
                        .HasForeignKey("C_ParentCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("OrgParentCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Priv", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Priv", "PrivPrivilegeCode")
                        .WithMany()
                        .HasForeignKey("C_ParentCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Role", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_RolePriv", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Role", "Roles")
                        .WithMany()
                        .HasForeignKey("C_RoleCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Roles");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_User", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserRole", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Role", "Roles")
                        .WithMany()
                        .HasForeignKey("C_RoleCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "Users")
                        .WithMany()
                        .HasForeignKey("C_UserCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Roles");

                    b.Navigation("Users");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Version", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("C_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TaskInfoDto", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TasksQz", null)
                        .WithMany("Triggers")
                        .HasForeignKey("TasksQzId");
                });

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TasksQz", b =>
                {
                    b.Navigation("Triggers");
                });
#pragma warning restore 612, 618
        }
    }
}