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