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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyReviewerReq

type ApplyReviewerReq struct {
	g.Meta            `path:"/user/apply/reviewer" tags:"User" method:"post" summary:"申请成为审查员"`
	VerificationToken string `json:"verification_token" dc:"验证令牌" v:"required|size:36#验证令牌必须为 36 位"`
}

ApplyReviewerReq 申请成为审查员,目前说白了就是自动激活

type ApplyReviewerRes

type ApplyReviewerRes struct{}

type GetApplyTokenReq

type GetApplyTokenReq struct {
	g.Meta `path:"/user/apply/token" tags:"User" method:"get" summary:"获得申请 Token"`
}

GetApplyTokenReq 获得申请 Token,主要用于审查员的申请时的文档确认

type GetApplyTokenRes

type GetApplyTokenRes struct {
	VerificationToken string     `json:"verification_token" dc:"验证令牌"`
	ValidUntil        *time.Time `json:"valid_until" dc:"有效期"`
}

type GetUserPollLogReq

type GetUserPollLogReq struct {
	g.Meta   `path:"/user/poll/logs" tags:"User" method:"get" summary:"获取用户投票记录"`
	Page     int    `json:"page" dc:"页码" d:"1" v:"integer|min-length:1#页码必须为整数|页码不能小于1"`
	PageSize int    `json:"page_size" dc:"页面大小" d:"30" v:"integer|length:0,1000#页面大小必须为整数|页面大小不能超过1000"`
	Order    string `json:"order" dc:"排序" d:"desc" v:"in:desc,asc#排序方式不正确"`
}

type GetUserPollLogRes

type GetUserPollLogRes struct {
	model.GetUserPollLogsWithSentenceOutput
}

type GetUserPollResultReq

type GetUserPollResultReq struct {
	g.Meta   `path:"/user/poll/result" tags:"User" method:"get" summary:"获取用户投票结果"`
	Page     int    `json:"page" dc:"页码" d:"1" v:"integer|min-length:1#页码必须为整数|页码不能小于1"`
	PageSize int    `json:"page_size" dc:"页面大小" d:"30" v:"integer|length:0,1000#页面大小必须为整数|页面大小不能超过1000"`
	Order    string `json:"order" dc:"排序" d:"desc" v:"in:desc,asc#排序方式不正确"`
}

type GetUserPollResultRes

type GetUserPollResultRes model.UserPollResult

type GetUserPollUnreviewedReq

type GetUserPollUnreviewedReq struct {
	g.Meta `path:"/user/poll/unreviewed" tags:"User" method:"get" summary:"获得未审查的投票数量"`
}

type GetUserPollUnreviewedRes

type GetUserPollUnreviewedRes struct {
	Count int `json:"count" dc:"未审查的投票数量"`
}

type GetUserReq

type GetUserReq struct {
	g.Meta       `path:"/user" tags:"User" method:"get" summary:"获得用户信息"`
	WithPollLogs bool `json:"with_poll_logs" dc:"是否返回投票记录" v:"boolean" d:"false"`
}

type GetUserRes

type GetUserRes struct {
	ID        uint                                        `json:"id" dc:"用户 ID"`
	Name      string                                      `json:"name" dc:"用户名"`
	Email     string                                      `json:"email" dc:"邮箱"`
	Role      consts.UserRole                             `json:"role" dc:"角色"`
	Poll      model.UserPoll                              `json:"poll" dc:"投票信息"`
	PollLog   []model.UserPollLogWithSentenceAndUserMarks `json:"poll_log" dc:"投票记录"`
	CreatedAt *time.Time                                  `json:"created_at" dc:"创建时间"`
	UpdatedAt *time.Time                                  `json:"updated_at" dc:"更新时间"`
}

type GetUserScoreRecordsReq

type GetUserScoreRecordsReq struct {
	g.Meta   `path:"/user/score/records" tags:"User" method:"get" summary:"获得用户积分记录"`
	Page     int    `json:"page" dc:"页码" d:"1" v:"integer|min-length:1#页码必须为整数|页码不能小于1"`
	PageSize int    `json:"page_size" dc:"页面大小" d:"30" v:"integer|length:0,1000#页面大小必须为整数|页面大小不能超过1000"`
	Order    string `json:"order" dc:"排序" d:"desc" v:"in:desc,asc#排序方式不正确"`
}

type GetUserScoreRecordsRes

type GetUserScoreRecordsRes struct {
	model.GetUserScoreRecordsOutput
}

Jump to

Keyboard shortcuts

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