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

namespace CloudGaming.Model.DbSqlServer.Db_Phone;

/// <summary>
/// 云游戏实体类
/// </summary>
public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
{
    public CloudGamingPhoneContext() : base(null)
    {
    }

    public CloudGamingPhoneContext(DbContextOptions<CloudGamingPhoneContext> options)
         : base(null, options)
    {
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="tenantInfo"></param>
    public CloudGamingPhoneContext(ITenantInfo tenantInfo) : base(tenantInfo)
    {

    }


    /// <summary>
    /// 
    /// </summary>
    /// <param name="tenantInfo"></param>
    /// <param name="options"></param>
    public CloudGamingPhoneContext(ITenantInfo tenantInfo, DbContextOptions<CloudGamingPhoneContext> options) : base(tenantInfo, options)
    {
    }


    /// <summary>
    /// 用户头像框
    /// </summary>
    public virtual DbSet<T_AvatarFrame> T_AvatarFrame { get; set; }

    /// <summary>
    /// Epg分组配置表
    /// </summary>
    public virtual DbSet<T_Epg_CategoryCfg> T_Epg_CategoryCfg { get; set; }

    /// <summary>
    /// Epg配置表
    /// </summary>
    public virtual DbSet<T_Epg_Cfg> T_Epg_Cfg { get; set; }

    /// <summary>
    /// 悬浮球配置
    /// </summary>
    public virtual DbSet<T_FloatBall_Cfg> T_FloatBall_Cfg { get; set; }

    /// <summary>
    /// 游戏配置
    /// </summary>
    public virtual DbSet<T_GameCBT> T_GameCBT { get; set; }

    /// <summary>
    /// 游戏虚拟手柄，虚拟键盘设置
    /// </summary>
    public virtual DbSet<T_GameInputSetting> T_GameInputSetting { get; set; }

    /// <summary>
    /// 游戏按键方案配置表
    /// </summary>
    public virtual DbSet<T_GameKeyPlan_CBT> T_GameKeyPlan_CBT { get; set; }

    /// <summary>
    /// 按键表
    /// </summary>
    public virtual DbSet<T_GamePressKey> T_GamePressKey { get; set; }

    /// <summary>
    /// 游戏按键方案
    /// </summary>
    public virtual DbSet<T_GamePressKeyPlan> T_GamePressKeyPlan { get; set; }

    /// <summary>
    /// 游戏展示
    /// </summary>
    public virtual DbSet<T_GameShow> T_GameShow { get; set; }

    /// <summary>
    /// 游戏减价配置表
    /// </summary>
    public virtual DbSet<T_Game_DiscountCfg> T_Game_DiscountCfg { get; set; }

    /// <summary>
    /// 用户玩游戏日志表
    /// </summary>
    public virtual DbSet<T_Game_PlayGameLog> T_Game_PlayGameLog { get; set; }

    /// <summary>
    /// 虚拟键盘配置表
    /// </summary>
    public virtual DbSet<T_KeyboardSetting> T_KeyboardSetting { get; set; }

    /// <summary>
    /// 方案按键配置表
    /// </summary>
    public virtual DbSet<T_PlanKey_CBT> T_PlanKey_CBT { get; set; }

    /// <summary>
    /// 通用弹框配置
    /// </summary>
    public virtual DbSet<T_Popup> T_Popup { get; set; }

    /// <summary>
    /// 弹窗按钮
    /// </summary>
    public virtual DbSet<T_PopupBtn> T_PopupBtn { get; set; }

    /// <summary>
    /// 商城表
    /// </summary>
    public virtual DbSet<T_Products> T_Products { get; set; }

    /// <summary>
    /// 产品表奖励
    /// </summary>
    public virtual DbSet<T_Products_Reward> T_Products_Reward { get; set; }

    /// <summary>
    /// 兑换码表
    /// </summary>
    public virtual DbSet<T_RedemptionCode> T_RedemptionCode { get; set; }

    /// <summary>
    /// 通用奖励配置表
    /// </summary>
    public virtual DbSet<T_RewardConfig> T_RewardConfig { get; set; }

    /// <summary>
    /// 搜索页面展示的搜索词
    /// </summary>
    public virtual DbSet<T_Search> T_Search { get; set; }

    /// <summary>
    /// 七日签到配置表
    /// </summary>
    public virtual DbSet<T_SevenDaySignIn> T_SevenDaySignIn { get; set; }

    /// <summary>
    /// 七日签到奖励配置表
    /// </summary>
    public virtual DbSet<T_SevenDaySignIn_Reward> T_SevenDaySignIn_Reward { get; set; }

    /// <summary>
    /// 系统消息表
    /// </summary>
    public virtual DbSet<T_Sys_Message> T_Sys_Message { get; set; }

    /// <summary>
    /// 位置大小类型列表
    /// </summary>
    public virtual DbSet<T_UITypes> T_UITypes { get; set; }

    /// <summary>
    /// UI集合
    /// </summary>
    public virtual DbSet<T_UIs> T_UIs { get; set; }

    /// <summary>
    /// 用户反馈表
    /// </summary>
    public virtual DbSet<T_User_FeedBack> T_User_FeedBack { get; set; }

    /// <summary>
    /// 用户游玩记录表。玩一次游戏记录一条数据
    /// </summary>
    public virtual DbSet<T_User_GameList> T_User_GameList { get; set; }

    /// <summary>
    /// 用户消息表
    /// </summary>
    public virtual DbSet<T_User_Messages> T_User_Messages { get; set; }

    /// <summary>
    /// 用户游玩时间表，总表，一个游戏一条数据
    /// </summary>
    public virtual DbSet<T_User_PlayGameTime> T_User_PlayGameTime { get; set; }

    /// <summary>
    /// 兑换码使用表
    /// </summary>
    public virtual DbSet<T_User_RedemptionUsage> T_User_RedemptionUsage { get; set; }

    /// <summary>
    /// 用户搜索表
    /// </summary>
    public virtual DbSet<T_User_Search> T_User_Search { get; set; }

    /// <summary>
    /// 用户签到表
    /// </summary>
    public virtual DbSet<T_User_SignDays> T_User_SignDays { get; set; }

    /// <summary>
    /// 视频列表
    /// </summary>
    public virtual DbSet<T_Videos> T_Videos { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
     {  // => optionsBuilder.UseSqlServer("Server=192.168.195.8;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
      } 

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

            entity.ToTable(tb => tb.HasComment("用户头像框"));

            entity.Property(e => e.AvatarId)
                .HasMaxLength(50)
                .HasComment("头像框Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ImageId2).HasComment("头像框备注用图");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("头像框名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.NameColor)
                .HasMaxLength(7)
                .HasDefaultValue("222222")
                .HasComment("头像框名称色号")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

        modelBuilder.Entity<T_Epg_CategoryCfg>(entity =>
        {
            entity.ToTable(tb => tb.HasComment("Epg分组配置表"));

            entity.Property(e => e.Id).HasComment("epg分组Id");
            entity.Property(e => e.Channel)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("上线渠道,0不限制")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.DefaultImageStyle).HasComment("默认使用的资源图");
            entity.Property(e => e.EpgParentCategory).HasComment("epg父组Id, 0无");
            entity.Property(e => e.IdName)
                .HasMaxLength(50)
                .HasComment("代码标识")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ImageId).HasComment("图片-预留");
            entity.Property(e => e.ImageId2).HasComment("图片-预留");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.IsQuickStartPopUp).HasComment("快速启动弹窗");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("分组名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.OrderId).HasComment("排序-正序");
            entity.Property(e => e.Platform)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasComment("上线平台")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ShowNumIndex).HasComment("首页展示数量");
            entity.Property(e => e.ShowStatus)
                .HasDefaultValue(1)
                .HasComment("显示状态。0全部显示，1审核模式下不显示，2正常模式下不显示，审核显示");
            entity.Property(e => e.TenantId).HasComment("租户");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("Epg配置表"));

            entity.Property(e => e.Id).HasComment("标识");
            entity.Property(e => e.Channel)
                .HasMaxLength(50)
                .HasComment("渠道")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Continent)
                .HasMaxLength(200)
                .HasComment("州")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.CornerIconId).HasComment("角标");
            entity.Property(e => e.CountryName)
                .HasMaxLength(200)
                .HasComment("国家")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EndEnableTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EpgCategory).HasComment("epg分组");
            entity.Property(e => e.IdName)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("代码标识")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ImageId).HasComment("图片");
            entity.Property(e => e.ImageId2).HasComment("图片2-预留");
            entity.Property(e => e.ImageId3).HasComment("图片3");
            entity.Property(e => e.ImageResStyle).HasComment("使用原始资源图样式n_n");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.OrderId).HasComment("排序-正序");
            entity.Property(e => e.Platform)
                .HasMaxLength(50)
                .HasComment("平台，安卓还是ios")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ResId)
                .HasMaxLength(200)
                .HasComment("资源Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ResParams)
                .HasMaxLength(200)
                .HasComment("资源参数")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ResType).HasComment("资源类型");
            entity.Property(e => e.StartEnableTime)
                .HasComment("启用时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Title)
                .HasMaxLength(50)
                .HasComment("标题")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Title2)
                .HasMaxLength(200)
                .HasComment("标题2")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime)
                .HasComment("更新时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("悬浮球配置"));

            entity.Property(e => e.BossId)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("渠道号id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.HideAfterClick).HasComment("是否点击后隐藏");
            entity.Property(e => e.ImageId1).HasComment("状态-显示");
            entity.Property(e => e.ImageId2).HasComment("状态-隐藏");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasComment("名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Pos1).HasComment("坐标x");
            entity.Property(e => e.Pos2).HasComment("坐标y");
            entity.Property(e => e.ResId)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasComment("资源Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ResType).HasComment("资源类型");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("游戏配置"));

            entity.Property(e => e.ConsumeDiamondNumHour).HasComment("每小时钻石费用");
            entity.Property(e => e.ConsumeDiamondNumHourVip).HasComment("每小时VIP钻石费用");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(200)
                .HasComment("备注")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.FriendlyTips)
                .HasMaxLength(50)
                .HasComment("启动提示");
            entity.Property(e => e.GameBgImgId).HasComment("游戏详情背景");
            entity.Property(e => e.GameGroup).HasComment("游戏分组：0单机，1steam，2网游");
            entity.Property(e => e.GameId)
                .HasMaxLength(100)
                .HasComment("游戏Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.GameLoadBgImageId).HasComment("游戏加载图");
            entity.Property(e => e.GameLoadTime).HasComment("Loading时间");
            entity.Property(e => e.GameName)
                .HasMaxLength(50)
                .HasComment("游戏名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ImageIconId).HasComment("游戏详情logo");
            entity.Property(e => e.ImageId_Banner).HasComment("顶部图片");
            entity.Property(e => e.ImageId_FK).HasComment("（首页GTA系列）大方块");
            entity.Property(e => e.ImageId_RM).HasComment("首页爆款热门");
            entity.Property(e => e.ImageId_ShouSuo).HasComment("搜索icon");
            entity.Property(e => e.ImageId_TJ).HasComment("推荐大图（首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐）");
            entity.Property(e => e.ImageId_YXK).HasComment("游戏库Icon图");
            entity.Property(e => e.IsDiscount)
                .HasDefaultValue(true)
                .HasComment("是否参与优惠套餐活动（比如包夜卡，周中卡之类的）");
            entity.Property(e => e.IsLimitToVip).HasComment("VIP专属");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.IsTest).HasComment("是否测试游戏");
            entity.Property(e => e.OnlinePlatform)
                .HasMaxLength(50)
                .HasDefaultValue("")
                .HasComment("平台类型，为空全选")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.OrderId).HasComment("排序");
            entity.Property(e => e.Score)
                .HasMaxLength(30)
                .HasComment("评分")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Title2)
                .HasMaxLength(200)
                .HasComment("副标题")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.VipTypeLimit)
                .HasDefaultValue(1)
                .HasComment("会员等级限制");
            entity.Property(e => e.VipVisible).HasComment("仅会员可见");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

        modelBuilder.Entity<T_GameInputSetting>(entity =>
        {
            entity.HasKey(e => e.GameId).HasName("PK_T_GAMEINPUTSETTING");

            entity.ToTable(tb => tb.HasComment("游戏虚拟手柄，虚拟键盘设置"));

            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.IsGamePad).HasComment("是否有手柄");
            entity.Property(e => e.IsKeyboard).HasComment("是否有虚拟键盘");
            entity.Property(e => e.IsToggleKeyboard).HasComment("是否显示切换键盘按钮");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("游戏按键方案配置表"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("游戏id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.OrderId)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.PlanName)
                .HasMaxLength(100)
                .HasComment("方案名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.PlanType)
                .HasDefaultValue(1)
                .HasComment("方案类型1键盘 2手柄");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("按键表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.CreateDateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.GamePressKeyGroupBy).HasComment("按键分组，手柄还是键盘");
            entity.Property(e => e.GamePressKeyPlanId).HasComment("所属方案");
            entity.Property(e => e.PositionX)
                .HasComment("按键X坐标")
                .HasColumnType("decimal(5, 2)");
            entity.Property(e => e.PositionY)
                .HasComment("按键Y坐标")
                .HasColumnType("decimal(5, 2)");
            entity.Property(e => e.PressKey)
                .HasMaxLength(50)
                .HasComment("按键值")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.PressKeyHeight).HasComment("按键高度");
            entity.Property(e => e.PressKeyIdentification)
                .HasMaxLength(64)
                .HasComment("按键标识")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.PressKeyImageId).HasComment("按键图片");
            entity.Property(e => e.PressKeyIndex).HasComment("按键序号");
            entity.Property(e => e.PressKeyMagnification)
                .HasComment("按键放大倍数")
                .HasColumnType("decimal(5, 2)");
            entity.Property(e => e.PressKeyName)
                .HasMaxLength(50)
                .HasComment("按键名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.PressKeySelectImageId).HasComment("选中图片");
            entity.Property(e => e.PressKeyType).HasComment("按键类型，鼠标、键盘还是手柄的功能按键等");
            entity.Property(e => e.PressKeyWidth).HasComment("按键宽度");
            entity.Property(e => e.UpdateDateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("游戏按键方案"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.CreateDateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .HasComment("所属游戏编号")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.GamePressKeyDefault).HasComment("是否默认，");
            entity.Property(e => e.GamePressKeyGroupBy).HasComment("方案分组，键盘还是手柄");
            entity.Property(e => e.GamePressKeyPlanName)
                .HasMaxLength(50)
                .HasComment("按键方案名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.GamePressKeyRemark)
                .HasMaxLength(200)
                .HasComment("方案备注")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Identification)
                .HasMaxLength(64)
                .HasComment("标识")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.IsEnable).HasComment("是否启用");
            entity.Property(e => e.UpdateDateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("游戏展示"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.DataId).HasComment("图片或者视频的Id");
            entity.Property(e => e.Desc)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.GameId)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Type).HasComment("1图片，2视频 展示类型");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

        modelBuilder.Entity<T_Game_DiscountCfg>(entity =>
        {
            entity.HasKey(e => e.GameId).HasName("PK_T_GME_DISCOUNTCFG");

            entity.ToTable(tb => tb.HasComment("游戏减价配置表"));

            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasComment("游戏Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ChargeDesc)
                .HasMaxLength(100)
                .HasComment("折扣资费描述-自定义")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.DiscountDiamondNum).HasComment("折扣钻石价格");
            entity.Property(e => e.DiscountDiamondNumHour).HasComment("折扣每小时钻石费用");
            entity.Property(e => e.DiscountDiamondNumHourVip).HasComment("每小时折扣VIP钻石费用");
            entity.Property(e => e.DiscountMoguNum).HasComment("折扣蘑菇币价格");
            entity.Property(e => e.DiscountMoguNumHour).HasComment("折扣每小时蘑菇币费用");
            entity.Property(e => e.DiscountMoguNumHourVip).HasComment("每小时折扣VIP蘑菇币费用");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status).HasComment("状态-1禁用");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户玩游戏日志表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.Channel)
                .HasMaxLength(10)
                .HasComment("渠道号");
            entity.Property(e => e.Cpu)
                .HasMaxLength(50)
                .HasComment("用户cpu");
            entity.Property(e => e.CreateDateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.CurrencyLogId).HasComment("金额日志表id");
            entity.Property(e => e.DiamondListId).HasComment("资产记录日志表id");
            entity.Property(e => e.DisplayGrade).HasComment("显示等级");
            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .HasComment("游戏Id");
            entity.Property(e => e.GameName)
                .HasMaxLength(100)
                .HasComment("游戏名称");
            entity.Property(e => e.GameStatus).HasComment("用户游戏状态");
            entity.Property(e => e.GameUserOperationJson).HasComment("用户操作内容");
            entity.Property(e => e.JyGameId)
                .HasMaxLength(50)
                .HasComment("第三方游戏id");
            entity.Property(e => e.LastChargingAt)
                .HasComment("最后一次扣费时间")
                .HasColumnType("datetime");
            entity.Property(e => e.LastDateTime)
                .HasComment("最后一次修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ModelName)
                .HasMaxLength(100)
                .HasComment("设备型号");
            entity.Property(e => e.PlayGameHeartbeatAt)
                .HasComment("游戏心跳时间")
                .HasColumnType("datetime");
            entity.Property(e => e.PlayGameStartAt)
                .HasComment("开始游戏时间")
                .HasColumnType("datetime");
            entity.Property(e => e.PlayGameTotalSeconds).HasComment("本次游玩时间（秒）");
            entity.Property(e => e.PlayQueueId).HasComment("用户排队Id");
            entity.Property(e => e.PlayQueueStartAt)
                .HasComment("用户开始排队时间")
                .HasColumnType("datetime");
            entity.Property(e => e.PlayQueueSuccessAt)
                .HasComment("结束排队时间")
                .HasColumnType("datetime");
            entity.Property(e => e.QueueGrade).HasComment("队列等级");
            entity.Property(e => e.ScId).HasComment("鲸云scid");
            entity.Property(e => e.SessionId)
                .HasMaxLength(64)
                .HasComment("设备号");
            entity.Property(e => e.Sn)
                .HasMaxLength(100)
                .HasComment("用户设备号");
            entity.Property(e => e.SpendingDiamonds).HasComment("用户本次玩游戏共花销多少钻石");
            entity.Property(e => e.TenantId).HasComment("租户id");
            entity.Property(e => e.UserId).HasComment("用户Id");
            entity.Property(e => e.UserPlayGameDiamonds).HasComment("用户剩余钻石");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("虚拟键盘配置表"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.GameId)
                .HasMaxLength(50)
                .HasComment("游戏Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.GameIdentification)
                .HasMaxLength(100)
                .HasComment("游戏按键标识")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.IsKeyDrag).HasComment("是否可以拖动");
            entity.Property(e => e.IsOnline).HasComment("是否有这个键值\r\n   没有这个选项表示用基本的\r\n   如果有这个选项并且是ture 就用这个键值\r\n   如果有这个选项并且是false就表示没有这个键值");
            entity.Property(e => e.IsPressLock).HasComment("是否按下锁定");
            entity.Property(e => e.KeyIndex)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.KeyType).HasComment("按键类型0键盘1手柄");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasComment("键的名字")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UIId).HasComment("键值位置，大小");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("方案按键配置表"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.H).HasComment("h坐标或者高度");
            entity.Property(e => e.ImageId).HasComment("默认图片id");
            entity.Property(e => e.KeyIndex)
                .HasMaxLength(100)
                .HasComment("键盘对应的ascii码")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.KeyName)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.PlanId).HasComment("方案id");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.SelectImageId).HasComment("选中图片id");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            entity.Property(e => e.W).HasComment("w坐标或者宽度");
            entity.Property(e => e.X).HasComment("x坐标");
            entity.Property(e => e.Y).HasComment("y坐标");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("通用弹框配置"));

            entity.Property(e => e.BgImageId).HasComment("弹框背景图");
            entity.Property(e => e.Btn_Close).HasComment("关闭按钮");
            entity.Property(e => e.Btn_OK).HasComment("确认按钮");
            entity.Property(e => e.Channel)
                .HasMaxLength(50)
                .HasComment("上线渠道号")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(100)
                .HasComment("备注")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.IsOnline).HasComment("是否启用");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasComment("弹框名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.OrderId).HasComment("排序");
            entity.Property(e => e.PlatformId)
                .HasMaxLength(20)
                .HasComment("上线平台")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Text)
                .HasComment("弹窗显示文字")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Type).HasComment("弹框类型");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("弹窗按钮"));

            entity.Property(e => e.Action)
                .HasMaxLength(100)
                .HasComment("动作");
            entity.Property(e => e.DelaySecond).HasComment("延迟几秒显示按钮");
            entity.Property(e => e.Height).HasComment("高度");
            entity.Property(e => e.Image).HasComment("背景图片");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("按钮名称");
            entity.Property(e => e.Text)
                .HasMaxLength(100)
                .HasComment("文本");
            entity.Property(e => e.Widht).HasComment("宽度");
            entity.Property(e => e.X).HasComment("X坐标");
            entity.Property(e => e.Y).HasComment("Y坐标");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("商城表"));

            entity.Property(e => e.Id).HasComment("道具Id");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.FirstChargeImageId).HasComment("首充图片");
            entity.Property(e => e.FirstChargePrice)
                .HasComment("首充价格")
                .HasColumnType("decimal(10, 2)");
            entity.Property(e => e.ImageId).HasComment("道具图片配置 图片id");
            entity.Property(e => e.IsEnable).HasComment("是否启用");
            entity.Property(e => e.IsFirstCharge).HasComment("是否有首充");
            entity.Property(e => e.OrderById).HasComment("排序");
            entity.Property(e => e.Price)
                .HasComment("价格")
                .HasColumnType("decimal(10, 2)");
            entity.Property(e => e.ProductDesc)
                .HasMaxLength(255)
                .HasComment("道具描述")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ProductId)
                .HasMaxLength(50)
                .HasComment("道具Id")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ProductName)
                .HasMaxLength(100)
                .HasComment("道具名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ProductType).HasComment("道具类型，0我的商城");
            entity.Property(e => e.SelectFirstChargeImageId).HasComment("选中首充图片");
            entity.Property(e => e.SelectImageId).HasComment("选中图片");
            entity.Property(e => e.TenantId).HasComment("租户ID");
            entity.Property(e => e.UpdateTime)
                .HasComment("更新时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("产品表奖励"));

            entity.Property(e => e.CurrencyType).HasComment("奖励类型");
            entity.Property(e => e.FirstChargeMoney).HasComment("首充送多少奖励");
            entity.Property(e => e.Money).HasComment("奖励");
            entity.Property(e => e.ProductId)
                .HasMaxLength(50)
                .HasComment("所属商品")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.T_ProductId).HasComment("所属商品");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("兑换码表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.Code)
                .HasMaxLength(64)
                .HasComment("兑换码（唯一）");
            entity.Property(e => e.CreatedDate)
                .HasComment("兑换码生成时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ExpirationDate)
                .HasComment("兑换码有效期截止时间")
                .HasColumnType("datetime");
            entity.Property(e => e.IsActive).HasComment("是否启用（1为启用，0为禁用）");
            entity.Property(e => e.Remarks)
                .HasMaxLength(255)
                .HasComment("备注信息（可选");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Type).HasComment("兑换码类型（如优惠券、礼品卡等）");
            entity.Property(e => e.UsageLimit).HasComment("最大使用次数，0表示无限次使用");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("通用奖励配置表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.AwardNum).HasComment("奖励数量");
            entity.Property(e => e.CurrencyType).HasComment("奖励类型");
            entity.Property(e => e.ParentNodeId).HasComment("对应主键的id");
            entity.Property(e => e.ParentNodeType).HasComment("奖励类型，1兑换码奖励");
            entity.Property(e => e.TenantId).HasComment("租户");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("搜索页面展示的搜索词"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.OrderId).HasComment("排序");
            entity.Property(e => e.Search)
                .HasMaxLength(255)
                .HasComment("搜索词");
            entity.Property(e => e.TenantId).HasComment("租户");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("七日签到配置表"));

            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ImageId).HasComment("签到图片");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasComment("名称")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.OrderId)
                .HasDefaultValue(1)
                .HasComment("排序");
            entity.Property(e => e.Remark)
                .HasMaxLength(200)
                .HasComment("备注")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("七日签到奖励配置表"));

            entity.Property(e => e.AwardNum).HasComment("奖励数量");
            entity.Property(e => e.CurrencyType).HasComment("奖励类型");
            entity.Property(e => e.SigninId).HasComment("七天签到id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("系统消息表"));

            entity.Property(e => e.Content).HasComment("消息内容");
            entity.Property(e => e.CreatedAt)
                .HasComment("消息创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Title)
                .HasMaxLength(50)
                .HasComment("标题");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("位置大小类型列表"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("UI集合"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.ImageId).HasComment("未选中图片id");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Scale)
                .HasDefaultValue(1.0)
                .HasComment("放大倍数");
            entity.Property(e => e.SelectedImage).HasComment("选中图片id");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户反馈表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.ContactUs)
                .HasMaxLength(100)
                .HasComment("联系方式");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Text).HasComment("内容");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.UserId).HasComment("用户");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户游玩记录表。玩一次游戏记录一条数据"));

            entity.Property(e => e.Channel)
                .HasMaxLength(10)
                .HasComment("渠道号");
            entity.Property(e => e.CreateTime)
                .HasComment("创建时间，游戏开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.GameId)
                .HasMaxLength(20)
                .HasComment("游戏Id");
            entity.Property(e => e.PlaySeconds).HasComment("游玩时间，秒");
            entity.Property(e => e.PlayTime).HasComment("游玩时间，分组数");
            entity.Property(e => e.SessionId)
                .HasMaxLength(64)
                .HasComment("游戏会话id");
            entity.Property(e => e.Status).HasComment("状态");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间，游戏结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.UserId).HasComment("用户Id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户消息表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.Content).HasComment("消息内容");
            entity.Property(e => e.CreateAt)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.IsRead).HasComment("是否已读");
            entity.Property(e => e.MessageType)
                .HasMaxLength(10)
                .HasComment("消息类型");
            entity.Property(e => e.ReadAt)
                .HasComment("已读时间")
                .HasColumnType("datetime");
            entity.Property(e => e.SendAt)
                .HasComment("消息发送时间")
                .HasColumnType("datetime");
            entity.Property(e => e.SystemId).HasComment("系统消息Id");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.Title)
                .HasMaxLength(100)
                .HasComment("消息标题");
            entity.Property(e => e.UserId).HasComment("对应用户的Id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户游玩时间表，总表，一个游戏一条数据"));

            entity.HasIndex(e => new { e.UserId, e.GameId }, "T_UserId_GameId");

            entity.Property(e => e.Createtime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.DiamondPlayTime).HasComment("钻石游玩时间");
            entity.Property(e => e.FreePlayTime).HasComment("免费时间");
            entity.Property(e => e.GameId)
                .HasMaxLength(100)
                .HasComment("游戏Id");
            entity.Property(e => e.NightCardPlayTime).HasComment("包夜卡游玩时间");
            entity.Property(e => e.PlayTime).HasComment("游玩总时间");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UpdateTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.UserId).HasComment("用户id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("兑换码使用表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.Code)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasComment("兑换码");
            entity.Property(e => e.OrderId)
                .HasMaxLength(64)
                .HasComment("使用兑换码关联的订单ID（可选）");
            entity.Property(e => e.RedemptionCodeId).HasComment("兑换码主键表");
            entity.Property(e => e.Remarks)
                .HasMaxLength(255)
                .HasComment("备注");
            entity.Property(e => e.Status).HasComment("使用状态（如成功、失败、已过期等)");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UsedDate)
                .HasComment("兑换码使用时间")
                .HasColumnType("datetime");
            entity.Property(e => e.UserId).HasComment("用户Id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户搜索表"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.SearchContent)
                .HasMaxLength(255)
                .HasComment("搜索内容");
            entity.Property(e => e.SearchDate)
                .HasComment("搜索时间")
                .HasColumnType("datetime");
            entity.Property(e => e.SearchDay).HasComment("搜索时间，天");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UserId).HasComment("用户Id");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("用户签到表"));

            entity.HasIndex(e => e.UserId, "UserId");

            entity.Property(e => e.CreatTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(50)
                .HasComment("备注")
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.SignDayNum).HasComment("累计签到天数，连续7天，从新开始");
            entity.Property(e => e.SignDayTime)
                .HasComment("签到时间")
                .HasColumnType("datetime");
            entity.Property(e => e.TenantId).HasComment("租户");
            entity.Property(e => e.UpdateTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.UserId).HasComment("用户Id\r\n   ");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

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

            entity.ToTable(tb => tb.HasComment("视频列表"));

            entity.Property(e => e.CreateTime).HasColumnType("datetime");
            entity.Property(e => e.Desc)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .UseCollation("Chinese_PRC_CI_AS");
            entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            entity.Property(e => e.Url)
                .HasMaxLength(200)
                .UseCollation("Chinese_PRC_CI_AS");
            //添加全局筛选器
            if (this.TenantInfo != null)
            {
                entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
            }
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
