fusenapi/server_api/collection.api
laodaming ce31946e53 fix
2023-10-10 15:09:20 +08:00

70 lines
2.1 KiB
Plaintext

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);
//测试算法合图并发
@handler TestAiHandler
get /api/collection/test_ai(TestAiReq) returns (response);
//测试pdf
@handler TestPdfHandler
post /api/collection/test_pdf(TestPdfReq) 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"`
}
//测试算法
type TestAiReq {
Num int `form:"num"`
}
//测试pdf
type TestPdfReq {
Content string `json:"content"`
Type string `json:"type"`
}