haixunMaster/haixun-backend/internal/model/member/domain/usecase/member.go

48 lines
1.0 KiB
Go
Raw Normal View History

2026-06-23 09:54:27 +00:00
package usecase
import (
"context"
"haixun-backend/internal/model/member/domain/entity"
)
type RegisterRequest struct {
TenantID string
Email string
Password string
DisplayName string
Language string
}
type LoginRequest struct {
TenantID string
Email string
Password string
}
type UpdateProfileRequest struct {
TenantID string
UID string
DisplayName *string
Avatar *string
Language *string
Currency *string
Phone *string
}
type AuthToken struct {
AccessToken string
RefreshToken string
ExpiresIn int64
UID string
TokenType string
}
type UseCase interface {
Register(ctx context.Context, req RegisterRequest) (*entity.Member, *AuthToken, error)
Login(ctx context.Context, req LoginRequest) (*entity.Member, *AuthToken, error)
GetByUID(ctx context.Context, tenantID, uid string) (*entity.Member, error)
UpdateProfile(ctx context.Context, req UpdateProfileRequest) (*entity.Member, 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
}