This commit is contained in:
2026-01-18 21:52:04 +08:00
parent ff4e069a7e
commit c62b4c04ec
147 changed files with 820 additions and 2028 deletions

View File

@@ -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"`
}

View File

@@ -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"`
}