feat: driver license check for teamers

closes #869bup9vf
This commit is contained in:
Björn Fromme
2026-03-15 12:42:28 +01:00
parent ebbefa0129
commit 20da6a0afc
32 changed files with 1095 additions and 6 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Model;
use App\Entity\Upload;
class DriverLicenseCheckDto
{
private Upload $upload;
private ?string $status;
private ?string $comment;
public function __construct(Upload $upload)
{
$this->upload = $upload;
$this->status = $upload->getStatus();
$this->comment = $upload->getComment();
}
public function getUpload(): Upload
{
return $this->upload;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): static
{
$this->status = $status;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): static
{
$this->comment = $comment;
return $this;
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Model;
use Symfony\Component\Validator\Constraints as Assert;
class DriverLicenseDeclarationDto
{
#[Assert\NotNull(message: 'Bitte gib an, ob du einen Führerschein hast.')]
private ?bool $hasDriverLicense = null;
public function __construct(?bool $hasDriverLicense = null)
{
$this->hasDriverLicense = $hasDriverLicense;
}
public function hasDriverLicense(): ?bool
{
return $this->hasDriverLicense;
}
public function setHasDriverLicense(?bool $hasDriverLicense): static
{
$this->hasDriverLicense = $hasDriverLicense;
return $this;
}
}
+13
View File
@@ -10,6 +10,7 @@ class TeamerFilterDto extends AbstractFilterDto
protected string $pickupId = '';
protected bool $skiLicense = false;
protected bool $snowboardLicense = false;
protected bool $driverLicenseVerified = false;
protected bool $noTrainings = false;
public function getName(): ?string
@@ -89,6 +90,18 @@ class TeamerFilterDto extends AbstractFilterDto
return $this->noTrainings;
}
public function hasDriverLicenseVerified(): bool
{
return $this->driverLicenseVerified;
}
public function setDriverLicenseVerified(bool $driverLicenseVerified): static
{
$this->driverLicenseVerified = $driverLicenseVerified;
return $this;
}
public function setNoTrainings(bool $noTrainings): void
{
$this->noTrainings = $noTrainings;