search_money_incentives.go 951 字节
package query

import (
	"fmt"

	"github.com/beego/beego/v2/core/validation"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)

type SearchMoneyIncentivesQuery struct {
	//操作人
	Operator   domain.Operator `json:"-"`
	PageNumber int             `json:"pageNumber"`
	PageSize   int             `json:"pageSize"`
	//共创合约名称
	CooperationContractName string `json:"cooperationContractName"`
	//发起部门名称
	DepartmentName string `json:"departmentName"`
}

func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) Valid(validation *validation.Validation) {

}

func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) ValidateQuery() error {
	valid := validation.Validation{}
	b, err := valid.Valid(searchMoneyIncentivesQuery)
	if err != nil {
		return err
	}
	if !b {
		for _, validErr := range valid.Errors {
			return fmt.Errorf("%s  %s", validErr.Key, validErr.Message)
		}
	}
	return nil
}