Implement News System with Admin UI and Homepage Integration
This commit is contained in:
@@ -47,6 +47,7 @@ model Special {
|
||||
curator String?
|
||||
songs SpecialSong[]
|
||||
puzzles DailyPuzzle[]
|
||||
news News[]
|
||||
}
|
||||
|
||||
model SpecialSong {
|
||||
@@ -73,3 +74,17 @@ model DailyPuzzle {
|
||||
|
||||
@@unique([date, genreId, specialId])
|
||||
}
|
||||
|
||||
model News {
|
||||
id Int @id @default(autoincrement())
|
||||
title String
|
||||
content String // Markdown format
|
||||
author String? // Optional: curator/admin name
|
||||
publishedAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
featured Boolean @default(false) // Highlight important news
|
||||
specialId Int? // Optional: link to a special
|
||||
special Special? @relation(fields: [specialId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([publishedAt])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user