save_assess_cache.go 676 字节
package command

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

// SaveAssessCacheCommand 保存待提交的评估数据(缓存)
type SaveAssessCacheCommand struct {
	AssessId         int64                    `cname:"评估项ID" json:"assessId,string"`
	AssessContent    []domain.AssessContent   `cname:"评估数据" json:"assessContent"`
	AssessTaskStages []domain.AssessTaskStage `cname:"里程碑内容" json:"assessTaskStages"`
}

func (in *SaveAssessCacheCommand) Valid(validation *validation.Validation) {
	if in.AssessId == 0 {
		validation.SetError("assessId", "ID无效")
		return
	}
}