28 lines
538 B
Go
28 lines
538 B
Go
package request
|
|
|
|
import "errors"
|
|
|
|
type RelationInviteRequest struct {
|
|
BaseRequest
|
|
RelationId string
|
|
TargetUserId string
|
|
Message string
|
|
}
|
|
|
|
// 参数合法性检验
|
|
func (request *RelationInviteRequest) CheckParameter() (err error) {
|
|
if len(request.AccessToken) == 0 {
|
|
err = errors.New("AccessToken 不能为空")
|
|
return
|
|
}
|
|
if len(request.TargetUserId) == 0 {
|
|
err = errors.New("TargetUserId 不能为空")
|
|
return
|
|
}
|
|
if len(request.RelationId) == 0 {
|
|
err = errors.New("RelationId 不能为空")
|
|
return
|
|
}
|
|
return
|
|
}
|