From f548334e8bfb02e2e22b1d2b06026e25f4302f40 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 22 May 2024 17:19:31 -0700 Subject: [PATCH] build - prisma schema change --- litellm/proxy/schema.prisma | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/litellm/proxy/schema.prisma b/litellm/proxy/schema.prisma index 7ffeab9ba..5fb0bf017 100644 --- a/litellm/proxy/schema.prisma +++ b/litellm/proxy/schema.prisma @@ -25,6 +25,7 @@ model LiteLLM_BudgetTable { organization LiteLLM_OrganizationTable[] // multiple orgs can have the same budget keys LiteLLM_VerificationToken[] // multiple keys can have the same budget end_users LiteLLM_EndUserTable[] // multiple end-users can have the same budget + team_membership LiteLLM_TeamMembership[] // budgets of Users within a Team } // Models on proxy @@ -208,4 +209,14 @@ model LiteLLM_UserNotifications { models String[] justification String status String // approved, disapproved, pending +} + +model LiteLLM_TeamMembership { + // Use this table to track the Internal User's Spend within a Team + Set Budgets, rpm limits for the user within the team + user_id String + team_id String + spend Float @default(0.0) + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + @@id([user_id, team_id]) } \ No newline at end of file