Initial commit

This commit is contained in:
2026-04-23 21:38:24 -04:00
commit 63e12a9636
1762 changed files with 1672620 additions and 0 deletions
@@ -0,0 +1,26 @@
namespace PowderCoating.Core.Entities;
/// <summary>
/// Immutable audit log of every Anthropic API call made on behalf of a tenant.
/// Intentionally omits BaseEntity — no soft delete, no UpdatedAt, no per-tenant query filter
/// (this is a platform-wide log read by SuperAdmins across all companies).
/// </summary>
public class AiUsageLog
{
public long Id { get; set; }
public int CompanyId { get; set; }
public string UserId { get; set; } = string.Empty;
/// <summary>Which AI feature triggered this call. Use AppConstants.AiFeatures constants.</summary>
public string Feature { get; set; } = string.Empty;
/// <summary>True when the AI service returned successfully; false on exception or upstream error.</summary>
public bool Success { get; set; } = true;
/// <summary>Approximate input size in characters/bytes — used as a rough token-cost proxy.</summary>
public int InputLength { get; set; }
public DateTime CalledAt { get; set; }
public Company? Company { get; set; }
}