feat: 支持未登录用户统计
This commit is contained in:
@@ -19,7 +19,7 @@ public class MessageAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
}
|
||||
|
||||
public MessageAggregateRoot(Guid userId, Guid? sessionId, string content, string role, string modelId,
|
||||
public MessageAggregateRoot(Guid? userId, Guid? sessionId, string content, string role, string modelId,
|
||||
ThorUsageResponse? tokenUsage)
|
||||
{
|
||||
UserId = userId;
|
||||
@@ -48,7 +48,7 @@ public class MessageAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
this.MessageType = sessionId is null ? MessageTypeEnum.Api : MessageTypeEnum.Web;
|
||||
}
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public Guid? SessionId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
|
||||
@@ -13,7 +13,7 @@ public class UsageStatisticsAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
}
|
||||
|
||||
public UsageStatisticsAggregateRoot(Guid userId, string modelId)
|
||||
public UsageStatisticsAggregateRoot(Guid? userId, string modelId)
|
||||
{
|
||||
UserId = userId;
|
||||
ModelId = modelId;
|
||||
@@ -22,7 +22,7 @@ public class UsageStatisticsAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public Guid UserId { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 哪个模型
|
||||
|
||||
Reference in New Issue
Block a user