feat: rebind mobile

This commit is contained in:
zzw
2026-10-21 13:29:03 +08:00
parent 113756fd46
commit 6107ac8d9d
47 changed files with 2210 additions and 289 deletions
+33
View File
@@ -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"`
}