MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / LifetimeUsage

Struct LifetimeUsage

internal/models/usage.go:43–50  ·  view source on GitHub ↗

LifetimeUsage tracks total cost per user, per project, across all time. Each document represents the cumulative usage for a user-project pair.

Source from the content-addressed store, hash-verified

41// LifetimeUsage tracks total cost per user, per project, across all time.
42// Each document represents the cumulative usage for a user-project pair.
43type LifetimeUsage struct {
44 ID bson.ObjectID `bson:"_id"`
45 UserID bson.ObjectID `bson:"user_id"`
46 ProjectID string `bson:"project_id"`
47 SuccessCost float64 `bson:"success_cost"` // Total cost in USD for successful requests
48 FailedCost float64 `bson:"failed_cost"` // Total cost in USD for failed requests
49 UpdatedAt bson.DateTime `bson:"updated_at"`
50}
51
52func (u LifetimeUsage) CollectionName() string {
53 return "lifetime_usages"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected