add apis
CI / changes (push) Successful in 1m34s
CI / ad (push) Successful in 27s
CI / admin (push) Successful in 17s
CI / aiserver (push) Successful in 26s
CI / analysis (push) Successful in 22s
CI / bff (push) Successful in 21s
CI / chore (push) Successful in 20s
CI / equipment (push) Successful in 19s
CI / express (push) Successful in 19s
CI / factory (push) Successful in 19s
CI / message (push) Successful in 18s
CI / order (push) Successful in 19s
CI / payment (push) Successful in 17s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 19s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / store (push) Successful in 20s
CI / support (push) Successful in 19s
CI / task (push) Successful in 21s
CI / user (push) Successful in 22s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 21s
CI / ws (push) Successful in 9s
CI / changes (push) Successful in 1m34s
CI / ad (push) Successful in 27s
CI / admin (push) Successful in 17s
CI / aiserver (push) Successful in 26s
CI / analysis (push) Successful in 22s
CI / bff (push) Successful in 21s
CI / chore (push) Successful in 20s
CI / equipment (push) Successful in 19s
CI / express (push) Successful in 19s
CI / factory (push) Successful in 19s
CI / message (push) Successful in 18s
CI / order (push) Successful in 19s
CI / payment (push) Successful in 17s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 19s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / store (push) Successful in 20s
CI / support (push) Successful in 19s
CI / task (push) Successful in 21s
CI / user (push) Successful in 22s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 21s
CI / ws (push) Successful in 9s
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// PlanningEditValidator 创建/编辑
|
||||
type PlanningEditValidator struct {
|
||||
Name string `validate:"required"`
|
||||
Id int64
|
||||
BeginTime string
|
||||
EndTime string
|
||||
}
|
||||
|
||||
// GetMessage 创建 - 提示消息
|
||||
func (p PlanningEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Name.required": "名称不能为空",
|
||||
"Info.required": "信息不能为空",
|
||||
}
|
||||
}
|
||||
|
||||
type PlanningProductEditValidator struct {
|
||||
ProductCode string `validate:"required"`
|
||||
UseMg int32 `validate:"required"`
|
||||
PlanningId int64 `validate:"required"`
|
||||
}
|
||||
|
||||
// GetMessage 创建 - 提示消息
|
||||
func (p PlanningProductEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"ProductCode.required": "产品编码不能为空",
|
||||
"UseMg.required": "使用量不能为空",
|
||||
"PlanningId.required": "计划ID不能为空",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// ProductAddValidator 创建/编辑
|
||||
type ProductAddValidator struct {
|
||||
ProductCode string `json:"product_code" validate:"required"`
|
||||
ProductSerialNumber string `json:"product_serial_number" validate:"required"`
|
||||
}
|
||||
|
||||
// GetMessage 创建 - 提示消息
|
||||
func (p ProductAddValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"ProductCode.required": "产品编码不能为空",
|
||||
"ProductSerialNumber.required": "产品序列号不能为空",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// SettingEditValidator 创建/编辑
|
||||
type SettingEditValidator struct {
|
||||
Lang int32
|
||||
Language int32
|
||||
Wifi int32
|
||||
Screen int32
|
||||
Sound int32
|
||||
LightOpen int32
|
||||
LightWorkTime string
|
||||
LightBrightness int32
|
||||
ScreenSleepTime int32
|
||||
}
|
||||
|
||||
// GetMessage 创建 - 提示消息
|
||||
func (p SettingEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
// UdeLogAddValidator 创建/编辑
|
||||
type UdeLogAddValidator struct {
|
||||
ProductSerialNumber string `validate:"required"`
|
||||
Mg int32 `validate:"required"`
|
||||
Id int64
|
||||
}
|
||||
|
||||
// GetMessage 创建 - 提示消息
|
||||
func (p UdeLogAddValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"ProductSerialNumber.required": "产品编码不能为空",
|
||||
"Mg.required": "使用量不能为空",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user