cycle_query.go 769 字节
package command

import "github.com/beego/beego/v2/core/validation"

type QueryCycleCommand struct {
	CompanyId  int64  `cname:"公司ID" json:"companyId"`
	Name       string `cname:"周期名称" json:"name"`
	PageNumber int    `cname:"分页页码" json:"pageNumber" valid:"Required"`
	PageSize   int    `cname:"分页数量" json:"pageSize" valid:"Required"`
}

func (in *QueryCycleCommand) Valid(validation *validation.Validation) {
	if in.CompanyId == 0 {
		validation.SetError("companyId", "公司ID无效")
		return
	}
}

type StatisticCycleProjectUserCommand struct {
	CompanyId int64 `cname:"公司ID" json:"companyId"`
	CycleId   int64 `cname:"周期ID" json:"cycleId,string"`
}

func (in *StatisticCycleProjectUserCommand) Valid(*validation.Validation) {

}