feat: add shipping template management and update favicon
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package schemas
|
||||
|
||||
// CreateShippingTemplateRequest 创建运费模板请求
|
||||
type CreateShippingTemplateRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
CalcType string `json:"calc_type" binding:"required,oneof=weight piece"`
|
||||
FirstUnit float64 `json:"first_unit" binding:"required,gt=0"`
|
||||
FirstFee float64 `json:"first_fee" binding:"gte=0"`
|
||||
AdditionalUnit float64 `json:"additional_unit" binding:"required,gt=0"`
|
||||
AdditionalFee float64 `json:"additional_fee" binding:"gte=0"`
|
||||
FreeAmount float64 `json:"free_amount"`
|
||||
Provinces []string `json:"provinces"` // 省份列表
|
||||
IsDefault bool `json:"is_default"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
}
|
||||
|
||||
// UpdateShippingTemplateRequest 更新运费模板请求
|
||||
type UpdateShippingTemplateRequest struct {
|
||||
Name *string `json:"name"`
|
||||
CalcType *string `json:"calc_type" binding:"omitempty,oneof=weight piece"`
|
||||
FirstUnit *float64 `json:"first_unit" binding:"omitempty,gt=0"`
|
||||
FirstFee *float64 `json:"first_fee" binding:"omitempty,gte=0"`
|
||||
AdditionalUnit *float64 `json:"additional_unit" binding:"omitempty,gt=0"`
|
||||
AdditionalFee *float64 `json:"additional_fee" binding:"omitempty,gte=0"`
|
||||
FreeAmount *float64 `json:"free_amount"`
|
||||
Provinces []string `json:"provinces"`
|
||||
IsDefault *bool `json:"is_default"`
|
||||
SortOrder *int `json:"sort_order"`
|
||||
}
|
||||
Reference in New Issue
Block a user