feat: post api

This commit is contained in:
Blizzard
2026-02-06 17:28:42 +08:00
parent 3115b58cb2
commit 87c31f119f
14 changed files with 420 additions and 6 deletions
+30
View File
@@ -0,0 +1,30 @@
package request
import common "sundynix-go/model/commom/request"
type CreatePost struct {
Title string `json:"title"` // 标题 必须
Content string `json:"content"` // 内容
Location string `json:"location"` //位置
OssIds []string `json:"ossIds"` // 图片id[]
}
// UpdatePost 修改帖子
type UpdatePost struct {
Id string `json:"id" binding:"required"`
Title string `json:"title"` // 标题
Content string `json:"content"` // 内容
}
// PostPage 帖子列表
type PostPage struct {
common.PageInfo
Title string `json:"title"` // 标题
HasReviewed int `json:"hasReviewed"` //是否审核通过
}
// CreateComment 创建评论
type CreateComment struct {
PostId string `json:"postId" binding:"required"` // 帖子id
Content string `json:"content" binding:"required"` // 评论内容
}