52 lines
1.3 KiB
Go
52 lines
1.3 KiB
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"`
|
|
CoverResource map[string][]string `json:"cover_resource"`
|
|
CoverShow string `json:"cover_show"`
|
|
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"`
|
|
}
|
|
|
|
type NewsList2 struct {
|
|
request.Paginate
|
|
Lang string `form:"lang"`
|
|
Title string `form:"title"`
|
|
Content string `form:"content"`
|
|
PublishTime string `form:"publish_time"`
|
|
CategoryID string `form:"category_id"`
|
|
Pinned string `form:"pinned"`
|
|
}
|
|
|
|
type PreNext struct {
|
|
ID string `form:"id"`
|
|
CategoryID string `form:"category_id"`
|
|
Sort string `form:"sort"`
|
|
Lang string `form:"lang"`
|
|
}
|