package usecases

import (
	"actatempus_backend/internal/domain/entities"
	"actatempus_backend/internal/domain/repositories"
)

type RegisterUserUseCase struct {
	userRepository repositories.UserRepository
}

func NewRegisterUserUseCase(userRepo repositories.UserRepository) *RegisterUserUseCase {
	return &RegisterUserUseCase{userRepository: userRepo}
}

func (uc *RegisterUserUseCase) Execute(name, email, password string) error {
	user := &entities.User{
		Name:     name,
		Email:    email,
		Password: password, // In der Realität: Passwörter hashen
	}
	return uc.userRepository.Create(user)
}
