null])] private ?\DateTimeImmutable $createdAt = null; #[Serializer\Groups(['read'])] #[ORM\ManyToOne(targetEntity: User::class)] #[ORM\JoinColumn(nullable: true)] private ?User $createdBy = null; public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function getCreatedBy(): ?User { return $this->createdBy; } public function setCreatedAt(\DateTimeInterface $datetime): self { $this->createdAt = $datetime instanceof \DateTime ? \DateTimeImmutable::createFromMutable($datetime) : $datetime; return $this; } public function setCreatedBy(User $user): self { $this->createdBy = $user; return $this; } }