You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.5 KiB
34 lines
1.5 KiB
package v1
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
)
|
|
|
|
type VoteReq struct {
|
|
g.Meta `path:"/getAllVote" method:"get" tags:"获取用户投票活动"`
|
|
UserId int64 `json:"userId" v:"required" dc:"用户ID"`
|
|
ArticleTitle string `json:"articleTitle" dc:"文章/视频标题"`
|
|
VoteTitle string `json:"voteTitle" dc:"投票活动标题"`
|
|
CreateTime *gtime.Time `json:"createTime" dc:"活动创建时间"`
|
|
DeadlineTime *gtime.Time `json:"deadlineTime" dc:"活动截止时间"`
|
|
Status int `json:"status" dc:"投票活动状态"`
|
|
Page int `p:"page" v:"required|integer|min:1#数据页不能为空|数据页只能是整数|数据页不能小于1" dc:"页数"`
|
|
PageSize int `p:"page_size" v:"integer|min:1#数据大小只能为整数|数据大小不能小于1" d:"20" dc:"每页数据量"`
|
|
}
|
|
|
|
type VoteRes struct {
|
|
Page int `json:"page" dc:"页数"`
|
|
PageSize int `json:"page_size" dc:"每页数据量"`
|
|
Total int `json:"total" dc:"总记录数"`
|
|
Rows []Vote `json:"rows" dc:"投票活动列表"`
|
|
}
|
|
|
|
type Vote struct {
|
|
ArticleTitle string `json:"articleTitle" dc:"文章/视频标题"`
|
|
VoteId int `json:"voteId" dc:"投票活动ID"`
|
|
VoteTitle string `json:"voteTitle" dc:"投票活动标题"`
|
|
CreateTime *gtime.Time `json:"createTime" dc:"活动创建时间"`
|
|
DeadlineTime *gtime.Time `json:"deadlineTime" dc:"活动截止时间"`
|
|
Status int `json:"status" dc:"投票活动状态"`
|
|
}
|