Files
Yi.Admin/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Entities/OpenApi/MessageLogAggregateRoot.cs
ccnetcore d4d89b989c feat: Token 支持请求日志开关并记录 OpenAPI 请求日志
新增 Token 的 IsEnableLog 字段,贯穿领域、应用与 DTO;在 OpenApiService 中根据 Token 配置异步记录请求日志,包含请求体、模型与接口类型,用于后续审计与分析。
2026-02-12 17:36:31 +08:00

50 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using SqlSugar;
using Volo.Abp.Domain.Entities;
using Yi.Framework.AiHub.Domain.Shared.Enums;
namespace Yi.Framework.AiHub.Domain.Entities.OpenApi;
[SugarTable("Ai_Message_Log")]
public class MessageLogAggregateRoot : Entity<Guid>
{
/// <summary>
/// 请求内容httpbody
/// </summary>
[SugarColumn(ColumnDataType = "text")]
public string? RequestBody { get; set; }
/// <summary>
/// 请求apikey
/// </summary>
[SugarColumn(Length = 255)]
public string ApiKey { get; set; }
/// <summary>
/// 请求apikey名称
/// </summary>
[SugarColumn(Length = 255)]
public string ApiKeyName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreationTime { get; set; }
/// <summary>
/// 模型id
/// </summary>
[SugarColumn(Length = 64)]
public string ModelId { get; set; }
/// <summary>
/// api类型
/// </summary>
public ModelApiTypeEnum ApiType { get; set; }
/// <summary>
/// api类型名称
/// </summary>
[SugarColumn(Length = 16)]
public string ApiTypeName { get; set; }
}