blog-server/prisma/schema.prisma

60 lines
1.2 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model Post {
id String @id @default(uuid())
title String
slug String @unique
description String
content String
series String
tags String
published Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
@@map("posts")
}
model CustomPage {
id String @id @default(uuid())
title String
slug String @unique
description String
content String
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
@@map("custom_pages")
}
model Friend {
id Int @id @default(autoincrement())
name String
email String?
avatar String?
siteName String @map("site_name")
siteUrl String @map("site_url")
description String
createdAt DateTime @default(now())
deletedAt DateTime?
@@map("friends")
}
model Config {
id Int @id @default(autoincrement())
key String @unique
value String
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
@@map("configs")
}