Skip to content

Commit

Permalink
update: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor-Lan committed Aug 24, 2022
1 parent 9b837c5 commit 48cfed0
Show file tree
Hide file tree
Showing 9 changed files with 532 additions and 532 deletions.
179 changes: 89 additions & 90 deletions app/core/cmd/api/doc/config/dict.api
Original file line number Diff line number Diff line change
@@ -1,114 +1,113 @@
syntax = "v1"

info(
title: "字典"
desc: "字典"
author: "Trevor"
email: "trevorlan@163.com"
title: "字典"
desc: "字典"
author: "Trevor"
email: "trevorlan@163.com"
)

type (
ConfigDict {
Id int64 `json:"id"`
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
ConfigDictListResp {
DictList []ConfigDict `json:"list"`
}
ConfigDict {
Id int64 `json:"id"`
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
ConfigDictListResp {
DictList []ConfigDict `json:"list"`
}
)

type (
ConfigDictPageReq {
Page int64 `form:"page"`
Limit int64 `form:"limit"`
ParentId int64 `form:"parentId"`
}
ConfigDictPagination {
Page int64 `json:"page"`
Limit int64 `json:"limit"`
Total int64 `json:"total"`
}
ConfigDictPageResp {
ConfigDictList []ConfigDict `json:"list"`
Pagination ConfigDictPagination `json:"pagination"`
}
ConfigDictPageReq {
Page int64 `form:"page"`
Limit int64 `form:"limit"`
ParentId int64 `form:"parentId"`
}
ConfigDictPagination {
Page int64 `json:"page"`
Limit int64 `json:"limit"`
Total int64 `json:"total"`
}
ConfigDictPageResp {
ConfigDictList []ConfigDict `json:"list"`
Pagination ConfigDictPagination `json:"pagination"`
}
)

type (
AddConfigDictReq {
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
AddConfigDictReq {
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
)

type (
DeleteConfigDictReq {
Id int64 `json:"id"`
}
DeleteConfigDictReq {
Id int64 `json:"id"`
}
)

type (
UpdateConfigDictReq {
Id int64 `json:"id"`
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
UpdateConfigDictReq {
Id int64 `json:"id"`
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Type int64 `json:"type"`
UniqueKey string `json:"uniqueKey"`
Value string `json:"value"`
OrderNum int64 `json:"orderNum"`
Remark string `json:"remark"`
Status int64 `json:"status"`
}
)

@server(
jwt: JwtAuth
group : config/dict
prefix : /config/dict
middleware: PermMenuAuth
jwt: JwtAuth
group : config/dict
prefix : /config/dict
middleware: PermMenuAuth
)
service core-api {
@doc(
summary: "字典集"
)
@handler GetConfigDictList
get /list returns (ConfigDictListResp)

@doc(
summary: "分页字典"
)
@handler GetConfigDictPage
get /data/page (ConfigDictPageReq) returns (ConfigDictPageResp)


@doc(
summary: "新增字典"
)
@handler AddConfigDict
post /add (AddConfigDictReq)

@doc(
summary: "删除字典"
)
@handler DeleteConfigDict
post /delete (DeleteConfigDictReq)

@doc(
summary: "更新字典"
)
@handler UpdateConfigDict
post /update (UpdateConfigDictReq)
@doc(
summary: "字典列表"
)
@handler GetConfigDictList
get /list returns (ConfigDictListResp)

@doc(
summary: "分页字典数据"
)
@handler GetConfigDictPage
get /data/page (ConfigDictPageReq) returns (ConfigDictPageResp)

@doc(
summary: "新增字典"
)
@handler AddConfigDict
post /add (AddConfigDictReq)

@doc(
summary: "删除字典"
)
@handler DeleteConfigDict
post /delete (DeleteConfigDictReq)

@doc(
summary: "更新字典"
)
@handler UpdateConfigDict
post /update (UpdateConfigDictReq)
}
87 changes: 43 additions & 44 deletions app/core/cmd/api/doc/log/log.api
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
syntax = "v1"

info(
title: "日志"
desc: "日志"
author: "Trevor"
email: "trevorlan@163.com"
title: "日志"
desc: "日志"
author: "Trevor"
email: "trevorlan@163.com"
)

type (
LogLogin {
Id uint64 `json:"id"`
Account string `json:"account"`
Ip string `json:"ip"`
Uri string `json:"uri"`
Status int64 `json:"status"`
CreateTime string `json:"createTime"`
}
LogLoginPageReq {
Page int64 `form:"page"`
Limit int64 `form:"limit"`
}
LogLoginPagePagination {
Page int64 `json:"page"`
Limit int64 `json:"limit"`
Total int64 `json:"total"`
}
LogLoginPageResp {
LogLoginList []LogLogin `json:"list"`
Pagination LogLoginPagePagination `json:"pagination"`
}
LogLogin {
Id uint64 `json:"id"`
Account string `json:"account"`
Ip string `json:"ip"`
Uri string `json:"uri"`
Status int64 `json:"status"`
CreateTime string `json:"createTime"`
}
LogLoginPageReq {
Page int64 `form:"page"`
Limit int64 `form:"limit"`
}
LogLoginPagePagination {
Page int64 `json:"page"`
Limit int64 `json:"limit"`
Total int64 `json:"total"`
}
LogLoginPageResp {
LogLoginList []LogLogin `json:"list"`
Pagination LogLoginPagePagination `json:"pagination"`
}
)

type (
DeleteLogLoginReq {
Id uint64 `json:"id"`
}
DeleteLogLoginReq {
Id uint64 `json:"id"`
}
)


@server(
jwt: JwtAuth
group : log/login
prefix : /log/login
middleware: PermMenuAuth
jwt: JwtAuth
group : log/login
prefix : /log/login
middleware: PermMenuAuth
)
service core-api {
@doc(
summary: "分页日志"
)
@handler GetLogLoginPage
get /page (LogLoginPageReq) returns (LogLoginPageResp)

@doc(
summary: "删除日志"
)
@handler DeleteLogLogin
post /delete (DeleteLogLoginReq)
@doc(
summary: "分页日志"
)
@handler GetLogLoginPage
get /page (LogLoginPageReq) returns (LogLoginPageResp)
@doc(
summary: "删除日志"
)
@handler DeleteLogLogin
post /delete (DeleteLogLoginReq)
}
Loading

0 comments on commit 48cfed0

Please sign in to comment.