mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-23 05:01:17 +10:00
fix: decduck's code review
This commit is contained in:
@ -1,13 +1,21 @@
|
||||
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
|
||||
model Tag {
|
||||
id String @id @default(uuid())
|
||||
name String @unique
|
||||
|
||||
@@map("news")
|
||||
}
|
||||
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?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user