feat:添加响应结构体方便前端渲染
This commit is contained in:
29
internal/feed/entity.go
Normal file
29
internal/feed/entity.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package feed
|
||||
|
||||
type FeedAuthor struct {
|
||||
ID uint `json:"id"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type FeedVideoItem struct {
|
||||
ID uint `json:"id"`
|
||||
Author FeedAuthor `json:"author"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description,omitempty"`
|
||||
PlayURL string `json:"play_url"`
|
||||
CoverURL string `json:"cover_url"`
|
||||
CreateTime int64 `json:"create_time"`
|
||||
LikesCount int64 `json:"likes_count"`
|
||||
IsLiked bool `json:"is_liked"`
|
||||
}
|
||||
|
||||
type ListLatestRequest struct {
|
||||
Limit int `json:"limit"`
|
||||
LatestTime int64 `json:"latest_time"`
|
||||
}
|
||||
|
||||
type ListLatestResponse struct {
|
||||
VideoList []FeedVideoItem `json:"video_list"`
|
||||
NextTime int64 `json:"next_time"`
|
||||
HasMore bool `json:"has_more"`
|
||||
}
|
||||
Reference in New Issue
Block a user