using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Pomelo.EntityFrameworkCore.MySql.Scaffolding.Internal;

namespace WebAPIServer.Models;

public partial class UtsManageContext : DbContext
{
    public UtsManageContext()
    {
    }

    public UtsManageContext(DbContextOptions<UtsManageContext> options)
        : base(options)
    {
    }

    public virtual DbSet<TblUtsManageApplist> TblUtsManageApplists { get; set; }

    public virtual DbSet<TblUtsManageApplog> TblUtsManageApplogs { get; set; }

    public virtual DbSet<TblUtsManageAuthlog> TblUtsManageAuthlogs { get; set; }

    public virtual DbSet<TblUtsManageAuthmanage> TblUtsManageAuthmanages { get; set; }

    public virtual DbSet<TblUtsManageCompany> TblUtsManageCompanies { get; set; }

    public virtual DbSet<TblUtsManageDataservicelist> TblUtsManageDataservicelists { get; set; }

    public virtual DbSet<TblUtsManageDataservicelog> TblUtsManageDataservicelogs { get; set; }

    public virtual DbSet<TblUtsManageDblist> TblUtsManageDblists { get; set; }

    public virtual DbSet<TblUtsManageDevlist> TblUtsManageDevlists { get; set; }

    public virtual DbSet<TblUtsManageDevlog> TblUtsManageDevlogs { get; set; }

    public virtual DbSet<TblUtsManageErrcode> TblUtsManageErrcodes { get; set; }

    public virtual DbSet<TblUtsManageLicenselist> TblUtsManageLicenselists { get; set; }

    public virtual DbSet<TblUtsManageLog> TblUtsManageLogs { get; set; }

    public virtual DbSet<TblUtsManageModule> TblUtsManageModules { get; set; }

    public virtual DbSet<TblUtsManageOperationlist> TblUtsManageOperationlists { get; set; }

    public virtual DbSet<TblUtsManageOrderstatus> TblUtsManageOrderstatuses { get; set; }

    public virtual DbSet<TblUtsManageSearchkey> TblUtsManageSearchkeys { get; set; }

    public virtual DbSet<TblUtsManageServicelog> TblUtsManageServicelogs { get; set; }

    public virtual DbSet<TblUtsManageSwreleaselog> TblUtsManageSwreleaselogs { get; set; }

    public virtual DbSet<TblUtsManageSwupdate> TblUtsManageSwupdates { get; set; }

    public virtual DbSet<TblUtsManageSynclist> TblUtsManageSynclists { get; set; }

    public virtual DbSet<TblUtsManageTestplantip> TblUtsManageTestplantips { get; set; }

    public virtual DbSet<TblUtsManageUser> TblUtsManageUsers { get; set; }

    public virtual DbSet<TblUtsManageUser20230712> TblUtsManageUser20230712s { get; set; }

    public virtual DbSet<TblUtsManageUserauthOperation> TblUtsManageUserauthOperations { get; set; }

    public virtual DbSet<TblUtsManageUtscmdlist> TblUtsManageUtscmdlists { get; set; }

    public virtual DbSet<TblUtsManangeUseronlinelog> TblUtsManangeUseronlinelogs { get; set; }

