Spaces:
Sleeping
Sleeping
File size: 1,454 Bytes
5ec491a ca7a659 5ec491a c792d09 5ec491a c792d09 04735a9 5ec491a c792d09 009c95b 5ec491a a1c5622 5ec491a a1c5622 5ec491a a1c5622 7286745 ca7a659 bc1cf4e 7286745 a1c5622 5ec491a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
generator client {
provider = "prisma-client-js"
}
generator json {
provider = "prisma-json-types-generator"
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL")
directUrl = env("POSTGRES_URL_NON_POOLING")
}
model User {
id String @id @default(cuid())
name String
email String @unique
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
avatar String?
chats Chat[]
message Message[]
@@map("user")
}
model Chat {
id String @id @default(cuid())
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
title String @default("(no title)")
mediaUrl String
userId String?
user User? @relation(fields: [userId], references: [id])
messages Message[]
@@map("chat")
}
model Message {
id String @id @default(cuid())
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
userId String?
chatId String
mediaUrl String
prompt String
response String?
/// [FinalResultBody]
result Json?
/// [AgentResponseBodies]
responseBody Json?
streamDuration Int?
chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade)
user User? @relation(fields: [userId], references: [id])
@@map("message")
}
|