47 lines
1.5 KiB
Go
47 lines
1.5 KiB
Go
package response
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type BookmarksResponse struct {
|
|
ID uint `json:"id"`
|
|
UserId uint `json:"userId"`
|
|
ArticleId uint `json:"articleId"`
|
|
IsActive *bool `json:"isActive"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// Article details
|
|
Article ArticleDetails `json:"article"`
|
|
}
|
|
|
|
type ArticleDetails struct {
|
|
ID uint `json:"id"`
|
|
Title string `json:"title"`
|
|
Slug string `json:"slug"`
|
|
Description string `json:"description"`
|
|
HtmlDescription string `json:"htmlDescription"`
|
|
CategoryId int `json:"categoryId"`
|
|
TypeId int `json:"typeId"`
|
|
Tags string `json:"tags"`
|
|
ThumbnailUrl string `json:"thumbnailUrl"`
|
|
PageUrl *string `json:"pageUrl"`
|
|
CreatedById *uint `json:"createdById"`
|
|
ShareCount *int `json:"shareCount"`
|
|
ViewCount *int `json:"viewCount"`
|
|
CommentCount *int `json:"commentCount"`
|
|
StatusId *int `json:"statusId"`
|
|
IsBanner *bool `json:"isBanner"`
|
|
IsPublish *bool `json:"isPublish"`
|
|
PublishedAt *time.Time `json:"publishedAt"`
|
|
IsActive *bool `json:"isActive"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
type BookmarksSummaryResponse struct {
|
|
TotalBookmarks int `json:"totalBookmarks"`
|
|
RecentBookmarks []*BookmarksResponse `json:"recentBookmarks"`
|
|
}
|