经皮湿水仪init and bind's all api
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// UseValidator 查看列表
|
||||
type UseValidator struct {
|
||||
HostCode string `validate:"required"`
|
||||
UserId int64 `validate:"required"`
|
||||
Data string `validate:"required"`
|
||||
Stamp int32 `validate:"required"`
|
||||
Position string
|
||||
}
|
||||
|
||||
// GetMessage 查看列表 - 提示消息
|
||||
func (p UseValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"HostCode.required": "设备不能为空",
|
||||
"UserId.required": "用户不能为空",
|
||||
"Data.required": "数据不能为空",
|
||||
"Stamp.required": "标记不能为空",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// HostCodeValidator 查看列表
|
||||
type HostCodeValidator struct {
|
||||
HostCode string `validate:"required"`
|
||||
}
|
||||
|
||||
// GetMessage 查看列表 - 提示消息
|
||||
func (p HostCodeValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"HostCode.required": "设备不能为空",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user