42 lines
802 B
Plaintext
42 lines
802 B
Plaintext
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
email String @unique
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
password Password?
|
|
translations Translation[]
|
|
|
|
openAIKey String?
|
|
}
|
|
|
|
model Password {
|
|
hash String
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
userId String @unique
|
|
}
|
|
|
|
model Translation {
|
|
id String @id @default(cuid())
|
|
lang String
|
|
text String
|
|
result String
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
userId String
|
|
}
|