syntax = "v1" info ( title: "collection"// TODO: add title desc: "收藏服务"// TODO: add description author: "" email: "" ) import "basic.api" service collection { //收藏产品 @handler CollectProductHandler post /api/collection/collect_product(CollectProductReq) returns (response); //删除收藏 @handler DeleteCollectProductHandler post /api/collection/delete_collect_product(DeleteCollectProductReq) returns (response); //获取收藏列表 @handler GetCollectProductListHandler get /api/collection/get_collect_product_list(GetCollectProductListReq) returns (response); } //收藏产品 type CollectProductReq { ProductId int64 `json:"product_id"` Logo string `json:"logo"` SelectColorIndex int64 `json:"select_color_index"` TemplateTag string `json:"template_tag"` } //删除收藏 type DeleteCollectProductReq { Ids []int64 `json:"ids"` } //获取收藏列表 type GetCollectProductListReq { CurrentPage int `form:"current_page"` } type GetCollectProductListRsp { Meta Meta `json:"meta"` //分页信息 List []GetCollectProductListRspItem `json:"list"` } type GetCollectProductListRspItem { Id int64 `json:"id"` ProductId int64 `json:"product_id"` ProductName string `json:"product_name"` Logo string `json:"logo"` Cover string `json:"cover"` CoverMetadata interface{} `json:"coverMetadata"` SelectColorIndex int64 `json:"select_color_index"` TemplateTag string `json:"template_tag"` SizeCount int64 `json:"size_count"` MinPrice string `json:"min_price"` IsShelf int64 `json:"is_shelf"` IsDeleted int64 `json:"is_deleted"` }