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

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

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

                    b.Property<string>("C_CityCode")
                        .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_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CityCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_City", b =>
                {
                    b.Property<string>("C_Code")
                        .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_ProvCode")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("varchar(20) CHARACTER SET utf8mb4");

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

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_ProvCode");

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

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

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

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

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

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

                    b.Property<string>("C_MainCode")
                        .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_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

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

                    b.Property<string>("C_Value")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) 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("TBDM_CodeDetail");
                });

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeMain", b =>
                {
                    b.Property<string>("C_Code")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) 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")
                        .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("TBDM_CodeMain");
                });

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_Prov", b =>
                {
                    b.Property<string>("C_Code")
                        .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_Status")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

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

                    b.HasKey("C_Code");

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

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

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

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

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

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

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevAlertConfig", b =>
                {
                    b.Property<string>("C_Code")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) 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(1024)
                        .HasColumnType("varchar(1024) 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_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

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

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

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

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

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

                    b.HasKey("C_ID");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevDataConfig", b =>
                {
                    b.Property<string>("C_Code")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) 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(1024)
                        .HasColumnType("varchar(1024) 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_Interval")
                        .HasColumnType("int");

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_Device", 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_MachineCode")
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

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

                    b.Property<string>("C_Remark")
                        .HasMaxLength(1024)
                        .HasColumnType("varchar(1024) 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_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_ProductCode");

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

            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")
                        .IsRequired()
                        .HasColumnType("varchar(1) CHARACTER SET utf8mb4");

                    b.Property<string>("C_StoreCode")
                        .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("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<string>("C_StoreCode")
                        .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.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.HasIndex("G_CreateBy");

                    b.HasIndex("G_LastUpdatedBy");

                    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.HasIndex("G_ContentCode");

                    b.HasIndex("G_ContentGroupCode");

                    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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_SpotCode");

                    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.HasIndex("C_RecordItemCode");

                    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.HasIndex("C_ContentCode");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_RecordCode");

                    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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_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")
                        .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_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_StoreCode")
                        .HasColumnType("char(36)");

                    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_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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

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

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

                    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<string>("C_StoreCode")
                        .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.Property<decimal?>("F_Map_X")
                        .HasColumnType("decimal(12,2)");

                    b.Property<decimal?>("F_Map_Y")
                        .HasColumnType("decimal(12,2)");

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    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<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

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

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

                    b.HasKey("C_ID");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_ContentCode", "C_SpotCode")
                        .IsUnique();

                    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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_RegionCode");

                    b.HasIndex("C_SpotCode");

                    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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_RouteCode");

                    b.HasIndex("C_SpotCode");

                    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<string>("C_Remark")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) CHARACTER SET utf8mb4");

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

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

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

                    b.HasKey("C_ID");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_SpotCode");

                    b.HasIndex("C_UserCode", "C_SpotCode")
                        .IsUnique();

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

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

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

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

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

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

                    b.Property<string>("C_Remark")
                        .HasMaxLength(1024)
                        .HasColumnType("varchar(1024) 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_StoreCode")
                        .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("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_StoreCode");

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

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

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

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

                    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_GPS")
                        .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_Name")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

                    b.Property<string>("C_Remark")
                        .HasMaxLength(1024)
                        .HasColumnType("varchar(1024) 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_TypeCode")
                        .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.Property<Guid?>("LicenseC_ID")
                        .HasColumnType("char(36)");

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

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

                    b.HasKey("C_ID");

                    b.HasIndex("C_AreaCode");

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

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_TypeCode");

                    b.HasIndex("LicenseC_ID");

                    b.HasIndex("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");

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

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

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

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

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

                    b.HasKey("C_StoreCode", "C_OrgCode");

                    b.HasIndex("C_CreateBy");

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

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

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

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

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

                    b.HasKey("C_Code");

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

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

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

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

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

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

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

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

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

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

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_ProductCode");

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

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

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

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

                    b.Property<string>("C_IconPath")
                        .HasMaxLength(500)
                        .HasColumnType("varchar(500) 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_Name")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("varchar(255) CHARACTER SET utf8mb4");

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

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

                    b.Property<string>("C_Spec")
                        .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<string>("C_Unit")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

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

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

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

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

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

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

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

                    b.HasKey("C_SKUCode");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_TypeCode");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    b.Property<decimal?>("F_Map_X")
                        .HasColumnType("decimal(12,2)");

                    b.Property<decimal?>("F_Map_Y")
                        .HasColumnType("decimal(12,2)");

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

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

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_DeviceCode");

                    b.HasIndex("C_LastUpdatedBy");

                    b.HasIndex("C_SKUCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Type", 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(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_IfFPP")
                        .HasColumnType("int");

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

                    b.HasKey("C_Code");

                    b.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

            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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

                    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.HasIndex("C_CreateBy");

                    b.HasIndex("C_LastUpdatedBy");

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

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

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

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

                    b.HasKey("C_ID");

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

                    b.HasIndex("C_TypeCode");

                    b.HasIndex("UsersCreateByC_UserID");

                    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_MaxSpotQty")
                        .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<string>("C_ParentCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    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.Property<Guid?>("StoreOrgC_OrgCode")
                        .HasColumnType("char(36)");

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

                    b.HasKey("K_ID");

                    b.HasIndex("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");

                    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")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) 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.HasIndex("C_PrivilegeCode");

                    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(50)
                        .HasColumnType("varchar(50) 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(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    b.Property<string>("C_OrgCode")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) 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<string>("C_Post")
                        .HasMaxLength(50)
                        .HasColumnType("varchar(50) CHARACTER SET utf8mb4");

                    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_IDNum")
                        .IsUnique();

                    b.HasIndex("C_LastUpdatedBy");

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

                    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")
                        .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")
                        .HasMaxLength(1000)
                        .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");

                    b.Property<string>("C_VersionCode")
                        .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.TBDM_Area", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TBDM_City", "CityCityCode")
                        .WithMany()
                        .HasForeignKey("C_CityCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_City", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TBDM_Prov", "ProvProvCode")
                        .WithMany()
                        .HasForeignKey("C_ProvCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeDetail", 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.TBDM_CodeMain", 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.TDEV_DevAlertConfig", 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.TDEV_DevDataConfig", 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.TDEV_Device", 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.TPRD_Product", "ProductCode")
                        .WithMany()
                        .HasForeignKey("C_ProductCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("ProductCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Content", 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.TISP_ContentGroup", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("G_CreateBy")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroupItem", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
                        .WithMany()
                        .HasForeignKey("G_ContentCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_ContentGroup", "ContentGroupCode")
                        .WithMany()
                        .HasForeignKey("G_ContentGroupCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("ContentCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Record", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
                        .WithMany()
                        .HasForeignKey("C_SpotCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("SpotCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordImage", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_RecordItem", "RecordItemCode")
                        .WithMany()
                        .HasForeignKey("C_RecordItemCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordItem", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
                        .WithMany()
                        .HasForeignKey("C_ContentCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Record", "RecordCode")
                        .WithMany()
                        .HasForeignKey("C_RecordCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("ContentCode");

                    b.Navigation("RecordCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Region", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Route", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Spot", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotContent", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
                        .WithMany()
                        .HasForeignKey("C_ContentCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

                    b.Navigation("ContentCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRegion", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Region", "RegionCode")
                        .WithMany()
                        .HasForeignKey("C_RegionCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
                        .WithMany()
                        .HasForeignKey("C_SpotCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("RegionCode");

                    b.Navigation("SpotCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRoute", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Route", "RouteCode")
                        .WithMany()
                        .HasForeignKey("C_RouteCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
                        .WithMany()
                        .HasForeignKey("C_SpotCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("RouteCode");

                    b.Navigation("SpotCode");

                    b.Navigation("UsersCreateBy");

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

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

                    b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
                        .WithMany()
                        .HasForeignKey("C_SpotCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

                    b.Navigation("SpotCode");

                    b.Navigation("UserCode");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Area", 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.TPNT_Store", "Store")
                        .WithMany("Areas")
                        .HasForeignKey("C_StoreCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Store");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Store", b =>
                {
                    b.HasOne("Ropin.Inspection.Model.Entities.TBDM_Area", "AreaAreaCode")
                        .WithMany()
                        .HasForeignKey("C_AreaCode");

                    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.TPNT_Type", "TypeTypeCode")
                        .WithMany()
                        .HasForeignKey("C_TypeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_License", "License")
                        .WithMany("Stores")
                        .HasForeignKey("LicenseC_ID");

                    b.HasOne("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", "StoreOrg")
                        .WithMany("Stores")
                        .HasForeignKey("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");

                    b.Navigation("AreaAreaCode");

                    b.Navigation("License");

                    b.Navigation("StoreOrg");

                    b.Navigation("TypeTypeCode");

                    b.Navigation("UsersCreateBy");

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

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

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

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

                    b.HasOne("Ropin.Inspection.Model.Entities.TPRD_Product", "ProductCode")
                        .WithMany()
                        .HasForeignKey("C_ProductCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("CreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_ProdSKU", 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.TPRD_Type", "TypeCode")
                        .WithMany()
                        .HasForeignKey("C_TypeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("TypeCode");

                    b.Navigation("UsersCreateBy");

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

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

                    b.HasOne("Ropin.Inspection.Model.Entities.TDEV_Device", "DeviceCode")
                        .WithMany()
                        .HasForeignKey("C_DeviceCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

                    b.HasOne("Ropin.Inspection.Model.Entities.TPRD_ProdSKU", "SKUCode")
                        .WithMany()
                        .HasForeignKey("C_SKUCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("DeviceCode");

                    b.Navigation("SKUCode");

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Type", 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", "LastUpdatedBy")
                        .WithMany()
                        .HasForeignKey("C_LastUpdatedBy");

                    b.Navigation("LastUpdatedBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_Record", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordItem", 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")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("UsersCreateBy");

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

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

                    b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
                        .WithMany()
                        .HasForeignKey("UsersCreateByC_UserID");

                    b.Navigation("LicenseTypeTypeCode");

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

            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.TPNT_StoreOrg", "StoreOrg")
                        .WithMany("Orgs")
                        .HasForeignKey("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");

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

            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_Priv", "PrivilegeCode")
                        .WithMany()
                        .HasForeignKey("C_PrivilegeCode")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

                    b.Navigation("PrivilegeCode");

                    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.TPNT_Store", b =>
                {
                    b.Navigation("Areas");
                });

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", b =>
                {
                    b.Navigation("Orgs");

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

            modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
                {
                    b.Navigation("Stores");
                });

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