fix_api
This commit is contained in:
@@ -11,22 +11,12 @@ import (
|
||||
)
|
||||
|
||||
type IUserV1 interface {
|
||||
FansList(ctx context.Context, req *v1.FansListReq) (res *v1.FansListRes, err error)
|
||||
FansView(ctx context.Context, req *v1.FansViewReq) (res *v1.FansViewRes, err error)
|
||||
FansUpdate(ctx context.Context, req *v1.FansUpdateReq) (res *v1.FansUpdateRes, err error)
|
||||
FansDelete(ctx context.Context, req *v1.FansDeleteReq) (res *v1.FansDeleteRes, err error)
|
||||
FansCreate(ctx context.Context, req *v1.FansCreateReq) (res *v1.FansCreateRes, err error)
|
||||
RoleCreate(ctx context.Context, req *v1.RoleCreateReq) (res *v1.RoleCreateRes, err error)
|
||||
RoleUpdate(ctx context.Context, req *v1.RoleUpdateReq) (res *v1.RoleUpdateRes, err error)
|
||||
RoleView(ctx context.Context, req *v1.RoleViewReq) (res *v1.RoleViewRes, err error)
|
||||
RoleList(ctx context.Context, req *v1.RoleListReq) (res *v1.RoleListRes, err error)
|
||||
RoleDelete(ctx context.Context, req *v1.RoleDeleteReq) (res *v1.RoleDeleteRes, err error)
|
||||
RolePermissionCheck(ctx context.Context, req *v1.RolePermissionCheckReq) (res *v1.RolePermissionCheckRes, err error)
|
||||
SubscribeList(ctx context.Context, req *v1.SubscribeListReq) (res *v1.SubscribeListRes, err error)
|
||||
SubscribeView(ctx context.Context, req *v1.SubscribeViewReq) (res *v1.SubscribeViewRes, err error)
|
||||
SubscribeUpdate(ctx context.Context, req *v1.SubscribeUpdateReq) (res *v1.SubscribeUpdateRes, err error)
|
||||
SubscribeDelete(ctx context.Context, req *v1.SubscribeDeleteReq) (res *v1.SubscribeDeleteRes, err error)
|
||||
SubscribeCreate(ctx context.Context, req *v1.SubscribeCreateReq) (res *v1.SubscribeCreateRes, err error)
|
||||
TraceList(ctx context.Context, req *v1.TraceListReq) (res *v1.TraceListRes, err error)
|
||||
TraceView(ctx context.Context, req *v1.TraceViewReq) (res *v1.TraceViewRes, err error)
|
||||
TraceUpdate(ctx context.Context, req *v1.TraceUpdateReq) (res *v1.TraceUpdateRes, err error)
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"TrangleAgent/internal/model/response"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// FansListItem 粉丝列表项
|
||||
type FansListItem struct {
|
||||
Id uint64 `json:"id" description:"自增主键"`
|
||||
UserId uint64 `json:"userId" description:"用户ID(被关注者,本人)"`
|
||||
FanId uint64 `json:"fanId" description:"粉丝用户ID"`
|
||||
Status int `json:"status" description:"状态:1=粉丝 0=取关/无效"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 fan_id 的备注/分组)"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
||||
|
||||
// FansListReq 粉丝列表请求参数
|
||||
type FansListReq struct {
|
||||
response.PageResult
|
||||
g.Meta `path:"/fans/list" method:"get" tags:"粉丝" summary:"粉丝列表"`
|
||||
UserId uint64 `json:"userId" v:"required#用户ID不能为空"`
|
||||
Status int `json:"status" description:"状态:1=粉丝 0=取关/无效"`
|
||||
}
|
||||
|
||||
// FansListRes 粉丝列表响应参数
|
||||
type FansListRes struct {
|
||||
response.PageResult
|
||||
List []*FansListItem `json:"list"`
|
||||
}
|
||||
|
||||
// FansViewReq 粉丝详情请求参数
|
||||
type FansViewReq struct {
|
||||
g.Meta `path:"/fans/view" method:"get" tags:"粉丝" summary:"粉丝详情"`
|
||||
Id uint64 `json:"id" v:"required#粉丝关系ID不能为空"`
|
||||
}
|
||||
|
||||
// FansViewRes 粉丝详情响应参数
|
||||
type FansViewRes struct {
|
||||
FansListItem
|
||||
}
|
||||
|
||||
// FansUpdateReq 粉丝更新请求参数
|
||||
type FansUpdateReq struct {
|
||||
g.Meta `path:"/fans/update" method:"put" tags:"粉丝" summary:"更新粉丝"`
|
||||
Id uint64 `json:"id" v:"required#粉丝关系ID不能为空"`
|
||||
Status int `json:"status" description:"状态:1=粉丝 0=取关/无效"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 fan_id 的备注/分组)"`
|
||||
}
|
||||
|
||||
// FansUpdateRes 粉丝更新响应参数
|
||||
type FansUpdateRes struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
// FansDeleteReq 粉丝删除请求参数
|
||||
type FansDeleteReq struct {
|
||||
g.Meta `path:"/fans/delete" method:"delete" tags:"粉丝" summary:"删除粉丝"`
|
||||
Id uint64 `json:"id" v:"required#粉丝关系ID不能为空"`
|
||||
}
|
||||
|
||||
// FansDeleteRes 粉丝删除响应参数
|
||||
type FansDeleteRes struct {
|
||||
}
|
||||
|
||||
// FansCreateReq 粉丝创建请求参数
|
||||
type FansCreateReq struct {
|
||||
g.Meta `path:"/fans/create" method:"post" tags:"粉丝" summary:"创建粉丝"`
|
||||
UserId uint64 `json:"userId" v:"required#用户ID不能为空"`
|
||||
FanId uint64 `json:"fanId" v:"required#粉丝用户ID不能为空"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 fan_id 的备注/分组)"`
|
||||
}
|
||||
|
||||
// FansCreateRes 粉丝创建响应参数
|
||||
type FansCreateRes struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"TrangleAgent/internal/model/response"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SubscribeListItem 关注列表项
|
||||
type SubscribeListItem struct {
|
||||
Id uint64 `json:"id" description:"自增主键"`
|
||||
UserId uint64 `json:"userId" description:"用户ID(关注者,本人)"`
|
||||
FollowId uint64 `json:"followId" description:"被关注的用户ID"`
|
||||
Status int `json:"status" description:"状态:1=关注中 0=取消关注"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 follow_id 的备注)"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
||||
|
||||
// SubscribeListReq 关注列表请求参数
|
||||
type SubscribeListReq struct {
|
||||
response.PageResult
|
||||
g.Meta `path:"/subscribe/list" method:"get" tags:"关注" summary:"关注列表"`
|
||||
UserId uint64 `json:"userId" v:"required#用户ID不能为空"`
|
||||
Status int `json:"status" description:"状态:1=关注中 0=取消关注"`
|
||||
FollowId uint64 `json:"followId" description:"被关注的用户ID"`
|
||||
}
|
||||
|
||||
// SubscribeListRes 关注列表响应参数
|
||||
type SubscribeListRes struct {
|
||||
response.PageResult
|
||||
List []*SubscribeListItem `json:"list"`
|
||||
}
|
||||
|
||||
// SubscribeViewReq 关注详情请求参数
|
||||
type SubscribeViewReq struct {
|
||||
g.Meta `path:"/subscribe/view" method:"get" tags:"关注" summary:"关注详情"`
|
||||
Id uint64 `json:"id" v:"required#关注关系ID不能为空"`
|
||||
}
|
||||
|
||||
// SubscribeViewRes 关注详情响应参数
|
||||
type SubscribeViewRes struct {
|
||||
SubscribeListItem
|
||||
}
|
||||
|
||||
// SubscribeUpdateReq 关注更新请求参数
|
||||
type SubscribeUpdateReq struct {
|
||||
g.Meta `path:"/subscribe/update" method:"put" tags:"关注" summary:"更新关注"`
|
||||
Id uint64 `json:"id" v:"required#关注关系ID不能为空"`
|
||||
Status int `json:"status" description:"状态:1=关注中 0=取消关注"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 follow_id 的备注)"`
|
||||
}
|
||||
|
||||
// SubscribeUpdateRes 关注更新响应参数
|
||||
type SubscribeUpdateRes struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
// SubscribeDeleteReq 关注删除请求参数
|
||||
type SubscribeDeleteReq struct {
|
||||
g.Meta `path:"/subscribe/delete" method:"delete" tags:"关注" summary:"删除关注"`
|
||||
Id uint64 `json:"id" v:"required#关注关系ID不能为空"`
|
||||
}
|
||||
|
||||
// SubscribeDeleteRes 关注删除响应参数
|
||||
type SubscribeDeleteRes struct {
|
||||
}
|
||||
|
||||
// SubscribeCreateReq 关注创建请求参数
|
||||
type SubscribeCreateReq struct {
|
||||
g.Meta `path:"/subscribe/create" method:"post" tags:"关注" summary:"创建关注"`
|
||||
UserId uint64 `json:"userId" v:"required#用户ID不能为空"`
|
||||
FollowId uint64 `json:"followId" v:"required#被关注用户ID不能为空"`
|
||||
Remark string `json:"remark" description:"备注名(user_id 对 follow_id 的备注)"`
|
||||
}
|
||||
|
||||
// SubscribeCreateRes 关注创建响应参数
|
||||
type SubscribeCreateRes struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
Reference in New Issue
Block a user