feat: completed development wecom message
This commit is contained in:
@@ -95,3 +95,49 @@ func (p DeleteUserValidator) GetMessage() validate.ValidatorMessages {
|
||||
"Id.min": "ID无效",
|
||||
}
|
||||
}
|
||||
|
||||
type CreateReviewChangeValidator struct {
|
||||
Type uint32 `validate:"required,oneof=1 2 3 4"`
|
||||
BizId int64 `validate:"required,min=1"`
|
||||
TaskId string `validate:"omitempty,max=64"`
|
||||
BeforeData string `validate:"omitempty"`
|
||||
AfterData string `validate:"required"`
|
||||
AdminId int64 `validate:"omitempty,min=0"`
|
||||
AdminName string `validate:"omitempty,max=64"`
|
||||
}
|
||||
|
||||
func (p CreateReviewChangeValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Type.required": "业务类型不能为空",
|
||||
"Type.oneof": "业务类型不对,1产品 2门店 3地址 4销售",
|
||||
"BizId.required": "业务ID不能为空",
|
||||
"BizId.min": "业务ID无效",
|
||||
"TaskId.max": "任务ID长度不能超过64",
|
||||
"AfterData.required": "修改后数据不能为空",
|
||||
"AdminId.min": "操作人ID无效",
|
||||
"AdminName.max": "操作人姓名长度不能超过64",
|
||||
}
|
||||
}
|
||||
|
||||
type SendMessageValidator struct {
|
||||
BizId int64 `validate:"required,min=1"`
|
||||
BizType uint32 `validate:"required,oneof=1 2 3 4"`
|
||||
Type uint32 `validate:"required,min=1"`
|
||||
Action uint32 `validate:"omitempty,oneof=0 1 2"`
|
||||
Reason string `validate:"omitempty,max=512"`
|
||||
Key string `validate:"omitempty,max=128"`
|
||||
}
|
||||
|
||||
func (p SendMessageValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"BizId.required": "业务ID不能为空",
|
||||
"BizId.min": "业务ID无效",
|
||||
"BizType.required": "业务类型不能为空",
|
||||
"BizType.oneof": "业务类型不对,1产品 2门店 3地址 4销售",
|
||||
"Type.required": "消息类型不能为空",
|
||||
"Type.min": "消息类型无效",
|
||||
"Action.oneof": "动作不对,0未用 1通过 2拒绝",
|
||||
"Reason.max": "原因长度不能超过512",
|
||||
"Key.max": "key长度不能超过128",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user