Files
rfd-fyi/backend/model.go
Dave Gallant e69d0f632e Add scores
2022-12-23 21:11:19 -05:00

24 lines
604 B
Go

package main
type TopicsResponse struct {
Topics []Topic `json:"topics"`
} // @name Topics
type Topic struct {
TopicID uint `json:"topic_id"`
ForumID uint `json:"forum_id"`
Title string `json:"title"`
Views int `json:"total_views"`
Replies int `json:"total_replies"`
WebPath string `json:"web_path"`
PostTime string `json:"post_time"`
LastPostTime string `json:"last_post_time"`
Votes Votes
Score int `json:"score"`
} // @name Topic
type Votes struct {
Up int `json:"total_up"`
Down int `json:"total_down"`
} // @name Votes