Path: redb-route/redb.Route.Llm/Storage/Redb/Schemas/CostBudgetProps.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Llm/Storage/Redb/Schemas/CostBudgetProps.cs
----
using redb.Core.Attributes;
namespace redb.Route.Llm.Storage.Redb.Schemas;
///
/// Running cost / token totals scoped to a conversation. One row per
/// conversation per billing period — is the
/// boundary that lets a daily / monthly reset roll the counters. The
/// conversation id lives on the value_string column of _objects
/// (partial index on PostgreSQL/SQLite; no index on MSSQL) and, normalized, in
/// value_unique (per-scheme unique — one budget row per conversation),
/// not in props.
///
[RedbScheme("LLM Cost Budget")]
public class CostBudgetProps
{
/// Optional billing-period anchor (e.g. day or month start, UTC).
public DateTimeOffset? PeriodStartUtc { get; set; }
/// Aggregated input tokens.
public long InputTokens { get; set; }
/// Aggregated output tokens.
public long OutputTokens { get; set; }
/// Aggregated cost in USD.
public decimal CostUsd { get; set; }
/// When the row was last updated.
public DateTimeOffset UpdatedAtUtc { get; set; }
}