From b819883786267c0e4e4a1de6ad17f86e23eda88f Mon Sep 17 00:00:00 2001 From: zpc Date: Thu, 18 Jul 2024 20:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DbSqlServer/Db_MiaoYu/MiaoYuContext.cs | 17 +++++++++++++++-- .../DbSqlServer/Db_MiaoYu/T_Character.cs | 4 ++-- .../DbSqlServer/Db_MiaoYu/T_Image_Config.cs | 13 ++++++++++++- .../DbSqlServer/Db_MiaoYu/T_User_Chat.cs | 5 +++++ 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs index d8a537d..c371295 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs @@ -128,7 +128,7 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext .HasComment("创建时间") .HasColumnType("datetime"); entity.Property(e => e.Gender).HasComment("性别0男1女2其他"); - entity.Property(e => e.IconImg).HasComment("角色头像"); + entity.Property(e => e.IconImg).HasComment("角色头像(是id)"); entity.Property(e => e.ModelConfigId).HasComment("模型Id"); entity.Property(e => e.Name) .HasMaxLength(50) @@ -322,13 +322,23 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext { entity.HasKey(e => e.Id).HasName("PK__T_Image___3214EC072BCFE4E5"); - entity.ToTable(tb => tb.HasComment("图片表")); + entity.ToTable(tb => + { + tb.HasComment("图片表"); + tb.HasTrigger("trg_UpdateImageId"); + }); + entity.Property(e => e.CreateAt) + .HasComment("创建时间") + .HasColumnType("datetime"); entity.Property(e => e.ImageId).HasComment("图片Id"); entity.Property(e => e.Name) .HasMaxLength(50) .HasComment("图片名称"); entity.Property(e => e.TenantId).HasComment("租户"); + entity.Property(e => e.UpdateAt) + .HasComment("修改时间") + .HasColumnType("datetime"); entity.Property(e => e.Url) .HasMaxLength(500) .HasComment("图片地址"); @@ -425,6 +435,9 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext .HasComment("创建时间") .HasColumnType("datetime"); entity.Property(e => e.IsDelete).HasComment("是否删除"); + entity.Property(e => e.LastMessage) + .HasMaxLength(1000) + .HasComment("最后一条消息"); entity.Property(e => e.ModelConfigId).HasComment("使用模型Id"); entity.Property(e => e.SessionId).HasComment("会话Id"); entity.Property(e => e.SessionName) diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs index 1adee90..eea1696 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu; @@ -64,7 +64,7 @@ public partial class T_Character: MultiTenantEntity public int? BgImg { get; set; } /// - /// 角色头像 + /// 角色头像(是id) /// public int? IconImg { get; set; } } diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs index a593bd1..a1c06a0 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs @@ -1,4 +1,5 @@ - +using System; + namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu; /// @@ -23,4 +24,14 @@ public partial class T_Image_Config: MultiTenantEntity /// 图片地址 /// public string Url { get; set; } = null!; + + /// + /// 创建时间 + /// + public DateTime CreateAt { get; set; } + + /// + /// 修改时间 + /// + public DateTime UpdateAt { get; set; } } diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs index cfbbfa5..a52d312 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs @@ -46,4 +46,9 @@ public partial class T_User_Chat: MultiTenantEntity /// 是否删除 /// public bool IsDelete { get; set; } + + /// + /// 最后一条消息 + /// + public string? LastMessage { get; set; } }