原料增加最大添加量限制
This commit is contained in:
@@ -52,16 +52,18 @@ type ListNutrientResponse struct {
|
||||
|
||||
// CreateRawMaterialRequest 创建原料的请求体
|
||||
type CreateRawMaterialRequest struct {
|
||||
Name string `json:"name" validate:"required,max=100"` // 原料名称
|
||||
Description string `json:"description" validate:"max=255"` // 描述
|
||||
ReferencePrice float32 `json:"reference_price"` // 参考价格(kg/元)
|
||||
Name string `json:"name" validate:"required,max=100"` // 原料名称
|
||||
Description string `json:"description" validate:"max=255"` // 描述
|
||||
ReferencePrice float32 `json:"reference_price"` // 参考价格(kg/元)
|
||||
MaxAdditionRatio float32 `json:"max_addition_ratio"` // 最大添加比例
|
||||
}
|
||||
|
||||
// UpdateRawMaterialRequest 更新原料的请求体
|
||||
type UpdateRawMaterialRequest struct {
|
||||
Name string `json:"name" validate:"required,max=100"` // 原料名称
|
||||
Description string `json:"description" validate:"max=255"` // 描述
|
||||
ReferencePrice float32 `json:"reference_price"` // 参考价格(kg/元)
|
||||
Name string `json:"name" validate:"required,max=100"` // 原料名称
|
||||
Description string `json:"description" validate:"max=255"` // 描述
|
||||
ReferencePrice float32 `json:"reference_price"` // 参考价格(kg/元)
|
||||
MaxAdditionRatio *float32 `json:"max_addition_ratio"` // 最大添加比例
|
||||
}
|
||||
|
||||
// RawMaterialNutrientDTO 原料营养素响应体
|
||||
@@ -78,6 +80,7 @@ type RawMaterialResponse struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ReferencePrice float32 `json:"reference_price"` // 参考价格(kg/元)
|
||||
MaxAdditionRatio float32 `json:"max_addition_ratio"` // 最大添加比例
|
||||
RawMaterialNutrients []RawMaterialNutrientDTO `json:"raw_material_nutrients"` // 关联的营养素信息
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user