feat(ai): centralize durable usage
Add a content-free usage ledger with legacy backfill. Reserve Workspace and durable Strategy/CV work before execution so deleted history or duplicate admission cannot reset limits.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace JobTrackerApi.Models;
|
||||
|
||||
public sealed class AiUsageRecord
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string OwnerUserId { get; set; } = string.Empty;
|
||||
public string SourceType { get; set; } = string.Empty;
|
||||
public string SourceId { get; set; } = string.Empty;
|
||||
public string TaskType { get; set; } = string.Empty;
|
||||
public int CallCount { get; set; } = 1;
|
||||
public int InputCharacterCount { get; set; }
|
||||
public int OutputCharacterCount { get; set; }
|
||||
public int EstimatedTokenCount { get; set; }
|
||||
public DateTimeOffset CreatedAtUtc { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user