Add blog authors support
This commit is contained in:
@@ -77,4 +77,20 @@ model BlogPost {
|
||||
publishedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
authors BlogAuthor[]
|
||||
}
|
||||
|
||||
model BlogAuthor {
|
||||
id String @id @default(cuid())
|
||||
blogPostId String
|
||||
blogPost BlogPost @relation(fields: [blogPostId], references: [id], onDelete: Cascade)
|
||||
sortOrder Int @default(0)
|
||||
type String
|
||||
name String
|
||||
website String?
|
||||
imageUrl String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([blogPostId, sortOrder])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user