fusenapi/server_api/product-template.api

87 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-06-20 08:38:03 +00:00
syntax = "v1"
info (
2023-06-25 03:28:37 +00:00
title: "产品模板底图服务"// TODO: add title
2023-06-20 08:38:03 +00:00
desc: // TODO: add description
author: ""
email: ""
)
2023-06-21 08:39:55 +00:00
2023-06-20 08:38:03 +00:00
import "basic.api"
2023-06-21 08:39:55 +00:00
2023-06-25 06:11:47 +00:00
service product-template {
2023-06-20 08:38:03 +00:00
//获取产品模板详情
@handler GetTemplatevDetailHandler
2023-07-12 03:09:43 +00:00
get /api/product-template/detail(GetTemplatevDetailReq) returns (response);
2023-06-21 07:06:09 +00:00
//获取底图列表
@handler GetBaseMapListHandler
2023-07-12 03:09:43 +00:00
get /api/product-template/base-map-list( ) returns (response);
2023-06-25 03:28:37 +00:00
//底图批量保存
2023-06-21 08:35:43 +00:00
@handler SaveBaseMapHandler
2023-07-12 03:09:43 +00:00
post /api/product-template/base-map-update ( ) returns (response);
2023-06-25 03:28:37 +00:00
//新增底图
@handler AddBaseMapHandler
2023-07-12 03:09:43 +00:00
post /api/product-template/base-map-add (AddBaseMapReq) returns (response);
2023-06-25 03:28:37 +00:00
//更新模板
@handler UpdateTemplateHandler
2023-07-12 03:09:43 +00:00
post /api/product-template/update-template (UpdateTemplateReq) returns (response);
2023-06-20 08:38:03 +00:00
}
//获取产品模板详情
type GetTemplatevDetailReq {
ModelId int64 `form:"model_id"`
TemplateId int64 `form:"template_id"`
}
type GetTemplatevDetailRsp {
2023-06-20 11:56:18 +00:00
ProductModelInfo interface{} `json:"product_model_info"`
ProductTemplate interface{} `json:"product_template"`
LightList []*Light `json:"light_list"`
OptionModelInfo []interface{} `json:"option_model_info"`
Tag int64 `json:"tag"`
2023-06-20 08:38:03 +00:00
}
type Tag {
Id int64 `json:"id"`
Title string `json:"title"`
}
2023-06-20 11:56:18 +00:00
type Light {
Id int64 `json:"id"`
Info interface{} `json:"info"`
2023-06-21 07:06:09 +00:00
}
//获取底图列表
type GetBaseMapListRsp {
Id int64 `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Ctime string `json:"ctime"`
2023-06-21 08:35:43 +00:00
}
//保存底图信息
type SaveBaseMapReq {
Id int64 `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Ctime string `json:"ctime"`
2023-06-25 03:28:37 +00:00
}
//新增底图
type AddBaseMapReq {
Name string `json:"name"`
Url string `json:"url"`
}
//更新模板
type UpdateTemplateReq {
2023-06-25 04:16:01 +00:00
ModelId int64 `json:"modelId"`
TemplateData *TemplateData `json:"templateData"`
2023-06-25 03:28:37 +00:00
}
type TemplateData {
2023-06-25 04:16:01 +00:00
Id int64 `json:"id"`
Name string `json:"name"`
Cover string `json:"cover"`
IsPublic bool `json:"isPublic"`
Material string `json:"material"`
MaterialList []map[string]interface{} `json:"materialList"`
2023-06-25 03:28:37 +00:00
}
type UpdateTemplateRsp {
ModelId int64 `json:"modelId"`
TemplateId int64 `json:"templateId"`
2023-06-20 08:38:03 +00:00
}