Path: redb-route/redb.Route.Llm/Storage/Redb/Schemas/ApprovalProps.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/ApprovalProps.cs
----
using redb.Core.Attributes;
namespace redb.Route.Llm.Storage.Redb.Schemas;
///
/// Persisted decision from an IApprovalGate. The combination of
/// (, , ,
/// ) at the top level allows reviewer queries
/// ("show every denial last week for tool X") without scanning value rows.
/// The approval id itself 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 decision per id),
/// not in props.
///
[RedbScheme("LLM Approval")]
public class ApprovalProps
{
/// Owning conversation (null for ad-hoc approvals).
public string? ConversationId { get; set; }
/// Tool that was gated.
public string ToolName { get; set; } = string.Empty;
/// Tool-use id from the model response.
public string ToolUseId { get; set; } = string.Empty;
/// True when the gate let the call proceed.
public bool Approved { get; set; }
/// Reason text supplied by the approver.
public string? Reason { get; set; }
/// Identifier of the approver (user / service) — null when auto-approved.
public string? ApprovedBy { get; set; }
/// When the decision was recorded.
public DateTimeOffset DecidedAtUtc { get; set; }
/// JSON-serialized tool input as it would be dispatched.
public string InputJson { get; set; } = "{}";
}