Add initial frontend and backend

This commit is contained in:
Dave Gallant
2022-07-31 02:58:08 +00:00
parent 6709422ba0
commit 3173b47951
23 changed files with 6760 additions and 1 deletions

22
backend/model.go Normal file
View File

@@ -0,0 +1,22 @@
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
} // @name Topic
type Votes struct {
Up int `json:"total_up"`
Down int `json:"total_down"`
} // @name Votes