status_partner_info.go 543 字节
package command

import (
	"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
	"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/lib"
)

type StatusPartnerInfoCommand struct {
	// 合伙人ID
	Ids       []int64 `json:"id"`
	Status    int     `json:"status"`
	CompanyId int64   `json:"companyId"`
}

func (command *StatusPartnerInfoCommand) ValidateCommand() error {
	if !(command.Status == domain.PARTNER_STATUS_NO || command.Status == domain.PARTNER_STATUS_YES) {
		return lib.ThrowError(lib.ARG_ERROR, "合伙人状态错误")
	}
	return nil
}