feat(response):优化下拉选项
This commit is contained in:
1 parent
4297739e23
commit
e4f31eae5c
18 files changed
+649
-143
No files matched your search
@@ -52,6 +52,7 @@ type IAdminV1 interface {
|
||||
ChangelogDelete(ctx context.Context, req *v1.ChangelogDeleteReq) (res *v1.ChangelogDeleteRes, err error)
|
||||
ChangelogPublish(ctx context.Context, req *v1.ChangelogPublishReq) (res *v1.ChangelogPublishRes, err error)
|
||||
ChannelList(ctx context.Context, req *v1.ChannelListReq) (res *v1.ChannelListRes, err error)
|
||||
ChannelOptions(ctx context.Context, req *v1.ChannelOptionsReq) (res *v1.ChannelOptionsRes, err error)
|
||||
ChannelCreate(ctx context.Context, req *v1.ChannelCreateReq) (res *v1.ChannelCreateRes, err error)
|
||||
ChannelUpdate(ctx context.Context, req *v1.ChannelUpdateReq) (res *v1.ChannelUpdateRes, err error)
|
||||
ChannelDelete(ctx context.Context, req *v1.ChannelDeleteReq) (res *v1.ChannelDeleteRes, err error)
|
||||
|
||||
@@ -51,6 +51,24 @@ type ChannelItem struct {
|
||||
WorstModelScore float64 `json:"worst_model_score"`
|
||||
}
|
||||
|
||||
// ChannelOptionsReq 渠道选项列表请求(下拉选择专用,不分页)
|
||||
type ChannelOptionsReq struct {
|
||||
g.Meta `path:"/channels/options" method:"get" mime:"json" tags:"管理后台-渠道" summary:"渠道选项列表(不分页)"`
|
||||
}
|
||||
|
||||
// ChannelOptionsRes 渠道选项列表响应
|
||||
type ChannelOptionsRes struct {
|
||||
List []ChannelOptionItem `json:"list"`
|
||||
}
|
||||
|
||||
// ChannelOptionItem 渠道选项项(精简字段)
|
||||
type ChannelOptionItem struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type int `json:"type"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// ChannelCreateReq 创建渠道请求
|
||||
type ChannelCreateReq struct {
|
||||
g.Meta `path:"/channels" method:"post" mime:"json" tags:"管理后台-渠道" summary:"创建渠道"`
|
||||
|
||||
Reference in new issue
Block a user