feat: get news by slug and and author detail

This commit is contained in:
ericprd
2025-03-06 11:06:06 +08:00
parent d217ec8a62
commit 85247643e6
9 changed files with 76 additions and 1 deletions
+2
View File
@@ -18,4 +18,6 @@ type News struct {
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
DeletedAt time.Time `gorm:"default:null" json:"deleted_at"`
Author Staff `gorm:"foreignKey:AuthorID" json:"author"`
}