69 lines
1.7 KiB
Plaintext
69 lines
1.7 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
|
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
output = "../generated/prisma"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Models {
|
|
id String @id @default(uuid())
|
|
name String @unique
|
|
openRoutermodelName String
|
|
lighterApiKey String
|
|
invocationCount Int @default(0)
|
|
invocations Invocations[]
|
|
portfolioSize PortfolioSize[]
|
|
accountIndex String
|
|
|
|
@@index([name])
|
|
}
|
|
|
|
model Invocations {
|
|
id String @id @default(uuid())
|
|
modelId String
|
|
response String
|
|
model Models @relation(fields: [modelId], references: [id])
|
|
toolCalls ToolCalls[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([modelId])
|
|
}
|
|
|
|
model ToolCalls {
|
|
id String @id @default(uuid())
|
|
invocationId String
|
|
toolCallType ToolCallType
|
|
metadata String
|
|
invocation Invocations @relation(fields: [invocationId], references: [id])
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([invocationId])
|
|
}
|
|
|
|
model PortfolioSize {
|
|
id String @id @default(uuid())
|
|
modelId String
|
|
netPortfolio String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
model Models @relation(fields: [modelId], references: [id])
|
|
|
|
@@index([modelId])
|
|
}
|
|
|
|
enum ToolCallType {
|
|
CREATE_POSITION
|
|
CLOSE_POSITION
|
|
}
|