29 lines
884 B
Go
29 lines
884 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
"mylomen_server/common/dto"
|
|
)
|
|
|
|
type gUserRepository interface {
|
|
FindByReq(ctx context.Context, req dto.LoginReq) *UserDO
|
|
|
|
FindById(ctx context.Context, id int64) *UserDO
|
|
//FindByAccount 根据 account 查询用户
|
|
FindByAccount(ctx context.Context, account string) *UserDO
|
|
FindByEmail(ctx context.Context, email string) *UserDO
|
|
FindByPhone(ctx context.Context, phone string) *UserDO
|
|
FindByWxId(ctx context.Context, wxId string) *UserDO
|
|
FindByQqId(ctx context.Context, qqId string) *UserDO
|
|
FindByGoogleId(ctx context.Context, googleId string) *UserDO
|
|
FindByFacebookId(ctx context.Context, facebookId string) *UserDO
|
|
|
|
//Create 创建用户
|
|
Create(ctx context.Context, data *UserDO) error
|
|
|
|
//UpdateById 根据ID更新用户
|
|
UpdateById(ctx context.Context, data *UserDO) error
|
|
}
|
|
|
|
var GUser gUserRepository = new(gUserRepositoryImpl)
|