Files
servicebase/pkg/req/app_user_friend.go
2025-11-18 17:48:20 +08:00

84 lines
1.4 KiB
Go

package req
import (
"errors"
)
type AppFriendList struct {
}
func (req *AppFriendList) Check() (err error) {
return nil
}
type AppFriendApplyList struct {
Page
Direct string `json:"direct"` // send 发出的申请 receive 收到的申请
}
func (req *AppFriendApplyList) Check() (err error) {
return nil
}
type AppFriendApply struct {
UserID string `json:"user_id"`
Message string `json:"message"`
}
func (req *AppFriendApply) Check() (err error) {
if len(req.UserID) == 0 {
err = errors.New("用户不能为空")
return
}
return nil
}
type AppFriendApplyAccept struct {
IDBody
Message string `json:"message"`
}
func (req *AppFriendApplyAccept) Check() (err error) {
return req.IDBody.Check()
}
type AppFriendApplyRefuse struct {
IDBody
Message string `json:"message"`
}
func (req *AppFriendApplyRefuse) Check() (err error) {
return req.IDBody.Check()
}
type AppFriendTopList struct {
}
func (req *AppFriendTopList) Check() (err error) {
return nil
}
type AppFriendTopAdd struct {
UserID string `json:"user_id"`
}
func (req *AppFriendTopAdd) Check() (err error) {
if len(req.UserID) == 0 {
err = errors.New("用户不能为空")
return
}
return nil
}
type AppFriendTopRemove struct {
UserID string `json:"user_id"`
}
func (req *AppFriendTopRemove) Check() (err error) {
if len(req.UserID) == 0 {
err = errors.New("用户不能为空")
return
}
return nil
}