从 demo 引用
This commit is contained in:
31
api/struct.go
Normal file
31
api/struct.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.satori.love/gameui/webp/models"
|
||||
)
|
||||
|
||||
type Image struct {
|
||||
Id int `json:"id" db:"id"`
|
||||
Width int `json:"width" db:"width"`
|
||||
Height int `json:"height" db:"height"`
|
||||
Content string `json:"content" db:"content"`
|
||||
ArticleCategoryTopId int `json:"article_category_top_id" db:"article_category_top_id"`
|
||||
PraiseCount int `json:"praise_count" db:"praise_count"`
|
||||
CollectCount int `json:"collect_count" db:"collect_count"`
|
||||
UserID int `json:"user_id" db:"user_id"`
|
||||
User models.User `json:"user" db:"user"`
|
||||
Article models.Article `json:"article" db:"article"`
|
||||
CreateTime time.Time `json:"createTime" db:"createTime"`
|
||||
UpdateTime time.Time `json:"updateTime" db:"updateTime"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int `json:"id" db:"id"`
|
||||
UserName string `json:"user_name" db:"user_name"`
|
||||
Avatar string `json:"avatar" db:"avatar"`
|
||||
Rank string `json:"rank" db:"rank"`
|
||||
CreateTime time.Time `json:"create_time" db:"create_time"`
|
||||
UpdateTime time.Time `json:"update_time" db:"update_time"`
|
||||
}
|
Reference in New Issue
Block a user