add apis
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
type UsageRecordsValidator struct {
|
||||
Id int64 `form:"id" json:"id" validate:"required"`
|
||||
HostCode string `form:"host_code" json:"host_code" validate:"required"`
|
||||
ImportMode int32 `form:"import_mode" json:"import_mode"`
|
||||
PoreFormingStrength int32 `form:"pore_forming_strength" json:"pore_forming_strength"`
|
||||
ImportStrength int32 `form:"import_strength" json:"import_strength"`
|
||||
FacialMaskId string `form:"facial_mask_id" json:"facial_mask_id"`
|
||||
Ts int32 `form:"t_s" json:"t_s"`
|
||||
Rs int32 `form:"r_s" json:"r_s"`
|
||||
Ls int32 `form:"l_s" json:"l_s"`
|
||||
}
|
||||
|
||||
// GetMessage 提示消息
|
||||
func (p UsageRecordsValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Id.required": "ID不能为空",
|
||||
"HostCode.required": "设备编码不能为空",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user