hestia/prisma/schema.prisma
2025-01-04 21:24:47 -05:00

40 lines
804 B
Text

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
generator pothos {
provider = "prisma-pothos-types"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
clerkId String @unique
email String?
name String
posts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}
model Post {
id String @id @default(uuid())
title String
content String
published Boolean? @default(false)
author User @relation(references: [id], fields: [authorId])
authorId String
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}