    public virtual DbSet<TblUtsUseroperation> TblUtsUseroperations { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
        => optionsBuilder.UseMySql("server=122.152.232.170;database=uts_manage;charset=utf8;uid=utsDatabaseRootUser;pwd=tP^P$ySC(Kk*8mhH1o45st9;port=3307", Microsoft.EntityFrameworkCore.ServerVersion.Parse("10.4.32-mariadb"));

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder
            .UseCollation("utf8_unicode_ci")
            .HasCharSet("utf8");

        modelBuilder.Entity<TblUtsManageApplist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_applist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment(" 索引，无作用")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AppId)
                .HasComment("APP索引")
                .HasColumnType("int(11)")
                .HasColumnName("AppID");
            entity.Property(e => e.AppName)
                .HasMaxLength(64)
                .HasComment("APP名称");
            entity.Property(e => e.AppVersion)
                .HasMaxLength(32)
                .HasComment("APP版本");
            entity.Property(e => e.LastActiveDateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("APP最后活动时间")
                .HasColumnType("datetime");
            entity.Property(e => e.LastInfomation)
                .HasComment("App最新信息")
                .HasColumnType("text");
            entity.Property(e => e.RegisterDateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("APP注册时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Remark).HasMaxLength(254);
            entity.Property(e => e.ServiceId)
                .HasComment("服务索引")
                .HasColumnType("int(11)")
                .HasColumnName("ServiceID");
        });

        modelBuilder.Entity<TblUtsManageApplog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_applog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("索引，无作用")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AppName)
                .HasMaxLength(254)
                .HasComment("APP名字");
            entity.Property(e => e.AppVersion)
                .HasMaxLength(64)
                .HasComment("App版本");
            entity.Property(e => e.DateTime)
                .HasComment("产生日期")
                .HasColumnType("datetime");
            entity.Property(e => e.LogText)
                .HasComment("日志内容")
                .HasColumnType("text");
            entity.Property(e => e.LogType)
                .HasMaxLength(32)
                .HasComment("日志类型");
            entity.Property(e => e.ProjectName)
                .HasMaxLength(64)
                .HasComment("测试项目名");
            entity.Property(e => e.ServiceId)
                .HasComment("服务索引")
                .HasColumnType("int(11)")
                .HasColumnName("ServiceID");
            entity.Property(e => e.StationName)
                .HasMaxLength(64)
                .HasComment("测试站名");
            entity.Property(e => e.TestPlan)
                .HasMaxLength(254)
                .HasComment("测试流程名");
        });

        modelBuilder.Entity<TblUtsManageAuthlog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_authlog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.Auth)
                .HasComment("权限（0禁止，1只读，2读写）")
                .HasColumnType("int(11)");
            entity.Property(e => e.AuthId)
                .HasColumnType("int(11)")
                .HasColumnName("AuthID");
            entity.Property(e => e.Exist)
                .HasDefaultValueSql("b'0'")
                .HasComment("存在\r\n")
                .HasColumnType("bit(1)");
            entity.Property(e => e.UserId)
                .HasColumnType("int(11)")
                .HasColumnName("UserID");
        });

        modelBuilder.Entity<TblUtsManageAuthmanage>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_authmanage")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.Describe)
                .HasMaxLength(254)
                .HasComment("描述");
            entity.Property(e => e.ModuleId)
                .HasMaxLength(254)
                .HasDefaultValueSql("''")
                .HasComment("部分权限")
                .HasColumnName("ModuleID");
        });

        modelBuilder.Entity<TblUtsManageCompany>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_company", tb => tb.HasComment("客户列表"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.CreateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.CustomerName)
                .HasMaxLength(64)
                .HasComment("客户名称");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageDataservicelist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_dataservicelist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("服务索引唯一值")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.BarnchNet)
                .HasMaxLength(254)
                .HasComment("子网名称");
            entity.Property(e => e.CacheCount)
                .HasComment("本机缓存数量")
                .HasColumnType("int(11)");
            entity.Property(e => e.CompanyName)
                .HasMaxLength(64)
                .HasComment("公司名");
            entity.Property(e => e.ErrMsg)
                .HasMaxLength(254)
                .HasComment("故障信息");
            entity.Property(e => e.IsDbproxyConn)
                .HasComment("内网连接状态")
                .HasColumnType("int(11)")
                .HasColumnName("IsDBProxyConn");
            entity.Property(e => e.IsOnline).HasComment("是否在线");
            entity.Property(e => e.LicenseId)
                .HasComment("鉴权文件索引")
                .HasColumnType("int(11)")
                .HasColumnName("LicenseID");
            entity.Property(e => e.LicenseValidDateTime)
                .HasMaxLength(254)
                .HasComment("鉴权文件有效日期");
            entity.Property(e => e.ManageStatus)
                .HasDefaultValueSql("'1'")
                .HasComment("服务当前状态,1有效,0无效")
                .HasColumnType("int(11)");
            entity.Property(e => e.NetworkNeiborhood)
                .HasMaxLength(254)
                .HasComment("网上邻居");
            entity.Property(e => e.ProcessorId)
                .HasMaxLength(128)
                .HasComment("CUP序列号")
                .HasColumnName("ProcessorID");
            entity.Property(e => e.Roles)
                .HasComment("设备角色")
                .HasColumnType("int(11)");
            entity.Property(e => e.ServiceLastActiveDateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("服务最后活动日期")
                .HasColumnType("timestamp");
            entity.Property(e => e.ServiceOnlineDateTime)
                .ValueGeneratedOnAddOrUpdate()
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("服务上线时间")
                .HasColumnType("timestamp");
            entity.Property(e => e.ServiceRegisterDateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasComment("服务注册日期")
                .HasColumnType("timestamp");
            entity.Property(e => e.ServiceValid)
                .HasDefaultValueSql("'1'")
                .HasComment("服务是否有效,注册默认有效")
                .HasColumnType("tinyint(4)");
            entity.Property(e => e.ServiceVersion)
                .HasMaxLength(32)
                .HasComment("服务版本");
            entity.Property(e => e.TerminalAlias)
                .HasMaxLength(128)
                .HasComment("服务自定义标识名");
            entity.Property(e => e.TerminalMac)
                .HasMaxLength(32)
                .HasComment("服务MAC地址")
                .HasColumnName("TerminalMAC");
            entity.Property(e => e.TerminalName)
                .HasMaxLength(128)
                .HasComment("服务终端名称");
            entity.Property(e => e.TerminalOs)
                .HasMaxLength(254)
                .HasComment("服务操作系统")
                .HasColumnName("TerminalOS");
            entity.Property(e => e.TerminalType)
                .HasMaxLength(64)
                .HasComment("服务终端类型");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
            entity.Property(e => e.UserrMsg)
                .HasMaxLength(254)
                .HasComment("更新服务的错误")
                .HasColumnName("USErrMsg");
            entity.Property(e => e.UsisOnline)
                .HasComment("更新服务连接状态")
                .HasColumnName("USIsOnline");
            entity.Property(e => e.Usver)
                .HasMaxLength(32)
                .HasComment("更新服务版本")
                .HasColumnName("USVer");
        });

        modelBuilder.Entity<TblUtsManageDataservicelog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_dataservicelog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("日志索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.DateTime)
                .HasComment("生成日期与时间")
                .HasColumnType("datetime");
            entity.Property(e => e.LogText)
                .HasComment("日志内容")
                .HasColumnType("text");
            entity.Property(e => e.LogType)
                .HasMaxLength(32)
                .HasComment("日志类型");
            entity.Property(e => e.Mac)
                .HasMaxLength(32)
                .HasComment("Mac地址");
            entity.Property(e => e.PrivateIp)
                .HasMaxLength(64)
                .HasComment("内网IP地址");
            entity.Property(e => e.PublicIp)
                .HasMaxLength(64)
                .HasComment("公网IP地址");
            entity.Property(e => e.ServiceId)
                .HasComment("数据服务索引")
                .HasColumnType("int(11)")
                .HasColumnName("ServiceID");
            entity.Property(e => e.ServiceVersion)
                .HasMaxLength(64)
                .HasComment("数据服务版本");
            entity.Property(e => e.UpdateServiceVersion)
                .HasMaxLength(64)
                .HasComment("更新服务版本");
            entity.Property(e => e.VendorName)
                .HasMaxLength(254)
                .HasComment("厂商名称");
        });

        modelBuilder.Entity<TblUtsManageDblist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_dblist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("数据库ID")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.CompanyId)
                .HasComment("数据库关联公司的索引")
                .HasColumnType("int(11)")
                .HasColumnName("CompanyID");
            entity.Property(e => e.DatabaseDesc)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("数据库详细说明");
            entity.Property(e => e.DatabaseName)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("数据库名");
            entity.Property(e => e.DatabasePassword)
                .HasMaxLength(64)
                .HasComment("数据库连接密码");
            entity.Property(e => e.DatabaseUser)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("数据库连接名");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageDevlist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_devlist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("设备ID,唯一索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.DevName)
                .HasMaxLength(254)
                .HasComment("设备名称");
            entity.Property(e => e.DevType)
                .HasMaxLength(254)
                .HasComment("设备类型");
            entity.Property(e => e.FirstLoginDate)
                .HasComment("第一次登陆时间")
                .HasColumnType("datetime");
            entity.Property(e => e.LastOnlineDate)
                .HasComment("最后一次在线时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Mac)
                .HasMaxLength(264)
                .HasComment("设备MAC地址");
            entity.Property(e => e.OnlineStatus)
                .HasComment("在线状态")
                .HasColumnType("int(11)");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
            entity.Property(e => e.Valid)
                .HasComment("设备是有有效")
                .HasColumnType("int(11)");
        });

        modelBuilder.Entity<TblUtsManageDevlog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_devlog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AppName)
                .HasMaxLength(254)
                .HasComment("产生日志的App名");
            entity.Property(e => e.AppVersion)
                .HasMaxLength(254)
                .HasComment("APP版本号");
            entity.Property(e => e.DateTime)
                .HasComment("操作时间")
                .HasColumnType("datetime");
            entity.Property(e => e.DevId)
                .HasColumnType("int(11)")
                .HasColumnName("DevID");
            entity.Property(e => e.LicFileName)
                .HasMaxLength(254)
                .HasComment("Licence文件名");
            entity.Property(e => e.Operation)
                .HasMaxLength(254)
                .HasComment("操作内容");
            entity.Property(e => e.PrivateIp)
                .HasMaxLength(254)
                .HasComment("设备内网IP")
                .HasColumnName("Private_IP");
            entity.Property(e => e.PublicIp)
                .HasMaxLength(254)
                .HasComment("设备公网IP")
                .HasColumnName("Public_IP");
            entity.Property(e => e.TestPlan)
                .HasMaxLength(254)
                .HasComment("测试配置名称");
            entity.Property(e => e.UserId)
                .HasComment("登陆用户账号索引")
                .HasColumnType("int(11)")
                .HasColumnName("UserID");
        });

        modelBuilder.Entity<TblUtsManageErrcode>(entity =>
        {
            entity.HasKey(e => e.ErrCode).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_errcode")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.ErrCode)
                .HasMaxLength(32)
                .HasComment("错误ID，唯一值");
            entity.Property(e => e.ErrColor)
                .HasMaxLength(16)
                .HasDefaultValueSql("'ff0000'")
                .HasComment("统计图表中对应的颜色");
            entity.Property(e => e.ErrMsg)
                .HasMaxLength(254)
                .HasComment("错误提示");
            entity.Property(e => e.ErrType)
                .HasMaxLength(254)
                .HasComment("错误类型");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageLicenselist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_licenselist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("鉴权文件索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.CompanyName)
                .HasMaxLength(254)
                .HasComment("鉴权文件所属公司");
            entity.Property(e => e.ReleaseDate)
                .HasComment("发布日期")
                .HasColumnType("datetime");
            entity.Property(e => e.Remark)
                .HasMaxLength(254)
                .HasComment("备注");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
            entity.Property(e => e.ValidDateTime)
                .HasComment("有效日期")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_log", tb => tb.HasComment("操作日志"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasComment("索引,无作用")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.DateTime)
                .HasComment("日志产生时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Operation)
                .HasMaxLength(254)
                .HasComment("操作内容");
            entity.Property(e => e.UserId)
                .HasComment("用户索引")
                .HasColumnType("int(11)")
                .HasColumnName("UserID");
        });

        modelBuilder.Entity<TblUtsManageModule>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_module")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.Controller)
                .HasMaxLength(64)
                .HasComment("控制器");
            entity.Property(e => e.Exist)
                .HasDefaultValueSql("b'0'")
                .HasComment("1代表已录入")
                .HasColumnType("bit(1)");
            entity.Property(e => e.Method)
                .HasMaxLength(64)
                .HasComment("方法名");
            entity.Property(e => e.Operation)
                .HasMaxLength(255)
                .HasComment("功能描述");
            entity.Property(e => e.Remark)
                .HasMaxLength(255)
                .HasComment("功能备注");
        });

        modelBuilder.Entity<TblUtsManageOperationlist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_operationlist", tb => tb.HasComment("操作权限列表"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("功能索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.OperationDesc)
                .HasMaxLength(254)
                .HasComment("功能模块详细说明");
            entity.Property(e => e.OperationLevel)
                .HasComment("操作级别")
                .HasColumnType("int(11)");
            entity.Property(e => e.OperationName)
                .HasMaxLength(254)
                .HasComment("功能模块名");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageOrderstatus>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_orderstatus")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.Remark).HasMaxLength(254);
            entity.Property(e => e.StatusName).HasMaxLength(64);
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageSearchkey>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_searchkey")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.DataBaseId)
                .HasComment("数据库ID")
                .HasColumnType("int(11)")
                .HasColumnName("DataBaseID");
            entity.Property(e => e.SearchVarKey)
                .HasMaxLength(64)
                .HasComment("查询条件");
        });

        modelBuilder.Entity<TblUtsManageServicelog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_servicelog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("日志索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AppName)
                .HasMaxLength(254)
                .HasComment("应用名称");
            entity.Property(e => e.AppVersion)
                .HasMaxLength(254)
                .HasComment("应用版本");
            entity.Property(e => e.CompanyName)
                .HasMaxLength(254)
                .HasComment("公司名称");
            entity.Property(e => e.DateTime)
                .HasComment("日志生成日期与时间")
                .HasColumnType("datetime");
            entity.Property(e => e.DevMac)
                .HasMaxLength(254)
                .HasComment("设备MAC");
            entity.Property(e => e.DevName)
                .HasMaxLength(254)
                .HasComment("设备名称");
            entity.Property(e => e.DevOnline)
                .HasMaxLength(254)
                .HasComment("设备网络状态");
            entity.Property(e => e.DevOs)
                .HasMaxLength(254)
                .HasComment("设备系统版本")
                .HasColumnName("DevOS");
            entity.Property(e => e.DevPrivateIp)
                .HasMaxLength(254)
                .HasComment("设备内网IP地址")
                .HasColumnName("DevPrivateIP");
            entity.Property(e => e.DevPublicIp)
                .HasMaxLength(254)
                .HasComment("设备公网IP")
                .HasColumnName("DevPublicIP");
            entity.Property(e => e.DevUserName)
                .HasMaxLength(254)
                .HasComment("设备用户名");
            entity.Property(e => e.LogText)
                .HasComment("日志内容")
                .HasColumnType("text");
            entity.Property(e => e.LogType)
                .HasMaxLength(254)
                .HasComment("日志类型");
        });

        modelBuilder.Entity<TblUtsManageSwreleaselog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_swreleaselog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("软件发布索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.ReleaseDate)
                .HasComment("发布日期与时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ReleaseVersion)
                .HasMaxLength(254)
                .HasComment("发布版本号");
            entity.Property(e => e.Remark)
                .HasMaxLength(254)
                .HasComment("发布说明");
            entity.Property(e => e.SoftwareName)
                .HasMaxLength(254)
                .HasComment("软件名称");
            entity.Property(e => e.UserId)
                .HasComment("发布用户索引")
                .HasColumnType("int(11)")
                .HasColumnName("UserID");
        });

        modelBuilder.Entity<TblUtsManageSwupdate>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_swupdate")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("软件索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.BinPackage)
                .HasComment("升级的二进制文件")
                .HasColumnType("blob");
            entity.Property(e => e.BinPackageMd5)
                .HasMaxLength(254)
                .HasComment("MD5校验码");
            entity.Property(e => e.LastVersion)
                .HasMaxLength(254)
                .HasComment("最新版本号");
            entity.Property(e => e.PackageName)
                .HasMaxLength(254)
                .HasComment("软件包名");
            entity.Property(e => e.ReleaseDate)
                .HasComment("发布日期")
                .HasColumnType("datetime");
            entity.Property(e => e.SoftwareName)
                .HasMaxLength(254)
                .HasComment("软件名称");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageSynclist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_synclist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.RevisionId)
                .HasComment("表版本编号")
                .HasColumnType("int(11)")
                .HasColumnName("RevisionID");
            entity.Property(e => e.SyncType)
                .HasMaxLength(254)
                .HasComment("同步类型");
            entity.Property(e => e.TableName)
                .HasMaxLength(254)
                .HasComment("需要同步的表名");
        });

        modelBuilder.Entity<TblUtsManageTestplantip>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_testplantips")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.ColDesc)
                .HasMaxLength(254)
                .HasComment("列描述");
            entity.Property(e => e.ColName)
                .HasMaxLength(254)
                .HasComment("列名");
            entity.Property(e => e.ColType)
                .HasMaxLength(254)
                .HasComment("列类型");
            entity.Property(e => e.ColValue)
                .HasMaxLength(254)
                .HasComment("默认值");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManageUser>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_user", tb => tb.HasComment("用户列表"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("用户索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AccountBill).HasComment("设置结单权限");
            entity.Property(e => e.BarCode)
                .HasMaxLength(254)
                .HasComment("条码登陆");
            entity.Property(e => e.CompanyId)
                .HasComment("所属公司ID")
                .HasColumnType("int(11)")
                .HasColumnName("CompanyID");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Email)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("电子邮箱");
            entity.Property(e => e.IsAdmin).HasComment("是否为管理员 默认是0 管理员为1");
            entity.Property(e => e.IsValid).HasComment("是否有效");
            entity.Property(e => e.Mobile)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("手机号码");
            entity.Property(e => e.Password)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("登录密码");
            entity.Property(e => e.PlaintextPwd)
                .HasMaxLength(64)
                .HasComment("登录密码明文");
            entity.Property(e => e.SetBarCode).HasComment("设置条码权限");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
            entity.Property(e => e.UserName)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("用户名");
            entity.Property(e => e.WeiXin)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("微信账号");
        });

        modelBuilder.Entity<TblUtsManageUser20230712>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_user20230712", tb => tb.HasComment("用户列表"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("用户索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.AccountBill).HasComment("设置结单权限");
            entity.Property(e => e.BarCode)
                .HasMaxLength(254)
                .HasComment("条码登陆");
            entity.Property(e => e.CompanyId)
                .HasComment("所属公司ID")
                .HasColumnType("int(11)")
                .HasColumnName("CompanyID");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Email)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("电子邮箱");
            entity.Property(e => e.IsAdmin).HasComment("是否为管理员 默认是0 管理员为1");
            entity.Property(e => e.IsValid).HasComment("是否有效");
            entity.Property(e => e.Mobile)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("手机号码");
            entity.Property(e => e.Password)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("登录密码");
            entity.Property(e => e.PlaintextPwd)
                .HasMaxLength(64)
                .HasComment("登录密码明文");
            entity.Property(e => e.SetBarCode).HasComment("设置条码权限");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
            entity.Property(e => e.UserName)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("用户名");
            entity.Property(e => e.WeiXin)
                .HasMaxLength(64)
                .HasDefaultValueSql("''")
                .HasComment("微信账号");
        });

        modelBuilder.Entity<TblUtsManageUserauthOperation>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_userauth_operation", tb => tb.HasComment("用户厂家权限"))
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("索引,无作用")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.DatabaseId)
                .HasComment("数据库索引")
                .HasColumnType("int(11)")
                .HasColumnName("DatabaseID");
            entity.Property(e => e.DatabaseName)
                .HasMaxLength(255)
                .HasDefaultValueSql("''")
                .HasComment("数据库名称");
            entity.Property(e => e.FullAccess)
                .HasMaxLength(255)
                .HasDefaultValueSql("''")
                .HasComment("拥有完整权限功能索引，用逗号分隔");
            entity.Property(e => e.ManagerAccess)
                .HasMaxLength(255)
                .HasComment("拥有管理权限索引,用逗号分隔");
            entity.Property(e => e.ReadOnlyAccess)
                .HasMaxLength(255)
                .HasDefaultValueSql("''")
                .HasComment("拥有只读权限功能索引，用逗号分隔");
            entity.Property(e => e.ReadProject)
                .HasMaxLength(255)
                .HasComment("拥有机型权限索引,用逗号分隔");
            entity.Property(e => e.ReadWriteAccess)
                .HasMaxLength(255)
                .HasDefaultValueSql("''")
                .HasComment("拥有读写权限功能索引，用逗号分隔");
            entity.Property(e => e.UserId)
                .HasComment("用户索引")
                .HasColumnType("int(11)")
                .HasColumnName("UserID");
        });

        modelBuilder.Entity<TblUtsManageUtscmdlist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manage_utscmdlist")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasComment("命令索引")
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.CmdDesc)
                .HasMaxLength(254)
                .HasDefaultValueSql("'NULL'")
                .HasComment("命令说明");
            entity.Property(e => e.CmdName)
                .HasMaxLength(254)
                .HasDefaultValueSql("'NULL'")
                .HasComment("命令名称");
            entity.Property(e => e.CmdType)
                .HasMaxLength(254)
                .HasDefaultValueSql("'NULL'")
                .HasComment("命令类型");
            entity.Property(e => e.ParamCount)
                .HasMaxLength(254)
                .HasComment("命令参数总数");
            entity.Property(e => e.ParamDesc1)
                .HasMaxLength(254)
                .HasComment("参数说明1");
            entity.Property(e => e.ParamDesc2)
                .HasMaxLength(254)
                .HasComment("参数说明2");
            entity.Property(e => e.ParamDesc3)
                .HasMaxLength(254)
                .HasComment("参数说明3");
            entity.Property(e => e.ParamDesc4)
                .HasMaxLength(254)
                .HasComment("参数说明4");
            entity.Property(e => e.ParamDesc5)
                .HasMaxLength(254)
                .HasComment("参数说明5");
            entity.Property(e => e.ParamDesc6)
                .HasMaxLength(254)
                .HasComment("参数说明6");
            entity.Property(e => e.ParamDesc7)
                .HasMaxLength(254)
                .HasComment("参数说明7");
            entity.Property(e => e.ParamDesc8)
                .HasMaxLength(254)
                .HasComment("参数说明8");
            entity.Property(e => e.ParamLower1)
                .HasMaxLength(254)
                .HasComment("参数下限1");
            entity.Property(e => e.ParamLower2)
                .HasMaxLength(254)
                .HasComment("参数下限2");
            entity.Property(e => e.ParamLower3)
                .HasMaxLength(254)
                .HasComment("参数下限3");
            entity.Property(e => e.ParamLower4)
                .HasMaxLength(254)
                .HasComment("参数下限4");
            entity.Property(e => e.ParamLower5)
                .HasMaxLength(254)
                .HasComment("参数下限5");
            entity.Property(e => e.ParamLower6)
                .HasMaxLength(254)
                .HasComment("参数下限6");
            entity.Property(e => e.ParamLower7)
                .HasMaxLength(254)
                .HasComment("参数下限7");
            entity.Property(e => e.ParamLower8)
                .HasMaxLength(254)
                .HasComment("参数下限8");
            entity.Property(e => e.ParamType1)
                .HasMaxLength(254)
                .HasComment("参数类型1");
            entity.Property(e => e.ParamType2)
                .HasMaxLength(254)
                .HasComment("参数类型2");
            entity.Property(e => e.ParamType3)
                .HasMaxLength(254)
                .HasComment("参数类型3");
            entity.Property(e => e.ParamType4)
                .HasMaxLength(254)
                .HasComment("参数类型4");
            entity.Property(e => e.ParamType5)
                .HasMaxLength(254)
                .HasComment("参数类型5");
            entity.Property(e => e.ParamType6)
                .HasMaxLength(254)
                .HasComment("参数类型6");
            entity.Property(e => e.ParamType7)
                .HasMaxLength(254)
                .HasComment("参数类型7");
            entity.Property(e => e.ParamType8)
                .HasMaxLength(254)
                .HasComment("参数类型8");
            entity.Property(e => e.ParamUpper1)
                .HasMaxLength(254)
                .HasComment("参数上限1");
            entity.Property(e => e.ParamUpper2)
                .HasMaxLength(254)
                .HasComment("参数上限2");
            entity.Property(e => e.ParamUpper3)
                .HasMaxLength(254)
                .HasComment("参数上限3");
            entity.Property(e => e.ParamUpper4)
                .HasMaxLength(254)
                .HasComment("参数上限4");
            entity.Property(e => e.ParamUpper5)
                .HasMaxLength(254)
                .HasComment("参数上限5");
            entity.Property(e => e.ParamUpper6)
                .HasMaxLength(254)
                .HasComment("参数上限6");
            entity.Property(e => e.ParamUpper7)
                .HasMaxLength(254)
                .HasComment("参数上限7");
            entity.Property(e => e.ParamUpper8)
                .HasMaxLength(254)
                .HasComment("参数上限8");
            entity.Property(e => e.ParamValue1)
                .HasMaxLength(254)
                .HasComment("参数默认值1");
            entity.Property(e => e.ParamValue2)
                .HasMaxLength(254)
                .HasComment("参数默认值2");
            entity.Property(e => e.ParamValue3)
                .HasMaxLength(254)
                .HasComment("参数默认值3");
            entity.Property(e => e.ParamValue4)
                .HasMaxLength(254)
                .HasComment("参数默认值4");
            entity.Property(e => e.ParamValue5)
                .HasMaxLength(254)
                .HasComment("参数默认值5");
            entity.Property(e => e.ParamValue6)
                .HasMaxLength(254)
                .HasComment("参数默认值6");
            entity.Property(e => e.ParamValue7)
                .HasMaxLength(254)
                .HasComment("参数默认值7");
            entity.Property(e => e.ParamValue8)
                .HasMaxLength(254)
                .HasComment("参数默认值8");
            entity.Property(e => e.UpdateTime)
                .HasDefaultValueSql("current_timestamp()")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TblUtsManangeUseronlinelog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_manange_useronlinelog")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.CreationTime).HasColumnType("datetime");
            entity.Property(e => e.Ip)
                .HasMaxLength(255)
                .HasComment("ip地址");
            entity.Property(e => e.State)
                .HasComment("1是在线 0不在线")
                .HasColumnType("int(11)");
            entity.Property(e => e.UserNames)
                .HasMaxLength(100)
                .HasComment("用户名字");
        });

        modelBuilder.Entity<TblUtsUseroperation>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tbl_uts_useroperation")
                .UseCollation("utf8_general_ci");

            entity.Property(e => e.Id)
                .HasColumnType("int(11)")
                .HasColumnName("ID");
            entity.Property(e => e.Browser)
                .HasMaxLength(255)
                .HasComment("浏览器版本");
            entity.Property(e => e.CreationTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Database)
                .HasMaxLength(100)
                .HasComment("选择的数据库");
            entity.Property(e => e.Device)
                .HasMaxLength(255)
                .HasComment("设备型号");
            entity.Property(e => e.Ip)
                .HasMaxLength(255)
                .HasComment("ip地址");
            entity.Property(e => e.Location)
                .HasMaxLength(255)
                .HasComment("地理位置");
            entity.Property(e => e.Operation)
                .HasMaxLength(255)
                .HasComment("操作类型");
            entity.Property(e => e.UserName)
                .HasMaxLength(100)
                .HasComment("用户名字");
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
