v1

package
v0.0.0-...-bf4de7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelPollReq

type CancelPollReq struct {
	g.Meta `path:"/poll/:id/cancel" tags:"Poll" method:"delete" summary:"取消投票"`
	ID     int `json:"id" dc:"投票 ID" v:"required|min:1#请输入投票 ID"`
}

type CancelPollRes

type CancelPollRes struct{}

type GetPollDetailReq

type GetPollDetailReq struct {
	g.Meta         `path:"/poll/:id" tags:"Poll" method:"get" summary:"获取投票详情"`
	ID             int  `json:"id" dc:"投票ID" v:"required|min:1" in:"path"`
	WithPolledData bool `json:"with_polled_data" dc:"是否返回投票记录" v:"boolean" d:"false"`
}

type GetPollDetailRes

type GetPollDetailRes struct {
	model.PollListElement
}

type GetPollMarksReq

type GetPollMarksReq struct {
	g.Meta `path:"/poll/mark" tags:"Poll" method:"get" summary:"获取投票标记"`
}

type GetPollMarksRes

type GetPollMarksRes []model.PollMark

type GetPollsReq

type GetPollsReq struct {
	g.Meta       `path:"/poll" tags:"Poll" method:"get" summary:"获取投票列表"`
	StatusStart  int                         `json:"status_start" dc:"起始状态" v:"required|min:0"`
	StatusEnd    int                         `json:"status_end" dc:"结束状态" v:"required|max:300"`
	WithRecords  bool                        `json:"with_records" dc:"是否返回投票记录" v:"boolean" d:"false"`
	PolledFilter consts.PollListPolledFilter `json:"polled_filter" dc:"投票过滤器" v:"in:0,1,2" d:"0"`
	Order        string                      `json:"order" dc:"排序方式" v:"in:desc,asc" d:"asc"`
	Page         int                         `json:"page" dc:"页码" v:"min:1" d:"1"`
	PageSize     int                         `json:"page_size" dc:"每页数量" v:"min:0|max:1000" d:"30"`
}

type GetPollsRes

type GetPollsRes model.GetPollListOutput

type NewPollReq

type NewPollReq struct {
	g.Meta `path:"/poll" tags:"Poll" method:"post" summary:"新建投票"`
}

type NewPollRes

type NewPollRes struct {
	Poll          model.PollElement `json:"poll" dc:"投票内容"`
	RemainPending int               `json:"remain_pending" dc:"剩余待处理"`
}

type PollReq

type PollReq struct {
	g.Meta  `path:"/poll/:id" tags:"Poll" method:"put" summary:"投票"`
	ID      int               `json:"id" dc:"投票ID" v:"required|integer" in:"path"`
	Method  consts.PollMethod `json:"method" dc:"投票方式" v:"required"`
	MarkIDs []int             `json:"mark_ids" dc:"标记"`
	Comment string            `json:"comment" dc:"理由" v:"length:1,255"`
}

type PollRes

type PollRes struct{}

PollRes 成功返回空结构

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL