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"` } func (in *SaveAssessCacheCommand) Valid(validation *validation.Validation) { if in.AssessId == 0 { validation.SetError("assessId", "ID无效") return } }