src/Entity/PaymentCheck.php line 17

  1. <?php
  2. /*
  3.  *  @author Guerby Duval <info@tranzaksyon.com>
  4.  *  @link https://tranzaksyon.com
  5.  *  @copyright You are not allowed to remove this author "Guerby Duval <info@tranzaksyon.com>", the link "https://tranzaksyon.com" neither this copyright.
  6.  */
  7. namespace App\Entity;
  8. use App\Repository\PaymentCheckRepository;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. use Symfony\Component\Validator\Constraints\Length;
  12. use Symfony\Component\Validator\Constraints\NotBlank;
  13. #[ORM\Entity(repositoryClassPaymentCheckRepository::class)]
  14. class PaymentCheck
  15. {
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     #[Groups(['payment_check_out'])]
  20.     private ?int $id null;
  21.     #[ORM\Column(length8)]
  22.     #[NotBlank]
  23.     #[Length(max8)]
  24.     #[Groups(['payment_check_out''payment_check_in'])]
  25.     private ?string $checkNumber null;
  26.     #[ORM\Column(length20)]
  27.     #[NotBlank]
  28.     #[Groups(['payment_check_out''payment_check_in'])]
  29.     private ?string $checkBank null;
  30.     #[ORM\OneToOne(mappedBy'checkPayment'cascade: ['persist''remove'], orphanRemovaltrue)]
  31.     private ?SriPayment $sriPayment null;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getCheckNumber(): ?string
  37.     {
  38.         return $this->checkNumber;
  39.     }
  40.     public function setCheckNumber(?string $checkNumber): static
  41.     {
  42.         $this->checkNumber $checkNumber;
  43.         return $this;
  44.     }
  45.     public function getCheckBank(): ?string
  46.     {
  47.         return $this->checkBank;
  48.     }
  49.     public function setCheckBank(?string $checkBank): static
  50.     {
  51.         $this->checkBank $checkBank;
  52.         return $this;
  53.     }
  54.     public function getSriPayment(): ?SriPayment
  55.     {
  56.         return $this->sriPayment;
  57.     }
  58.     public function setSriPayment(?SriPayment $sriPayment): static
  59.     {
  60.         // unset the owning side of the relation if necessary
  61.         if ($sriPayment === null && $this->sriPayment !== null) {
  62.             $this->sriPayment->setCheckPayment(null);
  63.         }
  64.         // set the owning side of the relation if necessary
  65.         if ($sriPayment !== null && $sriPayment->getCheckPayment() !== $this) {
  66.             $sriPayment->setCheckPayment($this);
  67.         }
  68.         $this->sriPayment $sriPayment;
  69.         return $this;
  70.     }
  71. }