feat: device info and bind
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 31s
CI / admin (push) Successful in 24s
CI / bff (push) Successful in 31s
CI / chore (push) Successful in 27s
CI / equipment (push) Successful in 21s
CI / express (push) Successful in 23s
CI / factory (push) Successful in 21s
CI / message (push) Successful in 21s
CI / order (push) Successful in 22s
CI / payment (push) Successful in 20s
CI / percutaneous (push) Successful in 20s
CI / product (push) Successful in 20s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / support (push) Successful in 20s
CI / task (push) Successful in 19s
CI / user (push) Successful in 21s
CI / wecom (push) Successful in 22s

This commit is contained in:
zzw
2026-10-16 15:36:17 +08:00
parent a65b6d2803
commit 46d3f672bf
42 changed files with 2142 additions and 197 deletions
+36
View File
@@ -104,3 +104,39 @@ func (p UserAuthValidator) GetMessage() validate.ValidatorMessages {
"ValidityTime.max": "有效时间过长",
}
}
type UserAuthDeleteValidator struct {
Id int64 `validate:"required,gt=0"`
}
func (p UserAuthDeleteValidator) GetMessage() validate.ValidatorMessages {
return validate.ValidatorMessages{
"Id.required": "id 不能为空",
"Id.gt": "id 必须大于0",
}
}
type DeviceBindValidator struct {
DeviceNo string `validate:"required,max=64"`
}
func (p DeviceBindValidator) GetMessage() validate.ValidatorMessages {
return validate.ValidatorMessages{
"DeviceNo.required": "device_no 必传",
"DeviceNo.max": "device_no 过长",
}
}
type UserAuthUpdateValidator struct {
Id int64 `validate:"required,gt=0"`
ValidityTime string `validate:"required,max=32"`
}
func (p UserAuthUpdateValidator) GetMessage() validate.ValidatorMessages {
return validate.ValidatorMessages{
"Id.required": "id 不能为空",
"Id.gt": "id 必须大于0",
"ValidityTime.required": "时间必传",
"ValidityTime.max": "时间过长",
}
}