35 lines
724 B
Plaintext
35 lines
724 B
Plaintext
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model Post {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
content String?
|
|
published Boolean @default(false)
|
|
author User? @relation(fields: [authorId], references: [id])
|
|
authorId Int?
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
email String @unique
|
|
name String?
|
|
posts Post[]
|
|
profile Profile?
|
|
}
|
|
|
|
model Profile {
|
|
id Int @id @default(autoincrement())
|
|
bio String
|
|
avatar String?
|
|
user User @relation(fields: [userId], references: [id])
|
|
userId Int @unique
|
|
enabled Boolean @default(true)
|
|
}
|