fusenapi/server_api/product-model.api
laodaming 7f71afd8b0 fix
2023-06-26 16:53:36 +08:00

87 lines
2.6 KiB
Plaintext

syntax = "v1"
info (
title: "产品3d模型服务"// TODO: add title
desc: // TODO: add description
author: ""
email: ""
)
import "basic.api"
service product-model {
//获取产品模型详情
@handler GetModelDetailHandler
get /product-model/detail(GetModelDetailReq) returns (response);
//获取产品模型其他信息
@handler GetModelOtherInfoHandler
get /product-model/other-info(GetModelOtherInfoReq) returns (response);
//更新产品模型
@handler UpdateProductModelHandler
post /product-model/update-model(UpdateProductModelReq) returns (response);
}
//获取产品模型详情
type GetModelDetailReq {
ModelId int64 `form:"model_id"`
}
type GetModelDetailRsp {
Tag int64 `json:"tag"`
ProductModelInfo interface{} `json:"product_model_info"`
}
//获取产品模型其他信息
type GetModelOtherInfoReq {
ProductId int64 `form:"product_id,optional"`
}
type GetModelOtherInfoRsp {
LightList []LightListItem `json:"light_list"`
PartList []PartListItem `json:"part_list"`
}
type LightListItem {
Id int64 `json:"id"`
Name string `json:"name"`
Info interface{} `json:"info"`
}
type PartListItem {
Id int64 `json:"id"`
Name string `json:"name"`
MaterialImg string `json:"material_img"`
ModelInfo interface{} `json:"model_info"`
}
//更新产品模型
type UpdateProductModelReq {
ModelData ModelData `json:"modelData"`
LightData LightData `json:"lightData"`
}
type LightData {
Id int64 `json:"id"`
Name string `json:"name"`
Info LightInfo `json:"info"`
}
type LightInfo {
Name string `json:"name"`
Hdr map[string]interface{} `json:"hdr"`
LightData []map[string]interface{} `json:"lightData"`
}
type ModelData {
Id int64 `json:"id"`
Name string `json:"name"`
KnifeTerritory string `json:"knifeTerritory"`
Cover string `json:"cover"`
CameraData map[string]interface{} `json:"cameraData"`
ControlsData map[string]interface{} `json:"controlsData"`
Material map[string]interface{} `json:"material"`
ModelData map[string]interface{} `json:"modelData"`
LightList []int64 `json:"lightList"`
Parts int64 `json:"parts"`
PartsList []int64 `json:"partsList"`
Tag int64 `json:"tag"`
LightData int64 `json:"lightData"`
}
type UpdateProductModelRsp {
ModelId int64 `json:"modelId"`
LightId int64 `json:"lightId"`
LightList []int64 `json:"lightList"`
}