45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "餐厅服务"// TODO: add title
|
|
desc: // TODO: add description
|
|
author: "daming"
|
|
email: ""
|
|
)
|
|
import "basic.api"
|
|
service canteen {
|
|
//获取餐厅详情
|
|
@handler GetCanteenDetailHandler
|
|
post /canteen-type/detail(GetCanteenDetailReq) returns (response);
|
|
//保存餐厅类型关联产品数据
|
|
@handler SaveCanteenTypeProductHandler
|
|
post /canteen-type/save(SaveCanteenTypeProductReq) returns (response);
|
|
}
|
|
|
|
//获取餐厅详情
|
|
type GetCanteenDetailReq {
|
|
Id int64 `json:"id"`
|
|
}
|
|
type GetCanteenDetailRsp {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
ProductList []*CanteenProduct `json:"product_list"`
|
|
}
|
|
type CanteenProduct {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
SizeId int64 `json:"size_id"`
|
|
SId string `json:"s_id"`
|
|
}
|
|
//保存餐厅类型关联产品数据
|
|
type SaveCanteenTypeProductReq {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
ProductList []SaveCanteenProduct `json:"product_list"`
|
|
}
|
|
type SaveCanteenProduct {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
SizeId int64 `json:"size_id"`
|
|
SId string `json:"s_id"`
|
|
} |