feat: driver license check for teamers
closes #869bup9vf
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user