init project setup of the backend with dart and go as well as the frontend with nextjs

This commit is contained in:
2024-11-10 19:18:04 +01:00
parent d237057ac1
commit 338adc3b6f
15 changed files with 654 additions and 0 deletions
@@ -0,0 +1,19 @@
import 'package:backend_dart/domain/entities/user.dart';
import 'package:backend_dart/domain/repositories/user_repository.dart';
class RegisterUserUseCase {
final UserRepository userRepository;
RegisterUserUseCase(this.userRepository);
Future<void> execute(String name, String email, String password) async {
final user = User(
id: 'generated-id', // Eine Methode zur ID-Erzeugung einfügen
name: name,
email: email,
password: password, // In der Realität: Passwörter hashen
);
await userRepository.create(user);
}
}