feat: get news by slug and and author detail
This commit is contained in:
@@ -16,6 +16,12 @@ type NewsReq struct {
|
||||
LiveAt string `json:"live_at" validate:"required"`
|
||||
}
|
||||
|
||||
type Staff struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
ProfilePicture string `json:"profile_picture"`
|
||||
}
|
||||
|
||||
type News struct {
|
||||
ID string `json:"id" gorm:"primaryKey"`
|
||||
Title string `json:"title"`
|
||||
@@ -29,4 +35,6 @@ type News struct {
|
||||
LiveAt time.Time `json:"live_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
Author Staff `json:"author"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user