mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
979 B
28 lines
979 B
package core
|
|
|
|
import (
|
|
"github.com/rocboss/paopao-ce/internal/model"
|
|
"github.com/rocboss/paopao-ce/internal/model/rest"
|
|
)
|
|
|
|
// UserManageService 用户管理服务
|
|
type UserManageService interface {
|
|
GetUserByID(id int64) (*model.User, error)
|
|
GetUserByUsername(username string) (*model.User, error)
|
|
GetUserByPhone(phone string) (*model.User, error)
|
|
GetUsersByIDs(ids []int64) ([]*model.User, error)
|
|
GetUsersByKeyword(keyword string) ([]*model.User, error)
|
|
CreateUser(user *model.User) (*model.User, error)
|
|
UpdateUser(user *model.User) error
|
|
}
|
|
|
|
// ContactManageService 联系人管理服务
|
|
type ContactManageService interface {
|
|
RequestingFriend(userId int64, friendId int64, greetings string) error
|
|
AddFriend(userId int64, friendId int64) error
|
|
RejectFriend(userId int64, friendId int64) error
|
|
DeleteFriend(userId int64, friendId int64) error
|
|
GetContacts(userId int64, offset int, limit int) (*rest.ContactsResp, error)
|
|
IsFriend(userID int64, friendID int64) bool
|
|
}
|