Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
package srv_announcement
|
|
|
|
import (
|
|
"videoweb/pub/models/announcementmod"
|
|
"videoweb/pub/pubdef"
|
|
)
|
|
|
|
type GetAnnouncementListReq struct {
|
|
Title *string `json:"title"` // 标题,模糊搜索
|
|
Status *bool `json:"status"` // 是否启用
|
|
pubdef.Page
|
|
}
|
|
|
|
type GetAnnouncementListResp struct {
|
|
Total int64 `json:"total"`
|
|
List announcementmod.AnnouncementList `json:"list"`
|
|
}
|
|
|
|
type AddAnnouncementReq struct {
|
|
Title string `json:"title" binding:"required"` // 标题
|
|
Content string `json:"content"` // 内容
|
|
Sort int64 `json:"sort"` // 排序,越大越靠前
|
|
Status *bool `json:"status"` // 是否启用
|
|
}
|
|
|
|
type UpdateAnnouncementReq struct {
|
|
Id int64 `json:"id" binding:"required"`
|
|
Param UpdateAnnouncementParam `json:"param"`
|
|
}
|
|
|
|
type UpdateAnnouncementParam struct {
|
|
Title *string `json:"title"`
|
|
Content *string `json:"content"`
|
|
Sort *int64 `json:"sort"`
|
|
Status *bool `json:"status"`
|
|
}
|
|
|
|
type DelAnnouncementReq struct {
|
|
Id int64 `json:"id" binding:"required"`
|
|
}
|