yintai2/app/admin/request/news.go

38 lines
877 B
Go

package request
import "yintai-api/app/common/request"
type NewsTranslation struct {
Title string `json:"title"`
Content string `json:"content"`
PublishTime string `json:"publish_time"`
}
type NewsCreate struct {
CategoryID string `json:"category_id"`
CoverShow string `json:"cover_show"`
Weight string `json:"weight"`
Pinned string `json:"pinned"`
CoverResource map[string][]string `json:"cover_resource"`
Trans map[string]NewsTranslation `json:"translations"`
}
type NewsUpdate struct {
ID string `json:"id"`
NewsCreate
}
type NewsDelete struct {
ID string `form:"id"`
}
type NewsList struct {
request.Paginate
Lang string `form:"lang" binding:"required"`
Title string `form:"title"`
Content string `form:"content"`
PublishTime string `form:"publish_time"`
CategoryID string `form:"category_id"`
}