get_project_module_version.go
821 字节
package query
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type GetProjectModuleVersionQuery struct {
ProjectModuleVersionId int64 `json:"projectModuleVersionId" valid:"Required"`
// 项目版本编号
ProjectModuleVersion int64 `json:"projectModuleVersion" valid:"Required"`
}
func (getProjectModuleVersionQuery *GetProjectModuleVersionQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (getProjectModuleVersionQuery *GetProjectModuleVersionQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(getProjectModuleVersionQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}