Files
sundynix-plant-be/model/plant/request/post.go
T
2026-02-07 15:52:54 +08:00

33 lines
859 B
Go

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"` // 评论内容
}