src/Entity/SagePaymentMethod.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SagePaymentMethodRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=SagePaymentMethodRepository::class)
  7.  * @ORM\HasLifecycleCallbacks
  8.  */
  9. class SagePaymentMethod
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=4)
  19.      */
  20.     private $sageCode;
  21.     /**
  22.      * @ORM\Column(type="string", length=50)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @ORM\Column(type="datetime", nullable=true)
  27.      */
  28.     private $syncDate;
  29.     /**
  30.      * @ORM\Column(type="datetime_immutable")
  31.      */
  32.     private $createdAt;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable")
  35.      */
  36.     private $updatedAt;
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getSageCode(): ?string
  42.     {
  43.         return $this->sageCode;
  44.     }
  45.     public function setSageCode(string $sageCode): self
  46.     {
  47.         $this->sageCode $sageCode;
  48.         return $this;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getSyncDate(): ?\DateTimeInterface
  60.     {
  61.         return $this->syncDate;
  62.     }
  63.     public function setSyncDate(?\DateTimeInterface $syncDate): self
  64.     {
  65.         $this->syncDate $syncDate;
  66.         return $this;
  67.     }
  68.     public function getCreatedAt(): ?\DateTimeImmutable
  69.     {
  70.         return $this->createdAt;
  71.     }
  72.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  73.     {
  74.         $this->createdAt $createdAt;
  75.         return $this;
  76.     }
  77.     public function getUpdatedAt(): ?\DateTimeImmutable
  78.     {
  79.         return $this->updatedAt;
  80.     }
  81.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  82.     {
  83.         $this->updatedAt $updatedAt;
  84.         return $this;
  85.     }
  86.     /**
  87.      * @ORM\PrePersist
  88.      */
  89.     public function prePersist(): void
  90.     {
  91.         $this->createdAt = new \DateTimeImmutable();
  92.         $this->updatedAt = new \DateTimeImmutable();
  93.     }
  94.     /**
  95.      * @ORM\PreUpdate
  96.      */
  97.     public function preUpdate(): void
  98.     {
  99.         $this->updatedAt = new \DateTimeImmutable();
  100.     }
  101. }