feat(DB): Updated DB for news articles to be stored in the DB

This commit is contained in:
Aden Lindsay
2025-02-02 10:17:21 +10:30
committed by GitHub
parent 1ed15902a3
commit 623ab7d786

13
prisma/schema/news.prisma Normal file
View File

@ -0,0 +1,13 @@
model News {
id String @id @default(uuid())
title String
content String @db.Text
excerpt String
tags String[]
image String?
publishedAt DateTime @default(now())
author User @relation(fields: [authorId], references: [id])
authorId String
@@map("news")
}