search_dividends_estimate.go 1001 字节
package query

import (
	"fmt"

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

type SearchDividendsEstimateQuery struct {
	//操作人
	Operator domain.Operator `json:"-"`
	// 承接人分红预算单号
	DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
	// 分红类型,1订单分红,2退货冲销,3金额激励
	DividendsType int `json:"dividendsType"`
	PageNumber    int `json:"pageNumber"`
	PageSize      int `json:"pageSize"`
}

func (searchDividendsEstimateQuery *SearchDividendsEstimateQuery) Valid(validation *validation.Validation) {

}

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