feat: driver license check for teamers
closes #869bup9vf
This commit is contained in:
1 parent
ebbefa0129
commit
20da6a0afc
32 files changed
+1095
-6
No files matched your search
+111
-1
@@ -23,6 +23,11 @@ class Teamer implements TimestampableEntityInterface
|
||||
public const STATUS_NEW = 'new';
|
||||
public const STATUS_EXISTING = 'existing';
|
||||
|
||||
public const DRIVER_LICENSE_STATUS_NONE = 'none';
|
||||
public const DRIVER_LICENSE_STATUS_PENDING_REVIEW = 'pending_review';
|
||||
public const DRIVER_LICENSE_STATUS_APPROVED = 'approved';
|
||||
public const DRIVER_LICENSE_STATUS_DENIED = 'denied';
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
@@ -140,6 +145,27 @@ class Teamer implements TimestampableEntityInterface
|
||||
#[ORM\Column]
|
||||
private bool $allowOverlappingApplications = false;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?bool $driverLicenseDeclaration = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private bool $driverLicenseVerified = false;
|
||||
|
||||
#[ORM\Column(length: 64)]
|
||||
private string $driverLicenseStatus = self::DRIVER_LICENSE_STATUS_NONE;
|
||||
|
||||
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
|
||||
private ?Upload $driverLicenseUpload = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $driverLicenseReviewComment = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
||||
private ?\DateTimeImmutable $driverLicenseReviewedAt = null;
|
||||
|
||||
#[ORM\Column(length: 8, nullable: true)]
|
||||
private ?string $driverLicenseReviewedBy = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uuid = Uuid::v4();
|
||||
@@ -750,7 +776,91 @@ class Teamer implements TimestampableEntityInterface
|
||||
|
||||
public function hasPickup(int $pickupId): bool
|
||||
{
|
||||
return in_array($pickupId, $this->getPickups());
|
||||
return true === in_array($pickupId, $this->getPickups(), true);
|
||||
}
|
||||
|
||||
public function getDriverLicenseDeclaration(): ?bool
|
||||
{
|
||||
return $this->driverLicenseDeclaration;
|
||||
}
|
||||
|
||||
public function setDriverLicenseDeclaration(?bool $driverLicenseDeclaration): static
|
||||
{
|
||||
$this->driverLicenseDeclaration = $driverLicenseDeclaration;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isDriverLicenseVerified(): bool
|
||||
{
|
||||
return $this->driverLicenseVerified;
|
||||
}
|
||||
|
||||
public function setDriverLicenseVerified(bool $driverLicenseVerified): static
|
||||
{
|
||||
$this->driverLicenseVerified = $driverLicenseVerified;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDriverLicenseStatus(): string
|
||||
{
|
||||
return $this->driverLicenseStatus;
|
||||
}
|
||||
|
||||
public function setDriverLicenseStatus(string $driverLicenseStatus): static
|
||||
{
|
||||
$this->driverLicenseStatus = $driverLicenseStatus;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDriverLicenseUpload(): ?Upload
|
||||
{
|
||||
return $this->driverLicenseUpload;
|
||||
}
|
||||
|
||||
public function setDriverLicenseUpload(?Upload $driverLicenseUpload): static
|
||||
{
|
||||
$this->driverLicenseUpload = $driverLicenseUpload;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDriverLicenseReviewComment(): ?string
|
||||
{
|
||||
return $this->driverLicenseReviewComment;
|
||||
}
|
||||
|
||||
public function setDriverLicenseReviewComment(?string $driverLicenseReviewComment): static
|
||||
{
|
||||
$this->driverLicenseReviewComment = $driverLicenseReviewComment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDriverLicenseReviewedAt(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->driverLicenseReviewedAt;
|
||||
}
|
||||
|
||||
public function setDriverLicenseReviewedAt(?\DateTimeImmutable $driverLicenseReviewedAt): static
|
||||
{
|
||||
$this->driverLicenseReviewedAt = $driverLicenseReviewedAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDriverLicenseReviewedBy(): ?string
|
||||
{
|
||||
return $this->driverLicenseReviewedBy;
|
||||
}
|
||||
|
||||
public function setDriverLicenseReviewedBy(?string $driverLicenseReviewedBy): static
|
||||
{
|
||||
$this->driverLicenseReviewedBy = $driverLicenseReviewedBy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLanguage(): ?string
|
||||
|
||||
Reference in new issue
Block a user