<?php
namespace App\Entity\OnlinePayment;
use App\Validator\Constraints\PaymentSelected as AssertPaymentSelected;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\App\OnlinePayment\PaymentOrderRepository")
* @AssertPaymentSelected
*/
class PaymentOrder
{
public const STATUS_PENDING = 'PENDING';
public const STATUS_PAYED = 'PAYED';
public const STATUS_ERROR = 'ERROR';
public const STATUS_REFUSED = 'REFUSED';
/**
* @ORM\Id
* @ORM\Column(type="string", length=255)
*/
protected $id;
/**
* @ORM\Column(type="string", length=255)
*/
protected $customerNumber;
/**
* @ORM\Column(type="string", length=255)
*/
protected $status;
/**
* @ORM\Column(type="float")
*
* @var float
*/
protected $amount;
/**
* @ORM\Column(type="datetime")
*/
protected $transactionDate;
/**
* @ORM\Column(type="array")
*
* @var array
*/
protected $invoices = [];
/**
* @ORM\Column(type="array")
*
* @var array
*/
protected $deadlines = [];
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @var string
*/
protected $transactionStatus;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @var string
*/
protected $transactionCard;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @var string
*/
protected $transactionId;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*
* @var string
*/
protected $transactionReturn;
/**
* @return PaymentOrder
*/
public function setId(string $id): self
{
$this->id = $id;
return $this;
}
public function getId(): ?string
{
return $this->id;
}
public function getCustomerNumber(): ?string
{
return $this->customerNumber;
}
/**
* @return PaymentOrder
*/
public function setCustomerNumber(string $customerNumber): self
{
$this->customerNumber = $customerNumber;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
/**
* @return PaymentOrder
*/
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getAmount(): float
{
return $this->amount;
}
public function setAmount(float $amount): PaymentOrder
{
$this->amount = $amount;
return $this;
}
public function getTransactionDate(): ?\DateTimeInterface
{
return $this->transactionDate;
}
/**
* @return PaymentOrder
*/
public function setTransactionDate(\DateTimeInterface $transactionDate): self
{
$this->transactionDate = $transactionDate;
return $this;
}
public function getInvoices(): array
{
return $this->invoices;
}
/**
* @return PaymentOrder
*/
public function setInvoices(array $invoices): self
{
$this->invoices = $invoices;
return $this;
}
/**
* @return PaymentOrder
*/
public function addInvoice(string $invoiceNumber): self
{
$this->invoices[] = $invoiceNumber;
return $this;
}
public function getDeadlines(): array
{
return $this->deadlines;
}
/**
* @return PaymentOrder
*/
public function setDeadlines(array $deadlines): self
{
$this->deadlines = $deadlines;
return $this;
}
/**
* @return PaymentOrder
*/
public function addDeadline(string $deadlineId): self
{
$this->deadlines[] = $deadlineId;
return $this;
}
public function getTransactionStatus(): ?string
{
return $this->transactionStatus;
}
/**
* @return PaymentOrder
*/
public function setTransactionStatus(?string $transactionStatus): self
{
$this->transactionStatus = $transactionStatus;
return $this;
}
public function getTransactionCard(): ?string
{
return $this->transactionCard;
}
/**
* @return PaymentOrder
*/
public function setTransactionCard(?string $transactionCard): self
{
$this->transactionCard = $transactionCard;
return $this;
}
public function getTransactionId(): ?string
{
return $this->transactionId;
}
/**
* @return PaymentOrder
*/
public function setTransactionId(?string $transactionId): self
{
$this->transactionId = $transactionId;
return $this;
}
public function getTransactionReturn(): ?string
{
return $this->transactionReturn;
}
/**
* @return PaymentOrder
*/
public function setTransactionReturn(?string $transactionReturn): self
{
$this->transactionReturn = $transactionReturn;
return $this;
}
}