feat: 添加购买分组功能,替代跨分类购物选项
This commit is contained in:
@@ -1,31 +1,43 @@
|
||||
package schemas
|
||||
|
||||
type CreateCategoryRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
ParentID *uint `json:"parent_id"`
|
||||
MinAmount *float64 `json:"min_amount"`
|
||||
MaxAmount *float64 `json:"max_amount"`
|
||||
MinQuantity *int `json:"min_quantity"`
|
||||
MaxQuantity *int `json:"max_quantity"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
MaxWeight *float64 `json:"max_weight"`
|
||||
AllowCrossCategory *bool `json:"allow_cross_category"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
ParentID *uint `json:"parent_id"`
|
||||
PurchaseGroupID *uint `json:"purchase_group_id"`
|
||||
MinAmount *float64 `json:"min_amount"`
|
||||
MaxAmount *float64 `json:"max_amount"`
|
||||
MinQuantity *int `json:"min_quantity"`
|
||||
MaxQuantity *int `json:"max_quantity"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
MaxWeight *float64 `json:"max_weight"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
}
|
||||
|
||||
type UpdateCategoryRequest struct {
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
ParentID *uint `json:"parent_id"`
|
||||
MinAmount *float64 `json:"min_amount"`
|
||||
MaxAmount *float64 `json:"max_amount"`
|
||||
MinQuantity *int `json:"min_quantity"`
|
||||
MaxQuantity *int `json:"max_quantity"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
MaxWeight *float64 `json:"max_weight"`
|
||||
AllowCrossCategory *bool `json:"allow_cross_category"`
|
||||
SortOrder *int `json:"sort_order"`
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
ParentID *uint `json:"parent_id"`
|
||||
PurchaseGroupID *uint `json:"purchase_group_id"`
|
||||
MinAmount *float64 `json:"min_amount"`
|
||||
MaxAmount *float64 `json:"max_amount"`
|
||||
MinQuantity *int `json:"min_quantity"`
|
||||
MaxQuantity *int `json:"max_quantity"`
|
||||
MinWeight *float64 `json:"min_weight"`
|
||||
MaxWeight *float64 `json:"max_weight"`
|
||||
SortOrder *int `json:"sort_order"`
|
||||
}
|
||||
|
||||
type CreatePurchaseGroupRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
}
|
||||
|
||||
type UpdatePurchaseGroupRequest struct {
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
SortOrder *int `json:"sort_order"`
|
||||
}
|
||||
|
||||
type CreateProductRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user