list_system_setting.go
747 字节
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
)
type ListSystemSettingQuery struct {
// 公司id
CompanyId int64 `json:"companyId,omitempty"`
// 设置对应的编码
SettingCode string `json:"settingCode,omitempty"`
//配置名称搜索
SettingName string `json:"settingName"`
}
func (listSystemSettingQuery *ListSystemSettingQuery) Valid(validation *validation.Validation) {
}
func (listSystemSettingQuery *ListSystemSettingQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listSystemSettingQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}