package commands // CreateProductCommand 创建产品命令 type CreateProductCommand struct { Name string `json:"name" binding:"required" comment:"产品名称"` Code string `json:"code" binding:"required" comment:"产品编号"` Description string `json:"description" comment:"产品简介"` Content string `json:"content" comment:"产品内容"` CategoryID string `json:"category_id" binding:"required" comment:"产品分类ID"` Price float64 `json:"price" binding:"min=0" comment:"产品价格"` IsEnabled bool `json:"is_enabled" comment:"是否启用"` IsVisible bool `json:"is_visible" comment:"是否展示"` IsPackage bool `json:"is_package" comment:"是否组合包"` // SEO信息 SEOTitle string `json:"seo_title" comment:"SEO标题"` SEODescription string `json:"seo_description" comment:"SEO描述"` SEOKeywords string `json:"seo_keywords" comment:"SEO关键词"` } // UpdateProductCommand 更新产品命令 type UpdateProductCommand struct { ID string `json:"-"` Name string `json:"name" comment:"产品名称"` Code string `json:"code" comment:"产品编号"` Description string `json:"description" comment:"产品简介"` Content string `json:"content" comment:"产品内容"` CategoryID string `json:"category_id" comment:"产品分类ID"` Price float64 `json:"price" binding:"min=0" comment:"产品价格"` IsEnabled *bool `json:"is_enabled" comment:"是否启用"` IsVisible *bool `json:"is_visible" comment:"是否展示"` IsPackage *bool `json:"is_package" comment:"是否组合包"` // SEO信息 SEOTitle string `json:"seo_title" comment:"SEO标题"` SEODescription string `json:"seo_description" comment:"SEO描述"` SEOKeywords string `json:"seo_keywords" comment:"SEO关键词"` } // DeleteProductCommand 删除产品命令 type DeleteProductCommand struct { ID string `json:"-"` } // EnableProductCommand 启用产品命令 type EnableProductCommand struct { ID string `json:"-"` } // DisableProductCommand 禁用产品命令 type DisableProductCommand struct { ID string `json:"-"` } // ShowProductCommand 显示产品命令 type ShowProductCommand struct { ID string `json:"-"` } // HideProductCommand 隐藏产品命令 type HideProductCommand struct { ID string `json:"-"` } // UpdateProductSEOCommand 更新产品SEO信息命令 type UpdateProductSEOCommand struct { ID string `json:"-"` SEOTitle string `json:"seo_title" comment:"SEO标题"` SEODescription string `json:"seo_description" comment:"SEO描述"` SEOKeywords string `json:"seo_keywords" comment:"SEO关键词"` }