get_latest_versionInfo_query.go
789 字节
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"net/http"
)
type GetLatestVersionQuery struct {
//操作人
//操作人
//Operator domain.Operator `json:"-"`
DeviceType string `json:"-"`
VersionNo int `json:"versionNo,string"`
Channel int `json:"channel"`
Request *http.Request `json:"-"`
}
func (departmentsUsersQuery *GetLatestVersionQuery) Valid(validation *validation.Validation) {
}
func (departmentsUsersQuery *GetLatestVersionQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(departmentsUsersQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}