feat: sale manager
This commit is contained in:
@@ -252,6 +252,17 @@ func (p ProductNumberAddValidator) GetMessage() validate.ValidatorMessages {
|
||||
}
|
||||
}
|
||||
|
||||
type ProductNumberItemsValidator struct {
|
||||
Type uint32 `validate:"required,oneof=1 2"`
|
||||
}
|
||||
|
||||
func (p ProductNumberItemsValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Type.required": "类型不能为空",
|
||||
"Type.oneof": "类型不对",
|
||||
}
|
||||
}
|
||||
|
||||
type ProductItemsByIdsValidator struct {
|
||||
Ids []int64 `validate:"required,min=1"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user