package command import "github.com/beego/beego/v2/core/validation" type VerifyKeyCommand struct { VerifyKey string `cname:"校验码" json:"key"` } func (in *VerifyKeyCommand) Valid(validation *validation.Validation) { if len(in.VerifyKey) == 0 { validation.SetError("key", "校验码无效") return } } type ErrorI struct { FileName string `cname:"文件名称" json:"fileName"` Message string `cname:"错误消息" json:"message"` } type OutResult struct { Status string `cname:"状态" json:"status"` Success []ErrorI `cname:"成功消息" json:"success"` Failure []ErrorI `cname:"错误消息" json:"failure"` }