You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB
Plaintext

syntax = "v1"
type (
// Dictionary request | 字典查询请求
// swagger:parameters GetDictionaryListAdmin GetDictionaryAdmin
DictionaryReq {
BaseID
*Pagination
// 展示名称
Title string `json:"title,optional" form:"title,optional"`
// 搜索名称
Name string `json:"name,optional" form:"name,optional"`
// Keyword | 综合搜索关键字
Keyword string `json:"keyword,optional" form:"keyword,optional"`
}
// Dictionary list response | 字典列表返回
DictionaryListResp {
// Page | 分页数据
Page *Pagination `json:"page,optional"`
// List | 数据列表
List []*DictionaryInfo `json:"list"`
}
)
@server(
jwt: Auth
group: dictionary_admin
middleware: Authority
prefix: /api/admin/dictionary
)
service api {
// Create dictionary | 创建字典
@handler createDictionaryAdmin
post /create (DictionaryInfo) returns (BaseID)
// Update dictionary info | 更新字典信息
@handler updateDictionaryAdmin
post /update (DictionaryInfo)
// Get dictionary list | 获取字典列表
@handler getDictionaryListAdmin
get /list (DictionaryReq) returns (DictionaryListResp)
// Get dictionary | 获取字典
@handler getDictionaryAdmin
get / (DictionaryReq) returns (DictionaryInfo)
// Delete dictionary | 删除字典
@handler deleteDictionaryAdmin
delete / (BaseID)
}