mirror of
https://github.com/zooai/ai.git
synced 2026-10-30 14:52:08 +00:00
32 lines
675 B
Plaintext
32 lines
675 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
email String @unique
|
|
name String?
|
|
image String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
chats Chat[]
|
|
}
|
|
|
|
model Chat {
|
|
id String @id @default(cuid())
|
|
title String?
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
messages Json @default("[]")
|
|
sharePath String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([userId])
|
|
}
|