2026-06-23 09:54:27 +00:00
|
|
|
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
|
2026-06-23 16:55:10 +00:00
|
|
|
SetActiveThreadsAccountID(ctx context.Context, tenantID, uid, accountID string) error
|
2026-06-23 09:54:27 +00:00
|
|
|
}
|