...
|
...
|
@@ -8,13 +8,40 @@ info( |
|
|
version: "v1"
|
|
|
)
|
|
|
|
|
|
@server(
|
|
|
prefix: v1/system
|
|
|
group: tags
|
|
|
jwt: SystemAuth
|
|
|
)
|
|
|
service Core {
|
|
|
@doc "后台创建文章标签"
|
|
|
@handler CreateTag
|
|
|
post /article_tag (TagCreateRequest) returns (TagCreateResponse)
|
|
|
|
|
|
@doc "后台编辑文章标签"
|
|
|
@handler EditTag
|
|
|
put /article_tag (TagEditRequest) returns (TagEditResponse)
|
|
|
|
|
|
@doc "后台获取文章标签"
|
|
|
@handler GetTag
|
|
|
get /article_tag/:id (TagGetRequest) returns (TagGetResponse)
|
|
|
|
|
|
@doc "后台删除文章标签"
|
|
|
@handler DeleteTag
|
|
|
delete /article_tag/:id (TagDeleteRequest) returns (TagDeleteResponse)
|
|
|
|
|
|
@doc "后台搜索标签"
|
|
|
@handler SearchTag
|
|
|
post/article_tag/search (TagListRequest) returns (TagListResponse)
|
|
|
}
|
|
|
|
|
|
// 创建标签
|
|
|
type (
|
|
|
TagCreateRequest {
|
|
|
CompanyId int64 `json:"companyId"`
|
|
|
CompanyId int64 `json:",optional"`
|
|
|
Image string `json:"image"`
|
|
|
Name string `json:"name"` // 标签名称
|
|
|
Group string `json:"group"` // 标签分类
|
|
|
Category string `json:"category"` // 标签分类
|
|
|
Remark string `json:"remark,optional"` // 备注
|
|
|
}
|
|
|
|
...
|
...
|
@@ -27,10 +54,10 @@ type ( |
|
|
type (
|
|
|
TagEditRequest {
|
|
|
Id int64 `json:"id"`
|
|
|
CompanyId int64 `json:"-"`
|
|
|
CompanyId int64 `json:",optional"`
|
|
|
Image string `json:"image"`
|
|
|
Name string `json:"name"` // 标签名称
|
|
|
Group string `json:"group"` // 标签分类
|
|
|
Category string `json:"category"` // 标签分类
|
|
|
Remark string `json:"remark,optional"` // 备注
|
|
|
}
|
|
|
|
...
|
...
|
@@ -43,13 +70,13 @@ type ( |
|
|
type (
|
|
|
TagGetRequest {
|
|
|
Id int64 `path:"id"`
|
|
|
CompanyId int64 `path:"-"`
|
|
|
CompanyId int64 `path:",optional"`
|
|
|
}
|
|
|
TagGetResponse {
|
|
|
Id int64 `json:"id"`
|
|
|
Image string `json:"image"`
|
|
|
Name string `json:"name"` // 标签名称
|
|
|
Group string `json:"group"` // 标签分类
|
|
|
Category string `json:"category"` // 标签分类
|
|
|
Remark string `json:"remark"` // 备注
|
|
|
}
|
|
|
)
|
...
|
...
|
@@ -59,9 +86,9 @@ type ( |
|
|
TagListRequest {
|
|
|
Page int `json:"page"`
|
|
|
Size int `json:"size"`
|
|
|
CompanyId int64 `json:"-"`
|
|
|
CompanyId int64 `json:",optional"`
|
|
|
TagName string `json:"tagName,optional"`
|
|
|
Group string `json:"group,optional"`
|
|
|
Category string `json:"category,optional"`
|
|
|
Remark string `json:"remark,optional"`
|
|
|
}
|
|
|
TagListResponse {
|
...
|
...
|
@@ -72,7 +99,7 @@ type ( |
|
|
Id int64 `json:"id"`
|
|
|
Image string `json:"image"`
|
|
|
Name string `json:"name"` // 标签名称
|
|
|
Group string `json:"group"` // 标签分类
|
|
|
Category string `json:"category"` // 标签分类
|
|
|
Remark string `json:"remark"` // 备注
|
|
|
CreatedAt int64 `json:"createdAt"`
|
|
|
}
|
...
|
...
|
@@ -82,36 +109,9 @@ type ( |
|
|
type (
|
|
|
TagDeleteRequest {
|
|
|
Id int64 `path:"id"`
|
|
|
CompanyId int64 `path:"-"`
|
|
|
CompanyId int64 `path:",optional"`
|
|
|
}
|
|
|
TagDeleteResponse {
|
|
|
Id int64 `json:"id"`
|
|
|
}
|
|
|
) |
|
|
\ No newline at end of file |
|
|
|
|
|
@server(
|
|
|
prefix: v1/system
|
|
|
group: tags
|
|
|
jwt: MiniAuth
|
|
|
)
|
|
|
service Core {
|
|
|
@doc "后台创建文章标签"
|
|
|
@handler CreateTag
|
|
|
post /article_tag (TagCreateRequest) returns (TagCreateResponse)
|
|
|
|
|
|
@doc "后台编辑文章标签"
|
|
|
@handler EditTag
|
|
|
put /article_tag (TagEditRequest) returns (TagEditResponse)
|
|
|
|
|
|
@doc "后台获取文章标签"
|
|
|
@handler GetTag
|
|
|
get /article_tag/:id (TagGetRequest) returns (TagGetResponse)
|
|
|
|
|
|
@doc "后台删除文章标签"
|
|
|
@handler DeleteTag
|
|
|
delete /article_tag/:id (TagDeleteRequest) returns (TagDeleteResponse)
|
|
|
|
|
|
@doc "后台搜索标签"
|
|
|
@handler SearchTag
|
|
|
post/article_tag/search (TagListRequest) returns (TagListResponse)
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|