116 lines
2.6 KiB
PHP
116 lines
2.6 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Entity\Input\QRCode;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* QRCode description
|
|
*/
|
|
class QRCode
|
|
{
|
|
#[Assert\NotBlank]
|
|
#[Assert\Iban(
|
|
message: 'messages.not_a_iban_number',
|
|
)]
|
|
private ?string $iban;
|
|
#[Assert\NotBlank(message: 'messages.fill_value')]
|
|
#[Assert\GreaterThanOrEqual(
|
|
'today', message: 'messages.invalid_date'
|
|
)]
|
|
private ?\DateTime $dueDate;
|
|
#[Assert\NotBlank(message: 'messages.fill_value')]
|
|
private ?string $message;
|
|
|
|
#[Assert\Valid]
|
|
#[Assert\NotBlank]
|
|
private ?QRCodeMoney $money;
|
|
#[Assert\Valid]
|
|
#[Assert\NotBlank]
|
|
private ?QRCodePaymentIdentification $paymentIdentification;
|
|
#[Assert\Valid]
|
|
#[Assert\NotBlank]
|
|
private readonly QRCodeQROptions $codeQROptions;
|
|
|
|
/**
|
|
* @param QRCodeQROptions $codeQROptions
|
|
* @param string|null $iban
|
|
* @param \DateTime|null $dueDate
|
|
* @param string|null $message
|
|
* @param QRCodeMoney|null $money
|
|
*/
|
|
public function __construct(
|
|
QRCodeQROptions $codeQROptions,
|
|
?string $iban = null,
|
|
?\DateTime $dueDate = null,
|
|
?string $message = null,
|
|
?QRCodeMoney $money = null)
|
|
{
|
|
$this->iban = $iban;
|
|
$this->dueDate = $dueDate;
|
|
$this->message = $message;
|
|
$this->money = $money;
|
|
$this->codeQROptions = $codeQROptions;
|
|
}
|
|
|
|
public function getIban(): ?string
|
|
{
|
|
return $this->iban;
|
|
}
|
|
|
|
public function setIban(?string $iban): void
|
|
{
|
|
$this->iban = $iban;
|
|
}
|
|
|
|
public function getDueDate(): ?\DateTime
|
|
{
|
|
return $this->dueDate;
|
|
}
|
|
|
|
public function setDueDate(?\DateTime $dueDate): void
|
|
{
|
|
$this->dueDate = $dueDate;
|
|
}
|
|
|
|
public function getMessage(): ?string
|
|
{
|
|
return $this->message;
|
|
}
|
|
|
|
public function setMessage(?string $message): void
|
|
{
|
|
$this->message = $message;
|
|
}
|
|
|
|
public function getMoney(): ?QRCodeMoney
|
|
{
|
|
return $this->money;
|
|
}
|
|
|
|
public function setMoney(?QRCodeMoney $money): void
|
|
{
|
|
$this->money = $money;
|
|
}
|
|
|
|
public function getCodeQROptions(): ?QRCodeQROptions
|
|
{
|
|
return $this->codeQROptions;
|
|
}
|
|
|
|
|
|
public function getPaymentIdentification(): ?QRCodePaymentIdentification
|
|
{
|
|
return $this->paymentIdentification;
|
|
}
|
|
|
|
public function setPaymentIdentification(?QRCodePaymentIdentification $paymentIdentification): void
|
|
{
|
|
$this->paymentIdentification = $paymentIdentification;
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|