feat: swagger format
This commit is contained in:
@@ -15,7 +15,7 @@ type Post struct {
|
||||
CommentCount int `json:"commentCount" form:"commentCount" gorm:"default:0;column:comment_count;comment:评论次数"`
|
||||
LikeCount int `json:"likeCount" form:"likeCount" gorm:"default:0;column:like_count;comment:点赞次数"`
|
||||
Location string `json:"location" form:"location" gorm:"column:location;size:100;comment:位置"`
|
||||
HasReviewed int `json:"hasReviewed" form:"hasReviewed" gorm:"column:has_reviewed;comment:是否审核通过"`
|
||||
HasReviewed int `json:"hasReviewed" form:"hasReviewed" gorm:"column:has_reviewed;default:0;comment:是否审核通过"`
|
||||
HasLiked int `json:"hasLiked" form:"hasLiked" gorm:"-"`
|
||||
//图片
|
||||
ImgList []*system.Oss `json:"imgList" form:"imgList" gorm:"many2many:post_oss;comment:图片列表"`
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
type Topic struct {
|
||||
global.BaseModel
|
||||
Title string `json:"title"`
|
||||
StartTime time.Time `json:"start_time" gorm:"column:start_time;"`
|
||||
EndTime time.Time `json:"end_time" gorm:"column:end_time;"`
|
||||
StartTime time.Time `json:"startTime" gorm:"type:date;column:start_time;"`
|
||||
EndTime time.Time `json:"endTime" gorm:"type:date;column:end_time;"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ type UpdatePost struct {
|
||||
type PostPage struct {
|
||||
common.PageInfo
|
||||
Title string `json:"title"` // 标题
|
||||
HasReviewed int `json:"hasReviewed"` //是否审核通过
|
||||
HasReviewed *int `json:"hasReviewed"` //是否审核通过
|
||||
}
|
||||
|
||||
// CreateComment 创建评论
|
||||
|
||||
@@ -2,15 +2,15 @@ package request
|
||||
|
||||
type CreateTopic struct {
|
||||
Title string `json:"title"`
|
||||
StartTime string `json:"start_time"`
|
||||
EndTime string `json:"end_time"`
|
||||
StartTime string `json:"startTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateTopic struct {
|
||||
Id int `json:"id" binding:"required"`
|
||||
Title string `json:"title"`
|
||||
StartTime string `json:"start_time"`
|
||||
EndTime string `json:"end_time"`
|
||||
StartTime string `json:"startTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user