fix: refactor prisma multifolder into docs example

This commit is contained in:
DecDuck
2025-05-08 16:25:01 +10:00
parent 48f796ae4b
commit 0d02be2392
8 changed files with 1 additions and 1 deletions

21
prisma/models/news.prisma Normal file
View File

@ -0,0 +1,21 @@
model Tag {
id String @id @default(uuid())
name String @unique
articles Article[]
}
model Article {
id String @id @default(uuid())
title String
description String
content String @db.Text
tags Tag[]
image String? // Object ID
publishedAt DateTime @default(now())
author User? @relation(fields: [authorId], references: [id]) // Optional, if no user, it's a system post
authorId String?
}