feat: rebind mobile
This commit is contained in:
@@ -60,6 +60,17 @@ func (p SwitchValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{}
|
||||
}
|
||||
|
||||
type QrcodeInfoValidator struct {
|
||||
Id int64 `validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
func (p QrcodeInfoValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Id.required": "id 必传",
|
||||
"Id.gt": "id 必传",
|
||||
}
|
||||
}
|
||||
|
||||
type StoreAuthValidator struct {
|
||||
Username string `validate:"required,max=32"`
|
||||
Password string `validate:"required,max=64"`
|
||||
@@ -116,6 +127,28 @@ func (p DeviceBindValidator) GetMessage() validate.ValidatorMessages {
|
||||
}
|
||||
}
|
||||
|
||||
type DevicePolicyValidator struct {
|
||||
SerialNo string `validate:"required,max=64"`
|
||||
}
|
||||
|
||||
func (p DevicePolicyValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"SerialNo.required": "serial_no 必传",
|
||||
"SerialNo.max": "serial_no 过长",
|
||||
}
|
||||
}
|
||||
|
||||
type DeviceDisplayValidator struct {
|
||||
TaskId string `validate:"required,max=64"`
|
||||
}
|
||||
|
||||
func (p DeviceDisplayValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"TaskId.required": "task_id 必传",
|
||||
"TaskId.max": "task_id 过长",
|
||||
}
|
||||
}
|
||||
|
||||
type StoreInfoValidator struct {
|
||||
Id int64 `validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user