feat: analysis admin
This commit is contained in:
@@ -28,6 +28,19 @@ func (p FaceBindValidator) GetMessage() validate.ValidatorMessages {
|
||||
}
|
||||
}
|
||||
|
||||
type FaceLoginValidator struct {
|
||||
File []byte
|
||||
FilePath string `validate:"omitempty,max=512"`
|
||||
ClientCode string `validate:"omitempty,max=32"`
|
||||
}
|
||||
|
||||
func (p FaceLoginValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"FilePath.max": "file_path 过长",
|
||||
"ClientCode.max": "client_code 过长",
|
||||
}
|
||||
}
|
||||
|
||||
type AgreementInfoValidator struct {
|
||||
Type int32 `validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
@@ -150,3 +150,39 @@ func (p DeviceUpdateValidator) GetMessage() validate.ValidatorMessages {
|
||||
"DeviceName.required": "device_name 必传",
|
||||
}
|
||||
}
|
||||
|
||||
type AdminUserListValidator struct {
|
||||
Keyword string `validate:"omitempty,max=64"`
|
||||
Page int32 `validate:"omitempty,gte=0"`
|
||||
Size int32 `validate:"omitempty,gte=0"`
|
||||
}
|
||||
|
||||
func (p AdminUserListValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Keyword.max": "keyword 过长",
|
||||
}
|
||||
}
|
||||
|
||||
type AdminUserArchiveValidator struct {
|
||||
UserId int64 `validate:"required,gt=0"`
|
||||
Page int32 `validate:"omitempty,gte=0"`
|
||||
Size int32 `validate:"omitempty,gte=0"`
|
||||
}
|
||||
|
||||
func (p AdminUserArchiveValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"UserId.required": "user id必传",
|
||||
"UserId.gt": "user id必传",
|
||||
}
|
||||
}
|
||||
|
||||
type AdminUserDetailValidator struct {
|
||||
Id int64 `validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
func (p AdminUserDetailValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Id.required": "id必传",
|
||||
"Id.gt": "id必传",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user