48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
namespace Admin.NET.Core.Ai.Entitys;
|
|
|
|
/// <summary>
|
|
/// 聊天历史
|
|
/// </summary>
|
|
[SugarTable("LLMChatHistory")]
|
|
[IncreTable]
|
|
[SugarIndex("index_UserId_{table}", nameof(UserId), OrderByType.Asc)]
|
|
[SugarIndex("index_SummaryId_{table}", nameof(SummaryId), OrderByType.Asc)]
|
|
public class LLMChatHistory : EntityBaseId
|
|
{
|
|
/// <summary>
|
|
/// 摘要ID
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "摘要ID")]
|
|
public long SummaryId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 摘要
|
|
/// </summary>
|
|
[Navigate(NavigateType.OneToOne, nameof(SummaryId))]
|
|
public LLMChatSummaryHistory? Summary { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户ID
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "用户ID")]
|
|
public long UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 角色
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "角色", Length = 20)]
|
|
public string Role { get; set; }
|
|
|
|
/// <summary>
|
|
/// 内容
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "内容", ColumnDataType = "longtext")]
|
|
public string? Content { get; set; }
|
|
|
|
/// <summary>
|
|
/// 创建时间
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "创建时间")]
|
|
public long UtcCreateTime { get; set; } = DateTime.UtcNow.ToLong();
|
|
}
|