Personal data and password change

This commit is contained in:
2026-04-26 01:15:58 +02:00
parent f4ea07d82c
commit 5bcdc2fb5d
20 changed files with 620 additions and 26 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Domains\Dashboard\Actions\UpdatePersonalData;
use App\Repositories\UserRepository;
class UpdatePersonalDataCommand
{
public function __construct(
private readonly UpdatePersonalDataRequest $request,
private readonly UserRepository $users
) {}
public function execute(): UpdatePersonalDataResponse
{
$this->users->updatePersonalData($this->request);
$response = new UpdatePersonalDataResponse();
$response->success = true;
return $response;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Domains\Dashboard\Actions\UpdatePersonalData;
use App\Models\User;
class UpdatePersonalDataRequest
{
public function __construct(
public readonly User $user,
public readonly ?string $nickname,
public readonly ?string $email,
public readonly ?string $phone,
public readonly ?string $address1,
public readonly ?string $address2,
public readonly ?string $postcode,
public readonly ?string $city,
public readonly ?string $birthday,
public readonly ?string $tetanusVaccination,
public readonly ?string $medications,
public readonly ?string $allergies,
public readonly ?string $intolerances,
public readonly ?string $eatingHabits,
public readonly ?string $swimmingPermission,
public readonly ?string $firstAidPermission,
public readonly ?string $bankAccountOwner,
public readonly ?string $bankAccountIban,
) {}
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Domains\Dashboard\Actions\UpdatePersonalData;
class UpdatePersonalDataResponse
{
public bool $success;
}