Spaces:
Sleeping
Sleeping
generator client { | |
provider = "prisma-client-js" | |
} | |
datasource db { | |
provider = "postgresql" | |
url = env("POSTGRES_PRISMA_URL") | |
directUrl = env("POSTGRES_URL_NON_POOLING") | |
} | |
model User { | |
id String | |
name String | |
email String | |
createdAt DateTime | |
updatedAt DateTime | |
chats Chat[] | |
message Message[] | |
@ | |
} | |
model Chat { | |
id String | |
createdAt DateTime | |
updatedAt DateTime | |
userId String? | |
mediaUrl String | |
user User? | |
messages Message[] | |
@ | |
} | |
model Message { | |
id String | |
createdAt DateTime | |
updatedAt DateTime | |
userId String? | |
chatId String | |
content String | |
role MessageRole | |
chat Chat | |
user User? | |
@ | |
} | |
enum MessageRole { | |
system | |
user | |
assistant | |
} | |