25 lines
721 B
Go
25 lines
721 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"haixun-backend/internal/model/member/domain/entity"
|
|
)
|
|
|
|
type ProfileUpdate struct {
|
|
DisplayName *string
|
|
Avatar *string
|
|
Language *string
|
|
Currency *string
|
|
Phone *string
|
|
}
|
|
|
|
type Repository interface {
|
|
EnsureIndexes(ctx context.Context) error
|
|
Create(ctx context.Context, member *entity.Member) (*entity.Member, error)
|
|
FindByUID(ctx context.Context, tenantID, uid string) (*entity.Member, error)
|
|
FindByEmail(ctx context.Context, tenantID, email string) (*entity.Member, error)
|
|
UpdateProfile(ctx context.Context, tenantID, uid string, update ProfileUpdate) (*entity.Member, error)
|
|
SetRoles(ctx context.Context, tenantID, uid string, roles []string) error
|
|
}
|