order address apis
This commit is contained in:
@@ -4,10 +4,28 @@ import "lone-services/pkg/validate"
|
||||
|
||||
// CartEditValidator 查看列表
|
||||
type CartEditValidator struct {
|
||||
Info string
|
||||
Info string `validate:"required"`
|
||||
Type int32 `validate:"required,oneof=1 2 3"` //类型 1门店 , 2销售,3为用户
|
||||
}
|
||||
|
||||
// GetMessage 查看列表 - 提示消息
|
||||
func (p CartEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{}
|
||||
return validate.ValidatorMessages{
|
||||
"Info.required": "类型不能为空",
|
||||
"Type.required": "类型不能为空",
|
||||
"Type.oneof": "类型不对",
|
||||
}
|
||||
}
|
||||
|
||||
type CartValidator struct {
|
||||
Type int32 `validate:"required,oneof=1 2 3"` //类型 1门店 , 2销售,3为用户
|
||||
|
||||
}
|
||||
|
||||
// GetMessage 查看列表 - 提示消息
|
||||
func (p CartValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Type.required": "类型不能为空",
|
||||
"Type.oneof": "类型不对",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user