<?phpnamespace App\Entity;use App\Repository\SagePaymentMethodRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=SagePaymentMethodRepository::class) * @ORM\HasLifecycleCallbacks */class SagePaymentMethod{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=4) */ private $sageCode; /** * @ORM\Column(type="string", length=50) */ private $name; /** * @ORM\Column(type="datetime", nullable=true) */ private $syncDate; /** * @ORM\Column(type="datetime_immutable") */ private $createdAt; /** * @ORM\Column(type="datetime_immutable") */ private $updatedAt; public function getId(): ?int { return $this->id; } public function getSageCode(): ?string { return $this->sageCode; } public function setSageCode(string $sageCode): self { $this->sageCode = $sageCode; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getSyncDate(): ?\DateTimeInterface { return $this->syncDate; } public function setSyncDate(?\DateTimeInterface $syncDate): self { $this->syncDate = $syncDate; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } /** * @ORM\PrePersist */ public function prePersist(): void { $this->createdAt = new \DateTimeImmutable(); $this->updatedAt = new \DateTimeImmutable(); } /** * @ORM\PreUpdate */ public function preUpdate(): void { $this->updatedAt = new \DateTimeImmutable(); }}