using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace DAL.New_Models;

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

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

    public virtual DbSet<DevMonitorLog> DevMonitorLogs { get; set; }

    public virtual DbSet<EcoDetail> EcoDetails { get; set; }

    public virtual DbSet<EcoSetting> EcoSettings { get; set; }

    public virtual DbSet<FcsorderDatum> FcsorderData { get; set; }

    public virtual DbSet<KongTiaoTimer> KongTiaoTimers { get; set; }

    public virtual DbSet<LieEco> LieEcos { get; set; }

    public virtual DbSet<RegisterLog> RegisterLogs { get; set; }

    public virtual DbSet<RoomNoBodyHowToLog> RoomNoBodyHowToLogs { get; set; }

    public virtual DbSet<RoomNobodyHowTo> RoomNobodyHowTos { get; set; }

    public virtual DbSet<SmartRobotDisableTime> SmartRobotDisableTimes { get; set; }

    public virtual DbSet<TbAlarmSetting> TbAlarmSettings { get; set; }

    public virtual DbSet<TbAppHotel> TbAppHotels { get; set; }

    public virtual DbSet<TbAppMenu> TbAppMenus { get; set; }

    public virtual DbSet<TbAppRoom> TbAppRooms { get; set; }

    public virtual DbSet<TbCarbonStatus> TbCarbonStatuses { get; set; }

    public virtual DbSet<TbFaultRecord> TbFaultRecords { get; set; }

    public virtual DbSet<TbFaultType> TbFaultTypes { get; set; }

    public virtual DbSet<TbGroup> TbGroups { get; set; }

    public virtual DbSet<TbHost> TbHosts { get; set; }

    public virtual DbSet<TbHostAir> TbHostAirs { get; set; }

    public virtual DbSet<TbHostAirRecord> TbHostAirRecords { get; set; }

    public virtual DbSet<TbHostFault> TbHostFaults { get; set; }

    public virtual DbSet<TbHostFaultRecord> TbHostFaultRecords { get; set; }

    public virtual DbSet<TbHostModal> TbHostModals { get; set; }

    public virtual DbSet<TbHostModalEnergy> TbHostModalEnergies { get; set; }

    public virtual DbSet<TbHostModalRecord> TbHostModalRecords { get; set; }

    public virtual DbSet<TbHostModalRecordsBak> TbHostModalRecordsBaks { get; set; }

    public virtual DbSet<TbHostRoomCard> TbHostRoomCards { get; set; }

    public virtual DbSet<TbHostScene> TbHostScenes { get; set; }

    public virtual DbSet<TbHostTimingControl> TbHostTimingControls { get; set; }

    public virtual DbSet<TbHostUpdate> TbHostUpdates { get; set; }

    public virtual DbSet<TbHostUpdateStatus> TbHostUpdateStatuses { get; set; }

    public virtual DbSet<TbHostWordsReport> TbHostWordsReports { get; set; }

    public virtual DbSet<TbHostsRcu> TbHostsRcus { get; set; }

    public virtual DbSet<TbHotelAirControl> TbHotelAirControls { get; set; }

    public virtual DbSet<TbHotelSeason> TbHotelSeasons { get; set; }

    public virtual DbSet<TbManualVisit> TbManualVisits { get; set; }

    public virtual DbSet<TbModalType> TbModalTypes { get; set; }

    public virtual DbSet<TbModel> TbModels { get; set; }

    public virtual DbSet<TbModelDetail> TbModelDetails { get; set; }

    public virtual DbSet<TbRoomCard> TbRoomCards { get; set; }

    public virtual DbSet<TbRoomCardType> TbRoomCardTypes { get; set; }

    public virtual DbSet<TbRoomModal> TbRoomModals { get; set; }

    public virtual DbSet<TbRoomModalType> TbRoomModalTypes { get; set; }

    public virtual DbSet<TbRoomService> TbRoomServices { get; set; }

    public virtual DbSet<TbRoomServiceRecord> TbRoomServiceRecords { get; set; }

    public virtual DbSet<TbRoomStatus> TbRoomStatuses { get; set; }

    public virtual DbSet<TbRoomStatusAid> TbRoomStatusAids { get; set; }

    public virtual DbSet<TbRoomType> TbRoomTypes { get; set; }

    public virtual DbSet<TbRoomTypeAir> TbRoomTypeAirs { get; set; }

    public virtual DbSet<TbRoomTypeChannel> TbRoomTypeChannels { get; set; }

    public virtual DbSet<TbRoomTypeModal> TbRoomTypeModals { get; set; }

    public virtual DbSet<TbRoomTypeProgramFile> TbRoomTypeProgramFiles { get; set; }

    public virtual DbSet<TbRoomTypeScene> TbRoomTypeScenes { get; set; }

    public virtual DbSet<TbRoomTypeSceneModal> TbRoomTypeSceneModals { get; set; }

    public virtual DbSet<TbRoomTypeWxmenu> TbRoomTypeWxmenus { get; set; }

    public virtual DbSet<TbSeason> TbSeasons { get; set; }

    public virtual DbSet<TbSysActiveUser> TbSysActiveUsers { get; set; }

    public virtual DbSet<TbSysAuthority> TbSysAuthorities { get; set; }

    public virtual DbSet<TbSysCity> TbSysCities { get; set; }

    public virtual DbSet<TbSysCounty> TbSysCounties { get; set; }

    public virtual DbSet<TbSysDistrict> TbSysDistricts { get; set; }

    public virtual DbSet<TbSysHotel> TbSysHotels { get; set; }

    public virtual DbSet<TbSysHotelGroup> TbSysHotelGroups { get; set; }

    public virtual DbSet<TbSysOauth2> TbSysOauth2s { get; set; }

    public virtual DbSet<TbSysPosition> TbSysPositions { get; set; }

    public virtual DbSet<TbSysProvince> TbSysProvinces { get; set; }

    public virtual DbSet<TbSysRole> TbSysRoles { get; set; }

    public virtual DbSet<TbSysSeek> TbSysSeeks { get; set; }

    public virtual DbSet<TbSysSetting> TbSysSettings { get; set; }

    public virtual DbSet<TbSysSystemLog> TbSysSystemLogs { get; set; }

    public virtual DbSet<TbSysUser> TbSysUsers { get; set; }

    public virtual DbSet<TbWxmenu> TbWxmenus { get; set; }

    public virtual DbSet<TbWxmessage> TbWxmessages { get; set; }

    public virtual DbSet<TblSyncList> TblSyncLists { get; set; }

    public virtual DbSet<Test> Tests { get; set; }

    public virtual DbSet<TftpSet> TftpSets { get; set; }

    //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    //    => optionsBuilder.UseSqlServer("Data Source=DESKTOP-DUNS5K7;Initial Catalog=RICS;User ID=sa;Password=123456;Trust Server Certificate=True");

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<DevMonitorLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PK_dev_MonitorData");

            entity.ToTable("dev_MonitorLog");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CommandType).HasMaxLength(64);
            entity.Property(e => e.CreateTime).HasMaxLength(255);
            entity.Property(e => e.Data).HasMaxLength(256);
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Ip)
                .HasMaxLength(64)
                .HasColumnName("IP");
            entity.Property(e => e.Mac)
                .HasMaxLength(64)
                .HasColumnName("MAC");
            entity.Property(e => e.RoomNo).HasMaxLength(64);
            entity.Property(e => e.SendOrReceive).HasMaxLength(64);
        });

        modelBuilder.Entity<EcoDetail>(entity =>
        {
            entity.ToTable("ECO_Detail");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.EcoId).HasColumnName("ECO_ID");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.RoomNo).HasMaxLength(64);
            entity.Property(e => e.TriggerTime).HasMaxLength(50);
        });

        modelBuilder.Entity<EcoSetting>(entity =>
        {
            entity.ToTable("ECO_Setting");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.AddOrCutDown).HasMaxLength(50);
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.EndTime).HasMaxLength(64);
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.RoomNo).HasMaxLength(50);
            entity.Property(e => e.StartTime).HasMaxLength(64);
        });

        modelBuilder.Entity<FcsorderDatum>(entity =>
        {
            entity.ToTable("FCSOrderData");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.FcsorderUuid)
                .HasMaxLength(64)
                .HasColumnName("FCSOrderUUID");
            entity.Property(e => e.HostNumber)
                .HasMaxLength(64)
                .HasColumnName("HostNUMBER");
            entity.Property(e => e.HostRoomnum)
                .HasMaxLength(64)
                .HasColumnName("HostROOMNUM");
            entity.Property(e => e.HotelCode).HasMaxLength(64);
            entity.Property(e => e.ItemClass).HasMaxLength(64);
            entity.Property(e => e.ItemUuid)
                .HasMaxLength(64)
                .HasColumnName("ItemUUID");
            entity.Property(e => e.LocationUuid)
                .HasMaxLength(64)
                .HasColumnName("LocationUUID");
            entity.Property(e => e.UpdateTime)
                .IsRowVersion()
                .IsConcurrencyToken();
        });

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

            entity.ToTable("KongTiaoTimer");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateDate).HasMaxLength(64);
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.EndTime).HasMaxLength(64);
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelCode).HasMaxLength(64);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.MissonKey).HasMaxLength(64);
            entity.Property(e => e.RoomNo).HasMaxLength(64);
            entity.Property(e => e.StartTime).HasMaxLength(64);
        });

        modelBuilder.Entity<LieEco>(entity =>
        {
            entity.ToTable("LieECO");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.EndTime)
                .HasMaxLength(32)
                .IsUnicode(false);
            entity.Property(e => e.HotelCode).HasMaxLength(32);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.StartTime)
                .HasMaxLength(32)
                .IsUnicode(false);
        });

        modelBuilder.Entity<RegisterLog>(entity =>
        {
            entity.ToTable("RegisterLog");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.HostId).HasColumnName("Host_ID");
            entity.Property(e => e.HotelCode)
                .HasMaxLength(64)
                .HasColumnName("Hotel_Code");
            entity.Property(e => e.Mac).HasMaxLength(64);
        });

        modelBuilder.Entity<RoomNoBodyHowToLog>(entity =>
        {
            entity.ToTable("RoomNoBodyHowTo_Log");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.MissionKey).HasMaxLength(64);
        });

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

            entity.ToTable("RoomNobodyHowTo");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.CurrentHotelId).HasColumnName("CurrentHotelID");
            entity.Property(e => e.How).HasMaxLength(64);
        });

        modelBuilder.Entity<SmartRobotDisableTime>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("SmartRobotDisableTime");

            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.DisableEtime)
                .HasMaxLength(64)
                .HasColumnName("DisableETime");
            entity.Property(e => e.DisableStime)
                .HasMaxLength(64)
                .HasColumnName("DisableSTime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelCode).HasMaxLength(64);
            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.IsTrigger).HasMaxLength(255);
            entity.Property(e => e.RoomNumber).HasMaxLength(64);
            entity.Property(e => e.TargetDomain).HasMaxLength(255);
        });

        modelBuilder.Entity<TbAlarmSetting>(entity =>
        {
            entity.HasKey(e => new { e.HotelId, e.Type, e.Code }).HasName("PK_tb_AalarmSetting");

            entity.ToTable("tb_AlarmSetting");

            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Type)
                .HasMaxLength(1)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.Code)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.AppApply)
                .HasDefaultValue(false)
                .HasComment("是否移动端上应用");
            entity.Property(e => e.Beep)
                .HasDefaultValue(false)
                .HasComment("声音提示");
            entity.Property(e => e.Color)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasColumnName("EName");
            entity.Property(e => e.ModalTypeId).HasColumnName("ModalTypeID");
            entity.Property(e => e.Name).HasMaxLength(50);
            entity.Property(e => e.Sort).HasDefaultValue(1);
            entity.Property(e => e.Value)
                .HasMaxLength(20)
                .HasDefaultValueSql("((0))");
        });

        modelBuilder.Entity<TbAppHotel>(entity =>
        {
            entity.HasKey(e => e.Code);

            entity.ToTable("tb_AppHotel");

            entity.Property(e => e.Code)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Remark).HasMaxLength(50);
            entity.Property(e => e.Sort).HasDefaultValue(1);
            entity.Property(e => e.Value).HasMaxLength(4000);
        });

        modelBuilder.Entity<TbAppMenu>(entity =>
        {
            entity.ToTable("tb_AppMenus");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Class)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.Code)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.EnglishName)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Icon).HasMaxLength(500);
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("关联菜单ID");
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.Url).HasMaxLength(100);
        });

        modelBuilder.Entity<TbAppRoom>(entity =>
        {
            entity.ToTable("tb_AppRoom");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Mac)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("app mac地址")
                .HasColumnName("MAC");
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasComment("房号");
        });

        modelBuilder.Entity<TbCarbonStatus>(entity =>
        {
            entity.ToTable("tb_CarbonStatus");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.Status).HasMaxLength(64);
            entity.Property(e => e.TriggerSource).HasMaxLength(64);
        });

        modelBuilder.Entity<TbFaultRecord>(entity =>
        {
            entity.ToTable("tb_FaultRecords");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CancelPerson)
                .HasMaxLength(20)
                .HasComment("注销人");
            entity.Property(e => e.CancelReason)
                .HasMaxLength(100)
                .HasComment("注销原因");
            entity.Property(e => e.CancelTime)
                .HasComment("注销时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Description)
                .HasMaxLength(100)
                .HasComment("故障描述");
            entity.Property(e => e.FaultTime)
                .HasComment("故障发生时间")
                .HasColumnType("datetime");
            entity.Property(e => e.FaultTypeId)
                .HasComment("故障类别ID")
                .HasColumnName("FaultTypeID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.IsCancel)
                .HasDefaultValue(false)
                .HasComment("注销:1已注销");
            entity.Property(e => e.Number)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("故障编号");
            entity.Property(e => e.RegisteredPerson)
                .HasMaxLength(20)
                .HasComment("登记人");
            entity.Property(e => e.RegisteredTime)
                .HasComment("登记时间")
                .HasColumnType("datetime");
            entity.Property(e => e.RepairContent)
                .HasMaxLength(100)
                .HasComment("维修内容");
            entity.Property(e => e.RepairPerson)
                .HasMaxLength(20)
                .HasComment("维修人");
            entity.Property(e => e.RepairTime)
                .HasComment("维修时间")
                .HasColumnType("datetime");
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasComment("房号");
            entity.Property(e => e.Status)
                .HasDefaultValue(0)
                .HasComment("维修状态：0未维修，1已维修");
        });

        modelBuilder.Entity<TbFaultType>(entity =>
        {
            entity.ToTable("tb_FaultType");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Code)
                .HasMaxLength(20)
                .HasComment("故障编号");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("故障名称");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasComment("故障说明");
        });

        modelBuilder.Entity<TbGroup>(entity =>
        {
            entity.ToTable("tb_Groups");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Name).HasMaxLength(50);
            entity.Property(e => e.ParentId)
                .HasDefaultValue(0)
                .HasColumnName("ParentID");
            entity.Property(e => e.Sort).HasDefaultValue(1);
        });

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

            entity.ToTable("tb_Hosts");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ConfigVersion).HasMaxLength(200);
            entity.Property(e => e.DeviceName)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.DeviceSecret)
                .HasMaxLength(32)
                .IsUnicode(false);
            entity.Property(e => e.DisableEndTime)
                .HasMaxLength(64)
                .IsUnicode(false)
                .HasDefaultValue("08:00");
            entity.Property(e => e.DisableStartTime)
                .HasMaxLength(64)
                .IsUnicode(false)
                .HasDefaultValue("23:00");
            entity.Property(e => e.Dns)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("DNS");
            entity.Property(e => e.DoorLockStatus)
                .HasDefaultValue(false)
                .HasComment("门锁");
            entity.Property(e => e.DoorLockStatusUpdateTime).HasColumnType("datetime");
            entity.Property(e => e.ExpireTime).HasColumnType("datetime");
            entity.Property(e => e.FcsLocationUuid)
                .HasMaxLength(128)
                .HasColumnName("FCS_locationUUID");
            entity.Property(e => e.FrameNoTime).HasColumnType("datetime");
            entity.Property(e => e.Gateway)
                .HasMaxLength(15)
                .IsUnicode(false)
                .HasDefaultValue("")
                .HasComment("默认网关");
            entity.Property(e => e.GroupId)
                .HasComment("所属楼层")
                .HasColumnName("GroupID");
            entity.Property(e => e.HiWeiCuid)
                .HasMaxLength(128)
                .HasColumnName("HiWeiCUID");
            entity.Property(e => e.HostNumber)
                .HasMaxLength(20)
                .HasComment("主机编号");
            entity.Property(e => e.HostSecret)
                .HasMaxLength(32)
                .IsUnicode(false);
            entity.Property(e => e.HostTemp).HasDefaultValue((short)0);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.HuaWeiCuid)
                .HasMaxLength(255)
                .HasColumnName("HuaWeiCUID");
            entity.Property(e => e.IotId)
                .HasMaxLength(32)
                .IsUnicode(false);
            entity.Property(e => e.Ip)
                .HasMaxLength(15)
                .IsUnicode(false)
                .HasColumnName("IP");
            entity.Property(e => e.Iptype).HasColumnName("IPType");
            entity.Property(e => e.IsWelcomeDisableTime).HasDefaultValue(false);
            entity.Property(e => e.LanIp)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("LanIP");
            entity.Property(e => e.LastModifiedTime)
                .HasColumnType("datetime")
                .HasColumnName("Last_Modified_Time");
            entity.Property(e => e.LauncherVersion).HasMaxLength(200);
            entity.Property(e => e.Mac)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("MAC");
            entity.Property(e => e.MacbindDate)
                .HasColumnType("datetime")
                .HasColumnName("MACBindDate");
            entity.Property(e => e.Model).HasMaxLength(200);
            entity.Property(e => e.Port)
                .HasDefaultValue(3341)
                .HasComment("端口");
            entity.Property(e => e.ProductKey)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.RegisterDate)
                .HasComment("注册日期")
                .HasColumnType("datetime");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasDefaultValue("")
                .HasComment("备注");
            entity.Property(e => e.RokidWebhookUrl)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.RoomCardId)
                .HasDefaultValue(1001)
                .HasComment("身份")
                .HasColumnName("RoomCardID");
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasComment("房间号");
            entity.Property(e => e.RoomStatusId)
                .HasDefaultValue(1001)
                .HasComment("房态")
                .HasColumnName("RoomStatusID");
            entity.Property(e => e.RoomTypeId)
                .HasComment("房型")
                .HasColumnName("RoomTypeID");
            entity.Property(e => e.RunTime).HasColumnType("datetime");
            entity.Property(e => e.SafeStatus)
                .HasDefaultValue(2)
                .HasComment("保险箱：0关，1开，2未接保险箱");
            entity.Property(e => e.Season).HasMaxLength(255);
            entity.Property(e => e.ServerIp)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("ServerIP");
            entity.Property(e => e.SetExpireTime).HasColumnType("datetime");
            entity.Property(e => e.Status)
                .HasDefaultValue(false)
                .HasComment("状态 0：离线 1：在线");
            entity.Property(e => e.SubnetMask)
                .HasMaxLength(15)
                .IsUnicode(false)
                .HasDefaultValue("")
                .HasComment("子网掩码");
            entity.Property(e => e.Tclcuid)
                .HasMaxLength(255)
                .HasColumnName("TCLCUID");
            entity.Property(e => e.TclskillId)
                .HasMaxLength(64)
                .IsUnicode(false)
                .HasColumnName("TCLSkillID");
            entity.Property(e => e.TianMaoCuid)
                .HasMaxLength(255)
                .HasColumnName("TianMaoCUID");
            entity.Property(e => e.UpgradeTime).HasColumnType("datetime");
            entity.Property(e => e.Version)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasDefaultValue("")
                .HasComment("版本号");
            entity.Property(e => e.Wxvalidate)
                .HasMaxLength(200)
                .HasColumnName("WXValidate");
            entity.Property(e => e.XiaoDuCuid)
                .HasMaxLength(255)
                .HasColumnName("XiaoDuCUID");
            entity.Property(e => e.XiaoMiCuid)
                .HasMaxLength(255)
                .HasColumnName("XiaoMiCUID");

            entity.HasOne(d => d.Group).WithMany(p => p.TbHosts)
                .HasForeignKey(d => d.GroupId)
                .HasConstraintName("FK_tb_Hosts_tb_Groups");

            entity.HasOne(d => d.Hotel).WithMany(p => p.TbHosts)
                .HasForeignKey(d => d.HotelId)
                .HasConstraintName("FK_tb_Hosts_tb_Sys_Hotels");

            entity.HasOne(d => d.RoomCard).WithMany(p => p.TbHosts)
                .HasForeignKey(d => d.RoomCardId)
                .OnDelete(DeleteBehavior.SetNull)
                .HasConstraintName("FK_tb_Hosts_tb_RoomCard");

            entity.HasOne(d => d.RoomStatus).WithMany(p => p.TbHosts)
                .HasForeignKey(d => d.RoomStatusId)
                .OnDelete(DeleteBehavior.SetNull)
                .HasConstraintName("FK_tb_Hosts_tb_RoomStatus");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbHosts)
                .HasForeignKey(d => d.RoomTypeId)
                .OnDelete(DeleteBehavior.SetNull)
                .HasConstraintName("FK_tb_Hosts_tb_RoomType");
        });

        modelBuilder.Entity<TbHostAir>(entity =>
        {
            entity.HasKey(e => new { e.HostId, e.RoomTypeAirId }).HasName("PK_tb_HostAirStatus");

            entity.ToTable("tb_HostAir");

            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.RoomTypeAirId).HasColumnName("RoomTypeAirID");
            entity.Property(e => e.ColdDevition)
                .HasDefaultValue((short)2)
                .HasComment("冷偏差");
            entity.Property(e => e.ColdHotMode)
                .HasDefaultValue(0)
                .HasComment("冷热模式：0/手动，1/自动");
            entity.Property(e => e.ColdHotSwitchDelayTime)
                .HasDefaultValue(30)
                .HasComment("冷热转换延时，单位：秒");
            entity.Property(e => e.ColdValve)
                .HasDefaultValue((short)0)
                .HasComment("冷阀门：0关，1开");
            entity.Property(e => e.CompensatoryTemp)
                .HasDefaultValue(0.0)
                .HasComment("补偿温度");
            entity.Property(e => e.ControlType)
                .HasDefaultValue(0)
                .HasComment("空调管制：0/二管制，1/四管制");
            entity.Property(e => e.CurrentTemp)
                .HasDefaultValue((short)0)
                .HasComment("当前温度");
            entity.Property(e => e.DeadTemp)
                .HasDefaultValue((short)2)
                .HasComment("死区温度");
            entity.Property(e => e.DisableFanHighSpeed)
                .HasDefaultValue(false)
                .HasComment("禁止风机高速运行：0/否，1/是");
            entity.Property(e => e.FanStop)
                .HasDefaultValue(false)
                .HasComment("温度到达停止风机运行");
            entity.Property(e => e.HightTemp)
                .HasDefaultValue((short)33)
                .HasComment("最高温度");
            entity.Property(e => e.HotDevition)
                .HasDefaultValue((short)2)
                .HasComment("热");
            entity.Property(e => e.InitTemp)
                .HasDefaultValue((short)22)
                .HasComment("初始温度");
            entity.Property(e => e.IsLockTemp)
                .HasDefaultValue(false)
                .HasComment("是否锁定温度");
            entity.Property(e => e.KeepTemp)
                .HasDefaultValue((short)22)
                .HasComment("保温温度");
            entity.Property(e => e.LockTemp)
                .HasDefaultValue((short)0)
                .HasComment("锁定温度");
            entity.Property(e => e.LowerTemp)
                .HasDefaultValue((short)16)
                .HasComment("最低温度");
            entity.Property(e => e.ModalId)
                .HasMaxLength(255)
                .HasColumnName("ModalID");
            entity.Property(e => e.Mode)
                .HasDefaultValue(0)
                .HasComment("模式:  1/制冷模式，2/制热模式，4/送风模式，8/除湿模式");
            entity.Property(e => e.RelateDoorContact)
                .HasDefaultValue(false)
                .HasComment("是否关联门磁");
            entity.Property(e => e.RelateRoomStatus)
                .HasDefaultValue(true)
                .HasComment("是否关联房态");
            entity.Property(e => e.RoomTypeModalId).HasColumnName("RoomTypeModalID");
            entity.Property(e => e.Running)
                .HasDefaultValue(false)
                .HasComment("空调运行状态，0/停止，1/运行");
            entity.Property(e => e.SettingTemp)
                .HasDefaultValue((short)22)
                .HasComment("设定温度");
            entity.Property(e => e.SleepColdDevition).HasComment("睡眠冷偏差");
            entity.Property(e => e.SleepDevition)
                .HasDefaultValue((short)0)
                .HasComment("睡眠模式偏差");
            entity.Property(e => e.SleepEndTime)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("睡眠结束时间");
            entity.Property(e => e.SleepFlag)
                .HasDefaultValue(false)
                .HasComment("启用睡眠标志");
            entity.Property(e => e.SleepHotDevition).HasComment("睡眠热");
            entity.Property(e => e.SleepStartTime)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("睡眠开始时间");
            entity.Property(e => e.Speed)
                .HasDefaultValue((short)0)
                .HasComment("风速：0/停止, 1/低速, 2/中速, 3/高速, 4/自动");
            entity.Property(e => e.ThermalValve)
                .HasDefaultValue((short)0)
                .HasComment("热阀门：0关，1开");
            entity.Property(e => e.TimeEndTime1)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时结束时间1");
            entity.Property(e => e.TimeEndTime2)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时结束时间2");
            entity.Property(e => e.TimeEndTime3)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时结束时间3");
            entity.Property(e => e.TimeFlag)
                .HasDefaultValue(false)
                .HasComment("启动定时");
            entity.Property(e => e.TimeStartTime1)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时开始时间1");
            entity.Property(e => e.TimeStartTime2)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时开始时间2");
            entity.Property(e => e.TimeStartTime3)
                .HasMaxLength(5)
                .IsUnicode(false)
                .HasComment("定时开始时间3");
            entity.Property(e => e.Valve)
                .HasDefaultValue(0)
                .HasComment("阀状态： 0/冷阀开，1/冷阀关，2/热阀开，3/热阀关");
            entity.Property(e => e.WelcomeTime)
                .HasDefaultValue((short)30)
                .HasComment("欢迎模式时间（分钟）");

            entity.HasOne(d => d.RoomTypeAir).WithMany(p => p.TbHostAirs)
                .HasForeignKey(d => d.RoomTypeAirId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_HostAir_tb_RoomTypeAir");
        });

        modelBuilder.Entity<TbHostAirRecord>(entity =>
        {
            entity.ToTable("tb_HostAirRecords");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.AirNo).HasComment("空调序号");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.HostId)
                .HasComment("主机ID")
                .HasColumnName("HostID");
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasDefaultValue("")
                .HasComment("房号");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Temp).HasComment("温度值");
            entity.Property(e => e.TempType).HasComment("温度类型");
        });

        modelBuilder.Entity<TbHostFault>(entity =>
        {
            entity.ToTable("tb_HostFaults");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Abnormal3Date).HasColumnType("datetime");
            entity.Property(e => e.Abnormal4Date).HasColumnType("datetime");
            entity.Property(e => e.Abnormal5Date).HasColumnType("datetime");
            entity.Property(e => e.Address)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.ElectricQtyDate).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.StatusDate).HasColumnType("datetime");
        });

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

            entity.ToTable("tb_HostFaultRecords");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Date).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.ModalAddress).HasMaxLength(25);
            entity.Property(e => e.RoomNumber).HasMaxLength(25);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeModalId).HasColumnName("RoomTypeModalID");
        });

        modelBuilder.Entity<TbHostModal>(entity =>
        {
            entity.HasKey(e => new { e.HostId, e.RoomTypeModalId });

            entity.ToTable("tb_HostModal");

            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.RoomTypeModalId).HasColumnName("RoomTypeModalID");
            entity.Property(e => e.Brightness).HasComment("亮度");
            entity.Property(e => e.Status).HasComment("状态：0关，1开");
            entity.Property(e => e.Time).HasComment("当天开启时长");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");

            entity.HasOne(d => d.RoomTypeModal).WithMany(p => p.TbHostModals)
                .HasForeignKey(d => d.RoomTypeModalId)
                .HasConstraintName("FK_tb_HostModal_tb_RoomTypeModal");
        });

        modelBuilder.Entity<TbHostModalEnergy>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("tb_HostModalEnergy");

            entity.Property(e => e.Date).HasComment("时间");
            entity.Property(e => e.Energy).HasComment("消耗能量");
            entity.Property(e => e.HostId)
                .HasComment("主机ID")
                .HasColumnName("HostID");
            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.Outlet)
                .HasMaxLength(10)
                .IsUnicode(false)
                .HasDefaultValue("");
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasComment("房号");
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeModalId)
                .HasComment("回路ID")
                .HasColumnName("RoomTypeModalID");
        });

        modelBuilder.Entity<TbHostModalRecord>(entity =>
        {
            entity.ToTable("tb_HostModalRecords");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.EndTime).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.RoomNumber).HasMaxLength(20);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeModalId).HasColumnName("RoomTypeModalID");
            entity.Property(e => e.StartTime).HasColumnType("datetime");

            entity.HasOne(d => d.RoomTypeModal).WithMany(p => p.TbHostModalRecords)
                .HasForeignKey(d => d.RoomTypeModalId)
                .HasConstraintName("FK_tb_HostModalRecords_tb_RoomTypeModal");
        });

        modelBuilder.Entity<TbHostModalRecordsBak>(entity =>
        {
            entity.ToTable("tb_HostModalRecords_bak");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.EndTime).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.RoomNumber).HasMaxLength(20);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeModalId).HasColumnName("RoomTypeModalID");
            entity.Property(e => e.StartTime).HasColumnType("datetime");
        });

        modelBuilder.Entity<TbHostRoomCard>(entity =>
        {
            entity.ToTable("tb_HostRoomCard");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CardNumber)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("房卡编号");
            entity.Property(e => e.CardTypeId)
                .HasComment("房卡类型ID")
                .HasColumnName("CardTypeID");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.InCardTime).HasColumnType("datetime");
            entity.Property(e => e.IsAlarm).HasDefaultValue(false);
            entity.Property(e => e.OutCardTime).HasColumnType("datetime");
            entity.Property(e => e.RoomCardId).HasColumnName("RoomCardID");
            entity.Property(e => e.RoomNumber).HasMaxLength(20);
            entity.Property(e => e.UserName)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("员工姓名");
            entity.Property(e => e.UserNumber)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("员工编号");
        });

        modelBuilder.Entity<TbHostScene>(entity =>
        {
            entity.HasKey(e => new { e.HostId, e.RoomTypeSceneId }).HasName("PK__tb_HostS__F27277C1AE11321C");

            entity.ToTable("tb_HostScene");

            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.RoomTypeSceneId).HasColumnName("RoomTypeSceneID");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");

            entity.HasOne(d => d.RoomTypeScene).WithMany(p => p.TbHostScenes)
                .HasForeignKey(d => d.RoomTypeSceneId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_HostScene_tb_RoomTypeScene");
        });

        modelBuilder.Entity<TbHostTimingControl>(entity =>
        {
            entity.ToTable("tb_HostTimingControl");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ExecStatus)
                .HasDefaultValue(false)
                .HasComment("执行状态：0未执行，1已执行");
            entity.Property(e => e.ExecTime)
                .HasComment("执行时间")
                .HasColumnType("datetime");
            entity.Property(e => e.GroupId)
                .HasDefaultValue(0)
                .HasComment("楼层ID")
                .HasColumnName("GroupID");
            entity.Property(e => e.HostIds)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasDefaultValue("")
                .HasComment("主机ID，以逗号隔开")
                .HasColumnName("HostIDs");
            entity.Property(e => e.HotelId)
                .HasComment("酒店ID")
                .HasColumnName("HotelID");
            entity.Property(e => e.RoomCardTypeId)
                .HasDefaultValue(0)
                .HasComment("房卡类型ID")
                .HasColumnName("RoomCardTypeID");
            entity.Property(e => e.RoomStatusId)
                .HasDefaultValue(0)
                .HasComment("房态ID")
                .HasColumnName("RoomStatusID");
            entity.Property(e => e.RoomTypeId)
                .HasDefaultValue(0)
                .HasComment("房型ID")
                .HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeSceneId)
                .HasComment("场景ID")
                .HasColumnName("RoomTypeSceneID");
            entity.Property(e => e.Timing)
                .HasMaxLength(600)
                .IsUnicode(false)
                .HasComment("定时时间（时:分）");
            entity.Property(e => e.TimingDay)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasComment("具体星期几或几号");
            entity.Property(e => e.TimingType).HasComment("定时类型：0每天，1每周，2每月");
        });

        modelBuilder.Entity<TbHostUpdate>(entity =>
        {
            entity.ToTable("tb_HostUpdate");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Account)
                .HasMaxLength(20)
                .HasComment("上传人");
            entity.Property(e => e.FileName)
                .HasMaxLength(100)
                .HasComment("升级包名称");
            entity.Property(e => e.FileType).HasComment("文件类型：0/主机固件文件，1/配置数据文件");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Href)
                .HasMaxLength(250)
                .HasComment("路径");
            entity.Property(e => e.Md5)
                .HasMaxLength(32)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("Md5值");
            entity.Property(e => e.Size).HasComment("文件大小");
            entity.Property(e => e.UploadTime)
                .HasComment("上传日期")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<TbHostUpdateStatus>(entity =>
        {
            entity.ToTable("tb_HostUpdateStatus");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.HostId)
                .HasComment("主机ID")
                .HasColumnName("HostID");
            entity.Property(e => e.HostUpdateId)
                .HasComment("升级包ID")
                .HasColumnName("HostUpdateID");
            entity.Property(e => e.PublishTime)
                .HasComment("发布时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status)
                .HasDefaultValue(0)
                .HasComment("状态");
            entity.Property(e => e.UpdatedTime)
                .HasComment("升级时间")
                .HasColumnType("datetime");

            entity.HasOne(d => d.Host).WithMany(p => p.TbHostUpdateStatuses)
                .HasForeignKey(d => d.HostId)
                .HasConstraintName("FK_tb_HostUpdateStatus_tb_Hosts");

            entity.HasOne(d => d.HostUpdate).WithMany(p => p.TbHostUpdateStatuses)
                .HasForeignKey(d => d.HostUpdateId)
                .HasConstraintName("FK_tb_HostUpdateStatus_tb_HostUpdate");
        });

        modelBuilder.Entity<TbHostWordsReport>(entity =>
        {
            entity.ToTable("tb_HostWordsReport");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreatedDate).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.Sentence).HasMaxLength(500);
            entity.Property(e => e.Type).HasDefaultValue((short)1);
        });

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

            entity.ToTable("tb_HostsRCU");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ConfigVersion).HasMaxLength(255);
            entity.Property(e => e.Core).HasMaxLength(64);
            entity.Property(e => e.Dns)
                .HasMaxLength(255)
                .HasColumnName("DNS");
            entity.Property(e => e.ExpireTime).HasColumnType("datetime");
            entity.Property(e => e.Gateway).HasMaxLength(255);
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelCode).HasMaxLength(255);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.HotelName).HasMaxLength(32);
            entity.Property(e => e.Iptype).HasColumnName("IPType");
            entity.Property(e => e.LanIp)
                .HasMaxLength(255)
                .HasColumnName("LanIP");
            entity.Property(e => e.LauncherVersion).HasMaxLength(255);
            entity.Property(e => e.Mac)
                .HasMaxLength(255)
                .HasColumnName("MAC");
            entity.Property(e => e.Model).HasMaxLength(64);
            entity.Property(e => e.RoomNumber).HasMaxLength(16);
            entity.Property(e => e.RoomRemark).HasMaxLength(96);
            entity.Property(e => e.RoomStatus).HasMaxLength(255);
            entity.Property(e => e.RoomStatusId).HasColumnName("RoomStatusID");
            entity.Property(e => e.RoomType).HasMaxLength(16);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.RoomTypeRemark).HasMaxLength(32);
            entity.Property(e => e.RunTime).HasColumnType("datetime");
            entity.Property(e => e.Season).HasMaxLength(255);
            entity.Property(e => e.ServerIp)
                .HasMaxLength(255)
                .HasColumnName("ServerIP");
            entity.Property(e => e.SetExpireTime).HasColumnType("datetime");
            entity.Property(e => e.SubnetMask).HasMaxLength(255);
            entity.Property(e => e.TypeNumber).HasMaxLength(255);
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            entity.Property(e => e.Version).HasMaxLength(255);
        });

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

            entity.ToTable("tb_HotelAirControl");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.ModifiedDate).HasColumnType("datetime");
        });

        modelBuilder.Entity<TbHotelSeason>(entity =>
        {
            entity.ToTable("tb_HotelSeason");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");

            entity.HasOne(d => d.Hotel).WithMany(p => p.TbHotelSeasons)
                .HasForeignKey(d => d.HotelId)
                .HasConstraintName("FK_tb_HotelSeason_tb_Sys_Hotels");
        });

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

            entity.ToTable("tb_ManualVisit");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CompanyName).HasMaxLength(30);
            entity.Property(e => e.CreatedDate).HasColumnType("datetime");
            entity.Property(e => e.Name).HasMaxLength(20);
            entity.Property(e => e.PhoneNumber).HasMaxLength(20);
            entity.Property(e => e.ValidateCode).HasMaxLength(4);
        });

        modelBuilder.Entity<TbModalType>(entity =>
        {
            entity.ToTable("tb_ModalType");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Name).HasMaxLength(20);
        });

        modelBuilder.Entity<TbModel>(entity =>
        {
            entity.ToTable("tb_Models");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ApplyDate)
                .HasComment("应用时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ApplyUser)
                .HasMaxLength(20)
                .HasComment("操作人");
            entity.Property(e => e.CorrectedTemp).HasComment("温度修正值");
            entity.Property(e => e.DoorDelayPo)
                .HasDefaultValue(1)
                .HasComment("门磁延时断电时间（秒）")
                .HasColumnName("DoorDelayPO");
            entity.Property(e => e.ExhausFanTime)
                .HasDefaultValue(5)
                .HasComment("定时时长（分钟/每小时）");
            entity.Property(e => e.ExhaustFanStatus)
                .HasDefaultValue(1)
                .HasComment("屋内无人时排气扇状态：0关1开2定时");
            entity.Property(e => e.FanRunStatus).HasComment("到达温度后风机是否保持低速运行");
            entity.Property(e => e.Hosts)
                .IsUnicode(false)
                .HasComment("所应用的主机ID，以逗号隔开");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.InfraredDelayPo)
                .HasDefaultValue(1)
                .HasComment("红外延时断电时间（分）")
                .HasColumnName("InfraredDelayPO");
            entity.Property(e => e.ModifiedDate)
                .HasComment("编辑时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasComment("配置方案名称");
            entity.Property(e => e.PullCardDelayPo)
                .HasDefaultValue(1)
                .HasComment("拔卡延时断电时间（秒）")
                .HasColumnName("PullCardDelayPO");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .HasComment("备注");
        });

        modelBuilder.Entity<TbModelDetail>(entity =>
        {
            entity.ToTable("tb_ModelDetail");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.AllowElectric)
                .HasDefaultValue(false)
                .HasComment("允许用电");
            entity.Property(e => e.ModelId)
                .HasComment("主表ID")
                .HasColumnName("ModelID");
            entity.Property(e => e.ModelStatus)
                .HasMaxLength(50)
                .HasComment("状态");
            entity.Property(e => e.ModelType)
                .HasDefaultValue(false)
                .HasComment("类型：手动0，自动1");
            entity.Property(e => e.OnOff)
                .HasDefaultValue(false)
                .HasComment("开关");
            entity.Property(e => e.Speed)
                .HasDefaultValue(0)
                .HasComment("速度：停止0，低速1，中速2，高速3");
            entity.Property(e => e.SummerTemp)
                .HasDefaultValue(0)
                .HasComment("夏季温度");
            entity.Property(e => e.Timer)
                .HasDefaultValue(0)
                .HasComment("定时时长（分钟/每小时）");
            entity.Property(e => e.TimingControl)
                .HasDefaultValue(false)
                .HasComment("定时控制");
            entity.Property(e => e.WinterTemp)
                .HasDefaultValue(0)
                .HasComment("冬季温度");

            entity.HasOne(d => d.Model).WithMany(p => p.TbModelDetails)
                .HasForeignKey(d => d.ModelId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_ModelDetail_tb_Models");
        });

        modelBuilder.Entity<TbRoomCard>(entity =>
        {
            entity.ToTable("tb_RoomCard");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CardNumber)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("房卡编号");
            entity.Property(e => e.CardTypeId)
                .HasComment("房卡类型ID")
                .HasColumnName("CardTypeID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.UserName)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("员工姓名");
            entity.Property(e => e.UserNumber)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("员工编号");
        });

        modelBuilder.Entity<TbRoomCardType>(entity =>
        {
            entity.ToTable("tb_RoomCardType");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.EtypeName)
                .HasMaxLength(50)
                .HasColumnName("ETypeName");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.TwtypeName)
                .HasMaxLength(50)
                .HasColumnName("TWTypeName");
            entity.Property(e => e.TypeName).HasMaxLength(50);
        });

        modelBuilder.Entity<TbRoomModal>(entity =>
        {
            entity.HasKey(e => e.ModalAddress).HasName("PK_tb_RoomTypeLoop");

            entity.ToTable("tb_RoomModal");

            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("回路地址");
            entity.Property(e => e.Color)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.ModalId)
                .HasMaxLength(255)
                .HasColumnName("ModalID");
            entity.Property(e => e.ModalName).HasMaxLength(255);
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("名称");
            entity.Property(e => e.Outlet)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("输出口");
            entity.Property(e => e.Power)
                .HasDefaultValue(0)
                .HasComment("功率(单位：瓦)");
            entity.Property(e => e.Remark).HasMaxLength(255);
            entity.Property(e => e.Sort).HasDefaultValue(1);
            entity.Property(e => e.Type).HasComment("类型");
        });

        modelBuilder.Entity<TbRoomModalType>(entity =>
        {
            entity.ToTable("tb_RoomModalType");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.Cname)
                .HasMaxLength(50)
                .HasColumnName("CName");
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("EName");
        });

        modelBuilder.Entity<TbRoomService>(entity =>
        {
            entity.ToTable("tb_RoomService");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.AlarmCode)
                .HasMaxLength(3)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("服务类型");
            entity.Property(e => e.AlarmType)
                .HasMaxLength(1)
                .IsFixedLength();
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.StartTime)
                .HasComment("操作时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status)
                .HasDefaultValue(true)
                .HasComment("状态");

            entity.HasOne(d => d.Host).WithMany(p => p.TbRoomServices)
                .HasForeignKey(d => d.HostId)
                .HasConstraintName("FK_tb_RoomService_tb_Hosts");
        });

        modelBuilder.Entity<TbRoomServiceRecord>(entity =>
        {
            entity.ToTable("tb_RoomServiceRecords");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Account)
                .HasMaxLength(20)
                .HasComment("操作人");
            entity.Property(e => e.AlarmCode)
                .HasMaxLength(3)
                .IsUnicode(false)
                .IsFixedLength()
                .HasComment("服务类型");
            entity.Property(e => e.EndTime).HasColumnType("datetime");
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.Name).HasMaxLength(50);
            entity.Property(e => e.RoomNumber)
                .HasMaxLength(20)
                .HasComment("房号");
            entity.Property(e => e.StartTime)
                .HasComment("操作时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status)
                .HasDefaultValue(true)
                .HasComment("状态");
        });

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

            entity.ToTable("tb_RoomStatus");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasComment("类型")
                .HasColumnName("ID");
            entity.Property(e => e.Color)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("名称")
                .HasColumnName("EName");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("名称");
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");
        });

        modelBuilder.Entity<TbRoomStatusAid>(entity =>
        {
            entity.ToTable("tb_RoomStatusAid");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasComment("类型")
                .HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasColumnName("EName");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("辅助房态名称");
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
        });

        modelBuilder.Entity<TbRoomType>(entity =>
        {
            entity.ToTable("tb_RoomType");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.Code)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("房型编号");
            entity.Property(e => e.ConfigFileName).HasMaxLength(255);
            entity.Property(e => e.ConfigFilePath).HasMaxLength(255);
            entity.Property(e => e.Content).HasColumnType("ntext");
            entity.Property(e => e.ControlType)
                .HasDefaultValue(0)
                .HasComment("空调管制：0/二管制，1/四管制");
            entity.Property(e => e.Day)
                .HasMaxLength(15)
                .HasComment("白天时间");
            entity.Property(e => e.GroupAddress)
                .HasMaxLength(10)
                .HasComment("组地址");
            entity.Property(e => e.HostName)
                .HasMaxLength(50)
                .HasComment("主机上定义的房型名称");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.LastModifiedTime)
                .HasColumnType("datetime")
                .HasColumnName("Last_Modified_Time");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("房型名称");
            entity.Property(e => e.Night).HasMaxLength(15);
            entity.Property(e => e.ProjectId)
                .HasComment("项目号")
                .HasColumnName("ProjectID");
            entity.Property(e => e.RoomArea).HasMaxLength(255);
            entity.Property(e => e.RoomHeight).HasMaxLength(255);
            entity.Property(e => e.RoomHotLossRatio).HasMaxLength(255);
            entity.Property(e => e.SavingModeTime).HasMaxLength(15);
            entity.Property(e => e.UploadTime)
                .HasComment("上传日期")
                .HasColumnType("datetime");
            entity.Property(e => e.Uploader)
                .HasMaxLength(20)
                .HasComment("上传人");
        });

        modelBuilder.Entity<TbRoomTypeAir>(entity =>
        {
            entity.ToTable("tb_RoomTypeAir");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.CustomerName)
                .HasMaxLength(50)
                .HasComment("自定义名称");
            entity.Property(e => e.EnglishName)
                .HasMaxLength(50)
                .HasComment("英文名称");
            entity.Property(e => e.ModalTypeId)
                .HasComment("类型")
                .HasColumnName("ModalTypeID");
            entity.Property(e => e.ModalTypeName)
                .HasMaxLength(50)
                .HasComment("配置名称");
            entity.Property(e => e.RoomTypeId)
                .HasComment("房型")
                .HasColumnName("RoomTypeID");
            entity.Property(e => e.Sort).HasDefaultValue(1);

            entity.HasOne(d => d.ModalType).WithMany(p => p.TbRoomTypeAirs)
                .HasForeignKey(d => d.ModalTypeId)
                .HasConstraintName("FK_tb_RoomTypeAir_tb_ModalType");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeAirs)
                .HasForeignKey(d => d.RoomTypeId)
                .OnDelete(DeleteBehavior.Cascade)
                .HasConstraintName("FK_tb_RoomTypeAir_tb_RoomType");
        });

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

            entity.ToTable("tb_RoomTypeChannels");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Name).HasMaxLength(10);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeChannels)
                .HasForeignKey(d => d.RoomTypeId)
                .HasConstraintName("FK_tb_RoomTypeChannels_tb_RoomType");
        });

        modelBuilder.Entity<TbRoomTypeModal>(entity =>
        {
            entity.ToTable("tb_RoomTypeModal");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.AliasName).HasMaxLength(255);
            entity.Property(e => e.AppApply)
                .HasDefaultValue(false)
                .HasComment("是否移动端上应用");
            entity.Property(e => e.Color)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.Default1).HasDefaultValue(true);
            entity.Property(e => e.EnglishName)
                .HasMaxLength(50)
                .HasComment("英文名称");
            entity.Property(e => e.ModalAddress)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("回路地址");
            entity.Property(e => e.MultipleGroupId).HasColumnName("MultipleGroupID");
            entity.Property(e => e.MultipleTclname)
                .HasMaxLength(255)
                .HasColumnName("MultipleTCLName");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("名称");
            entity.Property(e => e.Outlet)
                .HasMaxLength(50)
                .HasComment("输出口");
            entity.Property(e => e.Power)
                .HasDefaultValue(0)
                .HasComment("功率(单位：瓦)");
            entity.Property(e => e.RoomTypeId)
                .HasComment("外键ID")
                .HasColumnName("RoomTypeID");
            entity.Property(e => e.Sort).HasDefaultValue(1);
            entity.Property(e => e.Subtype).HasComment("二级类型");
            entity.Property(e => e.TcldeviceName)
                .HasMaxLength(255)
                .HasColumnName("TCLDeviceName");
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");
            entity.Property(e => e.Type).HasComment("类型");
            entity.Property(e => e.WxactiveIndicator).HasColumnName("WXActiveIndicator");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeModals)
                .HasForeignKey(d => d.RoomTypeId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_RoomTypeModal_tb_RoomType");
        });

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

            entity.ToTable("tb_RoomTypeProgramFiles");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Account).HasMaxLength(255);
            entity.Property(e => e.FileName).HasMaxLength(255);
            entity.Property(e => e.Href).HasMaxLength(255);
            entity.Property(e => e.Md5).HasMaxLength(255);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.UploadTime).HasColumnType("datetime");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeProgramFiles)
                .HasForeignKey(d => d.RoomTypeId)
                .HasConstraintName("FK_tb_RoomTypeProgramFiles_tb_RoomType");
        });

        modelBuilder.Entity<TbRoomTypeScene>(entity =>
        {
            entity.ToTable("tb_RoomTypeScene");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.AliasName).HasMaxLength(255);
            entity.Property(e => e.AppApply)
                .HasDefaultValue(false)
                .HasComment("是否移动端上应用");
            entity.Property(e => e.EnglishName)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("场景英文名称");
            entity.Property(e => e.GroupAddress)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("组地址");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Icon).HasMaxLength(500);
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("场景中文名称");
            entity.Property(e => e.RoomTypeId)
                .HasComment("房型ID")
                .HasColumnName("RoomTypeID");
            entity.Property(e => e.Sort).HasDefaultValue(1);
            entity.Property(e => e.Twname)
                .HasMaxLength(255)
                .HasColumnName("TWName");
            entity.Property(e => e.Type).HasComment("0.自定义场景   1.指令场景");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeScenes)
                .HasForeignKey(d => d.RoomTypeId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_RoomTypeScene_tb_RoomType");
        });

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

            entity.ToTable("tb_RoomTypeSceneModal");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Brightness)
                .HasDefaultValue(0)
                .HasComment("亮度");
            entity.Property(e => e.ModalId)
                .HasMaxLength(255)
                .HasColumnName("ModalID");
            entity.Property(e => e.RoomTypeModalId)
                .HasComment("模块ID")
                .HasColumnName("RoomTypeModalID");
            entity.Property(e => e.RoomTypeSceneId).HasColumnName("RoomTypeSceneID");
            entity.Property(e => e.Status).HasComment("设备状态：0关，1开");

            entity.HasOne(d => d.RoomTypeModal).WithMany(p => p.TbRoomTypeSceneModals)
                .HasForeignKey(d => d.RoomTypeModalId)
                .HasConstraintName("FK_tb_RoomTypeSceneModal_tb_RoomTypeModal");

            entity.HasOne(d => d.RoomTypeScene).WithMany(p => p.TbRoomTypeSceneModals)
                .HasForeignKey(d => d.RoomTypeSceneId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("FK_tb_RoomTypeSceneModal_tb_RoomTypeScene");
        });

        modelBuilder.Entity<TbRoomTypeWxmenu>(entity =>
        {
            entity.ToTable("tb_RoomTypeWXMenus");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Class)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.Code)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasColumnName("EName");
            entity.Property(e => e.Name).HasMaxLength(20);
            entity.Property(e => e.RoomTypeId).HasColumnName("RoomTypeID");
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");

            entity.HasOne(d => d.RoomType).WithMany(p => p.TbRoomTypeWxmenus)
                .HasForeignKey(d => d.RoomTypeId)
                .HasConstraintName("FK_tb_RoomTypeWXMenus_tb_RoomType");
        });

        modelBuilder.Entity<TbSeason>(entity =>
        {
            entity.ToTable("tb_Season");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.BeginDate)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("开始日期");
            entity.Property(e => e.EndDate)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasComment("结束日期");
            entity.Property(e => e.Name)
                .HasMaxLength(10)
                .HasComment("季节名称");
        });

        modelBuilder.Entity<TbSysActiveUser>(entity =>
        {
            entity.ToTable("tb_Sys_ActiveUser");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Account).HasMaxLength(20);
            entity.Property(e => e.LoginIp)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("LoginIP");
            entity.Property(e => e.SessionId)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("SessionID");
        });

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

            entity.ToTable("tb_Sys_Authorities");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasComment("英文名称")
                .HasColumnName("EName");
            entity.Property(e => e.Icon).HasMaxLength(500);
            entity.Property(e => e.IsMenu).HasDefaultValue(true);
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("名称");
            entity.Property(e => e.ParentId)
                .HasComment("父节点ID")
                .HasColumnName("ParentID");
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");
            entity.Property(e => e.Url)
                .HasMaxLength(500)
                .HasComment("权限组");
        });

        modelBuilder.Entity<TbSysCity>(entity =>
        {
            entity.ToTable("tb_Sys_City");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Code)
                .HasMaxLength(12)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(30)
                .IsUnicode(false)
                .HasColumnName("EName");
            entity.Property(e => e.Name).HasMaxLength(10);
            entity.Property(e => e.ProvinceCode)
                .HasMaxLength(12)
                .IsUnicode(false);
            entity.Property(e => e.Twname)
                .HasMaxLength(10)
                .HasColumnName("TWName");
        });

        modelBuilder.Entity<TbSysCounty>(entity =>
        {
            entity.ToTable("tb_Sys_County");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CityCode)
                .HasMaxLength(12)
                .IsUnicode(false);
            entity.Property(e => e.Code)
                .HasMaxLength(12)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(30)
                .IsUnicode(false)
                .HasColumnName("EName");
            entity.Property(e => e.Name).HasMaxLength(10);
            entity.Property(e => e.Twname)
                .HasMaxLength(10)
                .HasColumnName("TWName");
        });

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

            entity.ToTable("tb_Sys_Districts");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Code)
                .HasMaxLength(20)
                .HasDefaultValue("")
                .HasComment("代码");
            entity.Property(e => e.CreatedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("创建人");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ModifiedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("修改人");
            entity.Property(e => e.ModifiedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasDefaultValue("")
                .HasComment("名称");
            entity.Property(e => e.ParentId)
                .HasDefaultValue(0)
                .HasComment("上级部门")
                .HasColumnName("ParentID");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasDefaultValue("")
                .HasComment("备注");
            entity.Property(e => e.Sort).HasComment("排序");
        });

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

            entity.ToTable("tb_Sys_Hotels");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Address)
                .HasMaxLength(300)
                .HasComment("地址");
            entity.Property(e => e.AssociatedAccount).HasMaxLength(20);
            entity.Property(e => e.CityCode).HasMaxLength(12);
            entity.Property(e => e.Code)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasDefaultValue("")
                .HasComment("酒店代码");
            entity.Property(e => e.Contact)
                .HasMaxLength(20)
                .HasComment("联系人");
            entity.Property(e => e.CountyCode).HasMaxLength(12);
            entity.Property(e => e.CreatedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("创建人");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.DeviceStatusPushUrl)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("DeviceStatusPushURL");
            entity.Property(e => e.DomainUrl)
                .HasMaxLength(255)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("英文名称")
                .HasColumnName("EName");
            entity.Property(e => e.EndDayTime).HasDefaultValue(18);
            entity.Property(e => e.EtvHotelId)
                .HasMaxLength(255)
                .HasColumnName("ETV_HotelID");
            entity.Property(e => e.FaultPushUrl)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("FaultPushURL");
            entity.Property(e => e.FcsCarbonUuid)
                .HasMaxLength(255)
                .HasColumnName("FCS_Carbon_UUID");
            entity.Property(e => e.FcsCleanUuid)
                .HasMaxLength(255)
                .HasColumnName("FCS_Clean_UUID");
            entity.Property(e => e.FcsMenCiClose)
                .HasMaxLength(255)
                .HasColumnName("FCS_MenCi_Close");
            entity.Property(e => e.FcsMenCiOpen)
                .HasMaxLength(255)
                .HasColumnName("FCS_MenCi_Open");
            entity.Property(e => e.FcsPropertyId)
                .HasMaxLength(255)
                .HasColumnName("FCS_PropertyID");
            entity.Property(e => e.FcsRcuDeviceOffline)
                .HasMaxLength(255)
                .HasColumnName("FCS_RCU_Device_Offline");
            entity.Property(e => e.FcsRcuOffline)
                .HasMaxLength(255)
                .HasColumnName("FCS_RCU_Offline");
            entity.Property(e => e.FcsRcuOnline)
                .HasMaxLength(255)
                .HasColumnName("FCS_RCU_Online");
            entity.Property(e => e.FcsSosUuid)
                .HasMaxLength(255)
                .HasColumnName("FCS_SOS_UUID");
            entity.Property(e => e.FcsTiSongWuPin)
                .HasMaxLength(255)
                .HasColumnName("FCS_TiSongWuPin");
            entity.Property(e => e.FcsTouSuUuid)
                .HasMaxLength(255)
                .HasColumnName("FCS_TouSu_UUID");
            entity.Property(e => e.FcsloginPassWord)
                .HasMaxLength(255)
                .HasColumnName("FCSLoginPassWord");
            entity.Property(e => e.FcsloginUrl)
                .HasMaxLength(255)
                .HasColumnName("FCSLoginUrl");
            entity.Property(e => e.FcsloginUserName)
                .HasMaxLength(255)
                .HasColumnName("FCSLoginUserName");
            entity.Property(e => e.FcspushEnable).HasColumnName("FCSPushEnable");
            entity.Property(e => e.GoodbyeSpeech).HasMaxLength(255);
            entity.Property(e => e.HeTongNumber).HasMaxLength(255);
            entity.Property(e => e.IsPushPmsdata).HasColumnName("IsPushPMSData");
            entity.Property(e => e.IsSyncPms).HasColumnName("IsSyncPMS");
            entity.Property(e => e.IsUseQianLiMa).HasDefaultValue(false);
            entity.Property(e => e.IsUseSkyworthTv)
                .HasDefaultValue(false)
                .HasColumnName("IsUseSkyworthTV");
            entity.Property(e => e.IsUseTcltv).HasColumnName("IsUseTCLTV");
            entity.Property(e => e.LastModifiedTime)
                .HasColumnType("datetime")
                .HasColumnName("Last_Modified_Time");
            entity.Property(e => e.LogoPath).HasMaxLength(255);
            entity.Property(e => e.ModifiedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("修改人");
            entity.Property(e => e.ModifiedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("名称");
            entity.Property(e => e.ParentId)
                .HasDefaultValue(0)
                .HasComment("上级部门")
                .HasColumnName("ParentID");
            entity.Property(e => e.Phone)
                .HasMaxLength(50)
                .HasComment("联系电话");
            entity.Property(e => e.ProvinceCode).HasMaxLength(12);
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasDefaultValue("")
                .HasComment("备注");
            entity.Property(e => e.SkyworthTvauthCode)
                .HasMaxLength(64)
                .HasColumnName("SkyworthTVauthCode");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.StartDayTime).HasDefaultValue(6);
            entity.Property(e => e.Styles).HasMaxLength(10);
            entity.Property(e => e.SysHotelGroupId).HasColumnName("SysHotelGroupID");
            entity.Property(e => e.TouSuResponseData).HasMaxLength(255);
            entity.Property(e => e.TvcontrolToken)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("TVControlToken");
            entity.Property(e => e.TvcontrolUrl)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("TVControlUrl");
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");
            entity.Property(e => e.ValidateDate).HasColumnType("datetime");
            entity.Property(e => e.WelcomeBgm)
                .HasMaxLength(255)
                .HasColumnName("WelcomeBGM");
            entity.Property(e => e.WelcomeSpeech).HasMaxLength(100);
            entity.Property(e => e.Wxvalidate)
                .HasMaxLength(50)
                .HasComment("登录密码")
                .HasColumnName("WXValidate");
        });

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

            entity.ToTable("tb_Sys_HotelGroups");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.LastModifiedTime)
                .HasColumnType("datetime")
                .HasColumnName("Last_Modified_Time");
            entity.Property(e => e.Name).HasMaxLength(255);
            entity.Property(e => e.ParentId).HasColumnName("ParentID");
        });

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

            entity.ToTable("tb_Sys_Oauth2");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.AccessToken).HasMaxLength(600);
            entity.Property(e => e.Account).HasMaxLength(20);
            entity.Property(e => e.Code).HasMaxLength(100);
            entity.Property(e => e.CreatedDate).HasColumnType("datetime");
            entity.Property(e => e.RedirectUri).HasMaxLength(100);
            entity.Property(e => e.RefreshToken).HasMaxLength(600);
        });

        modelBuilder.Entity<TbSysPosition>(entity =>
        {
            entity.ToTable("tb_Sys_Positions");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.Code).HasMaxLength(10);
            entity.Property(e => e.CreatedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("创建人");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ModifiedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("修改人");
            entity.Property(e => e.ModifiedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasComment("名称");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasComment("备注");
            entity.Property(e => e.Sort).HasComment("排序");
        });

        modelBuilder.Entity<TbSysProvince>(entity =>
        {
            entity.ToTable("tb_Sys_Province");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Code)
                .HasMaxLength(12)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(30)
                .IsUnicode(false)
                .HasColumnName("EName");
            entity.Property(e => e.Name).HasMaxLength(10);
            entity.Property(e => e.Twname)
                .HasMaxLength(10)
                .HasColumnName("TWName");
        });

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

            entity.ToTable("tb_Sys_Roles");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.CreatedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("创建人");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.ModifiedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("修改人");
            entity.Property(e => e.ModifiedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasComment("名称");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasComment("备注");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.SysHotelGroupId).HasColumnName("SysHotelGroupID");

            entity.HasMany(d => d.Authorities).WithMany(p => p.Roles)
                .UsingEntity<Dictionary<string, object>>(
                    "TbSysRoleAuthority",
                    r => r.HasOne<TbSysAuthority>().WithMany()
                        .HasForeignKey("AuthorityId")
                        .OnDelete(DeleteBehavior.ClientSetNull)
                        .HasConstraintName("FK_tb_SecurityRoleAuthorities_tb_SecurityAuthorities"),
                    l => l.HasOne<TbSysRole>().WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.ClientSetNull)
                        .HasConstraintName("FK_tb_SecurityRoleAuthorities_tb_SecurityRoles"),
                    j =>
                    {
                        j.HasKey("RoleId", "AuthorityId").HasName("PK_tb_SecurityRoleAuthorities");
                        j.ToTable("tb_Sys_RoleAuthorities");
                        j.IndexerProperty<int>("RoleId")
                            .HasComment("角色ID")
                            .HasColumnName("RoleID");
                        j.IndexerProperty<int>("AuthorityId")
                            .HasComment("权限ID")
                            .HasColumnName("AuthorityID");
                    });
        });

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

            entity.ToTable("tb_Sys_Seek");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.Prefix).HasMaxLength(20);
            entity.Property(e => e.Remark).HasMaxLength(200);
        });

        modelBuilder.Entity<TbSysSetting>(entity =>
        {
            entity.ToTable("tb_Sys_Setting");

            entity.Property(e => e.Id)
                .ValueGeneratedNever()
                .HasColumnName("ID");
            entity.Property(e => e.AllowEdit).HasComment("是否允许界面编辑");
            entity.Property(e => e.Eremark)
                .HasMaxLength(50)
                .HasColumnName("ERemark");
            entity.Property(e => e.Etype)
                .HasMaxLength(50)
                .HasComment("分类")
                .HasColumnName("EType");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("名称");
            entity.Property(e => e.Remark).HasMaxLength(50);
            entity.Property(e => e.Type)
                .HasMaxLength(50)
                .HasComment("分类");
            entity.Property(e => e.Value)
                .HasMaxLength(50)
                .HasComment("值");
        });

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

            entity.ToTable("tb_Sys_SystemLogs");

            entity.Property(e => e.Id)
                .HasComment("id")
                .HasColumnName("ID");
            entity.Property(e => e.Account)
                .HasMaxLength(20)
                .HasComment("用户名");
            entity.Property(e => e.Action)
                .HasMaxLength(50)
                .HasComment("动作");
            entity.Property(e => e.AuthorityId)
                .HasComment("权限模块ID")
                .HasColumnName("AuthorityID");
            entity.Property(e => e.Detail)
                .HasMaxLength(2000)
                .HasComment("明细");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Ip)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("IP地址")
                .HasColumnName("IP");
            entity.Property(e => e.Result)
                .HasMaxLength(100)
                .HasComment("结果");
            entity.Property(e => e.Time)
                .HasComment("操作日期")
                .HasColumnType("datetime");
        });

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

            entity.ToTable("tb_Sys_Users");

            entity.Property(e => e.Id)
                .HasComment("ID")
                .HasColumnName("ID");
            entity.Property(e => e.Account)
                .HasMaxLength(20)
                .HasComment("登录账号");
            entity.Property(e => e.ActiveIndicator)
                .HasDefaultValue(true)
                .HasComment("启用");
            entity.Property(e => e.CreatedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("创建人");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.DepartmentId)
                .HasComment("所属部门")
                .HasColumnName("DepartmentID");
            entity.Property(e => e.DistrictId).HasColumnName("DistrictID");
            entity.Property(e => e.Email)
                .HasMaxLength(50)
                .HasComment("邮件");
            entity.Property(e => e.GroupId)
                .HasComment("所属分组ID")
                .HasColumnName("GroupID");
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.LastModifiedTime)
                .HasColumnType("datetime")
                .HasColumnName("Last_Modified_Time");
            entity.Property(e => e.LoginIp)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("LoginIP");
            entity.Property(e => e.ModifiedBy)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("修改人");
            entity.Property(e => e.ModifiedDate)
                .HasDefaultValueSql("(getdate())")
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasDefaultValue("")
                .HasComment("姓名");
            entity.Property(e => e.Password)
                .HasMaxLength(50)
                .HasComment("登录密码");
            entity.Property(e => e.Password2).HasMaxLength(255);
            entity.Property(e => e.Phone).HasMaxLength(50);
            entity.Property(e => e.PositionId).HasColumnName("PositionID");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasComment("备注");
            entity.Property(e => e.RoleId).HasColumnName("RoleID");
            entity.Property(e => e.Sex)
                .HasMaxLength(2)
                .IsFixedLength();
            entity.Property(e => e.Sort)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.SysHotelGroupId).HasColumnName("SysHotelGroupID");

            entity.HasOne(d => d.Department).WithMany(p => p.TbSysUsers)
                .HasForeignKey(d => d.DepartmentId)
                .HasConstraintName("FK_tb_Sys_Users_tb_Sys_Departments");

            entity.HasOne(d => d.District).WithMany(p => p.TbSysUsers)
                .HasForeignKey(d => d.DistrictId)
                .HasConstraintName("FK_tb_Sys_Users_tb_Sys_Districts");

            entity.HasOne(d => d.Role).WithMany(p => p.TbSysUsers)
                .HasForeignKey(d => d.RoleId)
                .HasConstraintName("FK_tb_Sys_Users_tb_Sys_Roles");

            entity.HasMany(d => d.Hotels).WithMany(p => p.Users)
                .UsingEntity<Dictionary<string, object>>(
                    "TbSysUserHotel",
                    r => r.HasOne<TbSysHotel>().WithMany()
                        .HasForeignKey("HotelId")
                        .OnDelete(DeleteBehavior.ClientSetNull)
                        .HasConstraintName("FK_tb_Sys_UserDepartments_tb_Sys_Departments"),
                    l => l.HasOne<TbSysUser>().WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.ClientSetNull)
                        .HasConstraintName("FK_tb_Sys_UserDepartments_tb_Sys_Users"),
                    j =>
                    {
                        j.HasKey("UserId", "HotelId").HasName("PK_tb_Sys_UserDepartments");
                        j.ToTable("tb_Sys_UserHotel");
                        j.IndexerProperty<int>("UserId").HasColumnName("UserID");
                        j.IndexerProperty<int>("HotelId").HasColumnName("HotelID");
                    });
        });

        modelBuilder.Entity<TbWxmenu>(entity =>
        {
            entity.ToTable("tb_WXMenus");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Class)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.Code)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.Ename)
                .HasMaxLength(50)
                .HasColumnName("EName");
            entity.Property(e => e.Name).HasMaxLength(20);
            entity.Property(e => e.Twname)
                .HasMaxLength(50)
                .HasColumnName("TWName");
        });

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

            entity.ToTable("tb_WXMessage");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.Contact).HasMaxLength(20);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.Message).HasMaxLength(100);
            entity.Property(e => e.Remark).HasMaxLength(50);
            entity.Property(e => e.RoomNumber).HasMaxLength(20);
            entity.Property(e => e.Time).HasColumnType("datetime");
        });

        modelBuilder.Entity<TblSyncList>(entity =>
        {
            entity.ToTable("TBL_SyncList");

            entity.Property(e => e.OtherTableName).HasMaxLength(50);
            entity.Property(e => e.RevisionId).HasColumnName("RevisionID");
            entity.Property(e => e.TableName).HasMaxLength(20);
        });

        modelBuilder.Entity<Test>(entity =>
        {
            entity.ToTable("Test");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasMaxLength(255);
            entity.Property(e => e.How).HasMaxLength(255);
            entity.Property(e => e.MyName).HasMaxLength(64);
        });

        modelBuilder.Entity<TftpSet>(entity =>
        {
            entity.ToTable("TFTP_set");

            entity.Property(e => e.Id).HasColumnName("ID");
            entity.Property(e => e.CreateTime).HasMaxLength(64);
            entity.Property(e => e.HostId).HasColumnName("HostID");
            entity.Property(e => e.HotelCode).HasMaxLength(64);
            entity.Property(e => e.HotelId).HasColumnName("HotelID");
            entity.Property(e => e.RoomNumber).HasMaxLength(128);
            entity.Property(e => e.TargetDomain).HasMaxLength(128);
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
