91 lines
3.2 KiB
Go
91 lines
3.2 KiB
Go
package data
|
||
|
||
import (
|
||
"erp/consts/data"
|
||
entity "erp/model/entity/data"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
)
|
||
|
||
// CreateAnchorReq 创建主播请求
|
||
type CreateAnchorReq struct {
|
||
g.Meta `path:"/createAnchor" method:"post" tags:"主播管理" summary:"创建主播" dc:"创建新的主播"`
|
||
Name string `json:"name" v:"required" dc:"主播姓名"`
|
||
Phone string `json:"phone" v:"required" dc:"联系电话"`
|
||
Code string `json:"code" v:"required" dc:"工号"`
|
||
Status int `json:"status" d:"1" dc:"状态(0停用 1正常)"`
|
||
Remark string `json:"remark" dc:"备注"`
|
||
}
|
||
|
||
// CreateAnchorRes 创建主播响应
|
||
type CreateAnchorRes struct {
|
||
Id int64 `json:"id,string" dc:"主播ID"`
|
||
}
|
||
|
||
// ListAnchorReq 获取主播列表请求
|
||
type ListAnchorReq struct {
|
||
g.Meta `path:"/listAnchors" method:"get" tags:"主播管理" summary:"获取主播列表" dc:"分页查询主播列表"`
|
||
*beans.Page
|
||
Id int64 `json:"id,string" dc:"主播ID"`
|
||
Name string `json:"name" dc:"主播姓名"`
|
||
Phone string `json:"phone" dc:"联系电话"`
|
||
Code string `json:"code" dc:"工号"`
|
||
Status *int `json:"status" dc:"状态(0停用 1正常)"`
|
||
Keyword string `json:"keyword" dc:"关键字(搜索姓名/电话/工号)"`
|
||
}
|
||
|
||
// ListAnchorRes 获取主播列表响应
|
||
type ListAnchorRes struct {
|
||
List []AnchorItem `json:"list" dc:"主播列表"`
|
||
Total int `json:"total" dc:"总数"`
|
||
}
|
||
|
||
// AnchorItem 主播列表项
|
||
type AnchorItem struct {
|
||
Id int64 `json:"id,string"`
|
||
Name string `json:"name"`
|
||
Phone string `json:"phone"`
|
||
Code string `json:"code"`
|
||
Status int `json:"status"`
|
||
StatusName string `json:"statusName"`
|
||
Remark string `json:"remark"`
|
||
CreatedAt int64 `json:"createdAt"`
|
||
UpdatedAt int64 `json:"updatedAt"`
|
||
}
|
||
|
||
// GetAnchorReq 获取主播详情请求
|
||
type GetAnchorReq struct {
|
||
g.Meta `path:"/getAnchor" method:"get" tags:"主播管理" summary:"获取主播详情" dc:"获取主播详情"`
|
||
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
|
||
}
|
||
|
||
// GetAnchorRes 获取主播详情响应
|
||
type GetAnchorRes struct {
|
||
*entity.Anchor
|
||
}
|
||
|
||
// UpdateAnchorReq 更新主播请求
|
||
type UpdateAnchorReq struct {
|
||
g.Meta `path:"/updateAnchor" method:"put" tags:"主播管理" summary:"更新主播" dc:"更新主播信息"`
|
||
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
|
||
Name string `json:"name" dc:"主播姓名"`
|
||
Phone string `json:"phone" dc:"联系电话"`
|
||
Code string `json:"code" dc:"工号"`
|
||
Status *int `json:"status" dc:"状态(0停用 1正常)"`
|
||
Remark string `json:"remark" dc:"备注"`
|
||
}
|
||
|
||
// DeleteAnchorReq 删除主播请求
|
||
type DeleteAnchorReq struct {
|
||
g.Meta `path:"/deleteAnchor" method:"delete" tags:"主播管理" summary:"删除主播" dc:"删除主播"`
|
||
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
|
||
}
|
||
|
||
// UpdateAnchorStatusReq 更新主播状态请求
|
||
type UpdateAnchorStatusReq struct {
|
||
g.Meta `path:"/updateAnchorStatus" method:"put" tags:"主播管理" summary:"更新主播状态" dc:"更新主播状态"`
|
||
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
|
||
Status data.AnchorStatus `json:"status" v:"required" dc:"状态(0停用 1正常)"`
|
||
}
|