修改数据库
This commit is contained in:
parent
2e9d387be6
commit
0ece57fd6a
|
|
@ -9,7 +9,7 @@
|
||||||
"Kestrel": {
|
"Kestrel": {
|
||||||
"Endpoints": {
|
"Endpoints": {
|
||||||
"Http": {
|
"Http": {
|
||||||
"Url": "http://*:8080"
|
"Url": "http://*:801"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,13 @@ using CloudGaming.Model.DbSqlServer.Db_User;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
//Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
|
//Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
|
||||||
var optionsBuilder = new DbContextOptionsBuilder<CloudGamingPhoneContext>();
|
var optionsBuilder = new DbContextOptionsBuilder<CloudGamingPhoneContext>();
|
||||||
var option = optionsBuilder.UseSqlServer("Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
|
var option = optionsBuilder.UseSqlServer("Server=192.168.195.6;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
|
||||||
CloudGamingPhoneContext cloudGamingPhoneContext = new CloudGamingPhoneContext(option);
|
CloudGamingPhoneContext cloudGamingPhoneContext = new CloudGamingPhoneContext(option);
|
||||||
cloudGamingPhoneContext.Database.EnsureCreated();
|
//cloudGamingPhoneContext.Database.EnsureCreated();
|
||||||
var x = cloudGamingPhoneContext.T_Epg_Cfg.Count();
|
var x = cloudGamingPhoneContext.T_Epg_Cfg.Count();
|
||||||
|
var ccc = cloudGamingPhoneContext.T_Epg_Cfg.ToList();
|
||||||
|
Console.WriteLine("查询" + x.ToString());
|
||||||
|
Console.ReadKey();
|
||||||
//Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
|
//Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;
|
||||||
//var optionsBuilder1 = new DbContextOptionsBuilder<CloudGamingUserContext>();
|
//var optionsBuilder1 = new DbContextOptionsBuilder<CloudGamingUserContext>();
|
||||||
//var option1 = optionsBuilder1.UseSqlServer("Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
|
//var option1 = optionsBuilder1.UseSqlServer("Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;").Options;
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,8 @@ public partial class <#= Options.ContextName #> : DbContext
|
||||||
var useProviderCall = providerCode.GenerateUseProvider(Options.ConnectionString);
|
var useProviderCall = providerCode.GenerateUseProvider(Options.ConnectionString);
|
||||||
usings.AddRange(useProviderCall.GetRequiredUsings());
|
usings.AddRange(useProviderCall.GetRequiredUsings());
|
||||||
#>
|
#>
|
||||||
=> optionsBuilder<#= code.Fragment(useProviderCall, indent: 3) #>;
|
{// => optionsBuilder<#= code.Fragment(useProviderCall, indent: 3) #>;
|
||||||
|
}
|
||||||
<#
|
<#
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,8 @@ public partial class CloudGamingGameContext : DbContext
|
||||||
public virtual DbSet<T_Game_UserShare> T_Game_UserShare { get; set; }
|
public virtual DbSet<T_Game_UserShare> T_Game_UserShare { get; set; }
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
=> optionsBuilder.UseSqlServer("Server=192.168.1.17;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
{// => optionsBuilder.UseSqlServer("Server=192.168.195.6;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
||||||
|
}
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
modelBuilder.Entity<T_Game_ChildList>(entity =>
|
modelBuilder.Entity<T_Game_ChildList>(entity =>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace CloudGaming.GameModel.Db.Db_Game;
|
namespace CloudGaming.GameModel.Db.Db_Game;
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ public partial class T_Game_List
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 游戏难度
|
/// 游戏难度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string GameDifficulty { get; set; } = null!;
|
public virtual string? GameDifficulty { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 游戏发行方
|
/// 游戏发行方
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@
|
||||||
##在API项目里面执行,使用连接字符串名称,生成代码到model项目
|
##在API项目里面执行,使用连接字符串名称,生成代码到model项目
|
||||||
```sh
|
```sh
|
||||||
--game
|
--game
|
||||||
|
内网
|
||||||
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Game/ --use-database-names --no-pluralize --force
|
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Game/ --use-database-names --no-pluralize --force
|
||||||
|
内网穿透
|
||||||
|
dotnet ef dbcontext scaffold "Server=192.168.195.6;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Game/ --use-database-names --no-pluralize --force
|
||||||
--Ext
|
--Ext
|
||||||
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Ext/ --use-database-names --no-pluralize --force
|
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Ext/ --use-database-names --no-pluralize --force
|
||||||
|
内网穿透
|
||||||
|
dotnet ef dbcontext scaffold "Server=192.168.195.6;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o Db/Db_Game/ --use-database-names --no-pluralize --force
|
||||||
```
|
```
|
||||||
|
|
@ -113,7 +113,8 @@ public partial class <#= Options.ContextName #> : MultiTenantDbContext//DbContex
|
||||||
var useProviderCall = providerCode.GenerateUseProvider(Options.ConnectionString);
|
var useProviderCall = providerCode.GenerateUseProvider(Options.ConnectionString);
|
||||||
usings.AddRange(useProviderCall.GetRequiredUsings());
|
usings.AddRange(useProviderCall.GetRequiredUsings());
|
||||||
#>
|
#>
|
||||||
=> optionsBuilder<#= code.Fragment(useProviderCall, indent: 3) #>;
|
{ // => optionsBuilder<#= code.Fragment(useProviderCall, indent: 3) #>;
|
||||||
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
||||||
|
|
@ -144,7 +145,9 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
public virtual DbSet<T_Videos> T_Videos { get; set; }
|
public virtual DbSet<T_Videos> T_Videos { get; set; }
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
=> optionsBuilder.UseSqlServer("Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
// => optionsBuilder.UseSqlServer("Server=192.168.195.6;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
|
@ -190,6 +193,7 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
.IsUnicode(false)
|
.IsUnicode(false)
|
||||||
.HasComment("上线渠道,0不限制")
|
.HasComment("上线渠道,0不限制")
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
.UseCollation("Chinese_PRC_CI_AS");
|
||||||
|
entity.Property(e => e.DefaultImageStyle).HasComment("默认使用的资源图");
|
||||||
entity.Property(e => e.EpgParentCategory).HasComment("epg父组Id, 0无");
|
entity.Property(e => e.EpgParentCategory).HasComment("epg父组Id, 0无");
|
||||||
entity.Property(e => e.IdName)
|
entity.Property(e => e.IdName)
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
|
|
@ -213,6 +217,7 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
entity.Property(e => e.ShowStatus)
|
entity.Property(e => e.ShowStatus)
|
||||||
.HasDefaultValue(1)
|
.HasDefaultValue(1)
|
||||||
.HasComment("显示状态。0全部显示,1审核模式下不显示,2正常模式下不显示,审核显示");
|
.HasComment("显示状态。0全部显示,1审核模式下不显示,2正常模式下不显示,审核显示");
|
||||||
|
entity.Property(e => e.TenantId).HasComment("租户");
|
||||||
//添加全局筛选器
|
//添加全局筛选器
|
||||||
if (this.TenantInfo != null)
|
if (this.TenantInfo != null)
|
||||||
{
|
{
|
||||||
|
|
@ -229,7 +234,6 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
entity.Property(e => e.Id).HasComment("标识");
|
entity.Property(e => e.Id).HasComment("标识");
|
||||||
entity.Property(e => e.Channel)
|
entity.Property(e => e.Channel)
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.IsUnicode(false)
|
|
||||||
.HasComment("渠道")
|
.HasComment("渠道")
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
.UseCollation("Chinese_PRC_CI_AS");
|
||||||
entity.Property(e => e.Continent)
|
entity.Property(e => e.Continent)
|
||||||
|
|
@ -256,15 +260,11 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
entity.Property(e => e.ImageId).HasComment("图片");
|
entity.Property(e => e.ImageId).HasComment("图片");
|
||||||
entity.Property(e => e.ImageId2).HasComment("图片2-预留");
|
entity.Property(e => e.ImageId2).HasComment("图片2-预留");
|
||||||
entity.Property(e => e.ImageId3).HasComment("图片3");
|
entity.Property(e => e.ImageId3).HasComment("图片3");
|
||||||
entity.Property(e => e.ImageResStyle)
|
entity.Property(e => e.ImageResStyle).HasComment("使用原始资源图样式n_n");
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasComment("使用原始资源图样式n_n")
|
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
|
||||||
entity.Property(e => e.IsOnline).HasComment("是否启用");
|
entity.Property(e => e.IsOnline).HasComment("是否启用");
|
||||||
entity.Property(e => e.OrderId).HasComment("排序-正序");
|
entity.Property(e => e.OrderId).HasComment("排序-正序");
|
||||||
entity.Property(e => e.Platform)
|
entity.Property(e => e.Platform)
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.IsUnicode(false)
|
|
||||||
.HasComment("平台,安卓还是ios")
|
.HasComment("平台,安卓还是ios")
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
.UseCollation("Chinese_PRC_CI_AS");
|
||||||
entity.Property(e => e.ResId)
|
entity.Property(e => e.ResId)
|
||||||
|
|
@ -358,19 +358,19 @@ public partial class CloudGamingPhoneContext : MultiTenantDbContext//DbContext
|
||||||
.HasMaxLength(100)
|
.HasMaxLength(100)
|
||||||
.HasComment("游戏Id")
|
.HasComment("游戏Id")
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
.UseCollation("Chinese_PRC_CI_AS");
|
||||||
entity.Property(e => e.GameImageId).HasComment("游戏库Icon图");
|
|
||||||
entity.Property(e => e.GameLoadBgImageId).HasComment("游戏加载图");
|
entity.Property(e => e.GameLoadBgImageId).HasComment("游戏加载图");
|
||||||
entity.Property(e => e.GameLoadTime).HasComment("Loading时间");
|
entity.Property(e => e.GameLoadTime).HasComment("Loading时间");
|
||||||
entity.Property(e => e.GameName)
|
entity.Property(e => e.GameName)
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasComment("游戏名称")
|
.HasComment("游戏名称")
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
.UseCollation("Chinese_PRC_CI_AS");
|
||||||
entity.Property(e => e.ImageIconId).HasComment("游戏icon");
|
entity.Property(e => e.ImageIconId).HasComment("游戏详情logo");
|
||||||
entity.Property(e => e.ImageId_Banner).HasComment("顶部图片");
|
entity.Property(e => e.ImageId_Banner).HasComment("顶部图片");
|
||||||
entity.Property(e => e.ImageId_JXTJ).HasComment("精选推荐");
|
entity.Property(e => e.ImageId_FK).HasComment("(首页GTA系列)大方块");
|
||||||
entity.Property(e => e.ImageId_TJ).HasComment("推荐大图");
|
entity.Property(e => e.ImageId_RM).HasComment("首页爆款热门");
|
||||||
entity.Property(e => e.ImageId_ZJTC).HasComment("最近推出");
|
entity.Property(e => e.ImageId_ShouSuo).HasComment("搜索icon");
|
||||||
entity.Property(e => e.ImageId_ZXTJ).HasComment("尊享推荐");
|
entity.Property(e => e.ImageId_TJ).HasComment("推荐大图(首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐)");
|
||||||
|
entity.Property(e => e.ImageId_YXK).HasComment("游戏库Icon图");
|
||||||
entity.Property(e => e.IsDiscount)
|
entity.Property(e => e.IsDiscount)
|
||||||
.HasDefaultValue(true)
|
.HasDefaultValue(true)
|
||||||
.HasComment("是否参与优惠套餐活动(比如包夜卡,周中卡之类的)");
|
.HasComment("是否参与优惠套餐活动(比如包夜卡,周中卡之类的)");
|
||||||
|
|
|
||||||
|
|
@ -78,4 +78,9 @@ public partial class T_Epg_CategoryCfg: MultiTenantEntity
|
||||||
/// 所属租户
|
/// 所属租户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override Guid TenantId { get; set; }
|
public override Guid TenantId { get; set; }
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认使用的资源图
|
||||||
|
/// </summary>
|
||||||
|
public virtual int DefaultImageStyle { get; set; }
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Epg配置表
|
/// Epg配置表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class T_Epg_Cfg : MultiTenantEntity
|
public partial class T_Epg_Cfg: MultiTenantEntity
|
||||||
{
|
{
|
||||||
public T_Epg_Cfg() { }
|
public T_Epg_Cfg() { }
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@ public partial class T_Epg_Cfg : MultiTenantEntity
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用原始资源图样式n_n
|
/// 使用原始资源图样式n_n
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string? ImageResStyle { get; set; }
|
public virtual int ImageResStyle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否启用
|
/// 是否启用
|
||||||
|
|
@ -124,8 +124,8 @@ public partial class T_Epg_Cfg : MultiTenantEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual DateTime? CreateTime { get; set; }
|
public virtual DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属租户
|
/// 所属租户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override Guid TenantId { get; set; }
|
public override Guid TenantId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 游戏配置
|
/// 游戏配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class T_GameCBT : MultiTenantEntity
|
public partial class T_GameCBT: MultiTenantEntity
|
||||||
{
|
{
|
||||||
public T_GameCBT() { }
|
public T_GameCBT() { }
|
||||||
|
|
||||||
|
|
@ -21,11 +21,6 @@ public partial class T_GameCBT : MultiTenantEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int GameBgImgId { get; set; }
|
public virtual int GameBgImgId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 游戏库Icon图
|
|
||||||
/// </summary>
|
|
||||||
public virtual int GameImageId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否启用
|
/// 是否启用
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -62,7 +57,7 @@ public partial class T_GameCBT : MultiTenantEntity
|
||||||
public virtual int GameLoadBgImageId { get; set; }
|
public virtual int GameLoadBgImageId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 游戏icon
|
/// 游戏详情logo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int ImageIconId { get; set; }
|
public virtual int ImageIconId { get; set; }
|
||||||
|
|
||||||
|
|
@ -82,17 +77,7 @@ public partial class T_GameCBT : MultiTenantEntity
|
||||||
public virtual int GameLoadTime { get; set; }
|
public virtual int GameLoadTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 尊享推荐
|
/// 推荐大图(首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐)
|
||||||
/// </summary>
|
|
||||||
public virtual int ImageId_ZXTJ { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 精选推荐
|
|
||||||
/// </summary>
|
|
||||||
public virtual int ImageId_JXTJ { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 推荐大图
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int ImageId_TJ { get; set; }
|
public virtual int ImageId_TJ { get; set; }
|
||||||
|
|
||||||
|
|
@ -106,11 +91,6 @@ public partial class T_GameCBT : MultiTenantEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string? GameName { get; set; }
|
public virtual string? GameName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 最近推出
|
|
||||||
/// </summary>
|
|
||||||
public virtual int ImageId_ZJTC { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 顶部图片
|
/// 顶部图片
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -156,8 +136,28 @@ public partial class T_GameCBT : MultiTenantEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string? FriendlyTips { get; set; }
|
public virtual string? FriendlyTips { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属租户
|
/// 所属租户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override Guid TenantId { get; set; }
|
public override Guid TenantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏库Icon图
|
||||||
|
/// </summary>
|
||||||
|
public virtual int ImageId_YXK { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搜索icon
|
||||||
|
/// </summary>
|
||||||
|
public virtual int ImageId_ShouSuo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 首页爆款热门
|
||||||
|
/// </summary>
|
||||||
|
public virtual int ImageId_RM { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// (首页GTA系列)大方块
|
||||||
|
/// </summary>
|
||||||
|
public virtual int ImageId_FK { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@ public partial class CloudGamingUserContext : MultiTenantDbContext//DbContext
|
||||||
public virtual DbSet<T_User_Token> T_User_Token { get; set; }
|
public virtual DbSet<T_User_Token> T_User_Token { get; set; }
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
=> optionsBuilder.UseSqlServer("Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
{ // => optionsBuilder.UseSqlServer("Server=192.168.195.6;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;");
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
|
@ -413,9 +414,6 @@ public partial class CloudGamingUserContext : MultiTenantDbContext//DbContext
|
||||||
.HasComment("修改时间")
|
.HasComment("修改时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
entity.Property(e => e.IsLogout).HasComment("是否注销");
|
entity.Property(e => e.IsLogout).HasComment("是否注销");
|
||||||
entity.Property(e => e.LastLoginAt)
|
|
||||||
.HasComment("最后一次登录时间")
|
|
||||||
.HasColumnType("datetime");
|
|
||||||
entity.Property(e => e.NikeName)
|
entity.Property(e => e.NikeName)
|
||||||
.HasMaxLength(100)
|
.HasMaxLength(100)
|
||||||
.HasComment("用户昵称")
|
.HasComment("用户昵称")
|
||||||
|
|
@ -430,11 +428,6 @@ public partial class CloudGamingUserContext : MultiTenantDbContext//DbContext
|
||||||
.HasComment("创建时间")
|
.HasComment("创建时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
entity.Property(e => e.UserId).HasComment("用户Id");
|
entity.Property(e => e.UserId).HasComment("用户Id");
|
||||||
entity.Property(e => e.VerificationCode)
|
|
||||||
.HasMaxLength(10)
|
|
||||||
.IsUnicode(false)
|
|
||||||
.HasComment("验证码")
|
|
||||||
.UseCollation("Chinese_PRC_CI_AS");
|
|
||||||
//添加全局筛选器
|
//添加全局筛选器
|
||||||
if (this.TenantInfo != null)
|
if (this.TenantInfo != null)
|
||||||
{
|
{
|
||||||
|
|
@ -451,11 +444,20 @@ public partial class CloudGamingUserContext : MultiTenantDbContext//DbContext
|
||||||
entity.Property(e => e.CreateAt)
|
entity.Property(e => e.CreateAt)
|
||||||
.HasComment("创建时间")
|
.HasComment("创建时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
|
entity.Property(e => e.DeviceNumber)
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasComment("设备号");
|
||||||
entity.Property(e => e.ExpiresAt)
|
entity.Property(e => e.ExpiresAt)
|
||||||
.HasComment("过期时间")
|
.HasComment("过期时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
|
entity.Property(e => e.LastLoginAt)
|
||||||
|
.HasComment("最后一次登录时间")
|
||||||
|
.HasColumnType("datetime");
|
||||||
entity.Property(e => e.TenantId).HasComment("租户");
|
entity.Property(e => e.TenantId).HasComment("租户");
|
||||||
entity.Property(e => e.Token).HasComment("登录token");
|
entity.Property(e => e.Token).HasComment("登录token");
|
||||||
|
entity.Property(e => e.TokenMd5)
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasComment("tokenMd5值");
|
||||||
entity.Property(e => e.UpdateAt)
|
entity.Property(e => e.UpdateAt)
|
||||||
.HasComment("修改时间")
|
.HasComment("修改时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
|
|
|
||||||
|
|
@ -29,16 +29,6 @@ public partial class T_User_Phone_Account: MultiTenantEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string PhoneNum { get; set; } = null!;
|
public virtual string PhoneNum { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 验证码
|
|
||||||
/// </summary>
|
|
||||||
public virtual string VerificationCode { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 最后一次登录时间
|
|
||||||
/// </summary>
|
|
||||||
public virtual DateTime LastLoginAt { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改时间
|
/// 修改时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -40,4 +40,19 @@ public partial class T_User_Token: MultiTenantEntity
|
||||||
/// 修改时间
|
/// 修改时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual DateTime? UpdateAt { get; set; }
|
public virtual DateTime? UpdateAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备号
|
||||||
|
/// </summary>
|
||||||
|
public virtual string? DeviceNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tokenMd5值
|
||||||
|
/// </summary>
|
||||||
|
public virtual string? TokenMd5 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后一次登录时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime LastLoginAt { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@
|
||||||
```sh
|
```sh
|
||||||
--user
|
--user
|
||||||
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_User/ --use-database-names --no-pluralize --force
|
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_User/ --use-database-names --no-pluralize --force
|
||||||
|
dotnet ef dbcontext scaffold "Server=192.168.195.6;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_User/ --use-database-names --no-pluralize --force
|
||||||
|
|
||||||
--CloudGamingPhone
|
--CloudGamingPhone
|
||||||
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_Phone/ --use-database-names --no-pluralize --force
|
dotnet ef dbcontext scaffold "Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_Phone/ --use-database-names --no-pluralize --force
|
||||||
|
dotnet ef dbcontext scaffold "Server=192.168.195.6;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -o DbSqlServer/Db_Phone/ --use-database-names --no-pluralize --force
|
||||||
|
|
||||||
```
|
```
|
||||||
Loading…
Reference in New Issue
Block a user