<?phpnamespace App\Entity;use App\Repository\ComplainRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Doctrine\ORM\Mapping\HasLifecycleCallbacks;#[ORM\Entity(repositoryClass: ComplainRepository::class)]#[HasLifecycleCallbacks]class Complain{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $body = null; #[ORM\Column(length: 50, nullable: true)] private ?string $author = null; #[ORM\Column(length: 25, nullable: true)] private ?string $type = null; #[ORM\Column] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column] private ?\DateTimeImmutable $updatedAt = null; 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 setCreatedAtValue(): void { $this->createdAt = new \DateTimeImmutable(); $this->setUpdatedAtValue(); } #[ORM\PreUpdate] public function setUpdatedAtValue(): void { $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getBody(): ?string { return $this->body; } public function setBody(?string $body): static { $this->body = $body; return $this; } public function getAuthor(): ?string { return $this->author; } public function setAuthor(?string $author): static { $this->author = $author; return $this; } public function getType(): ?string { return $this->type; } public function setType(?string $type): static { $this->type = $type; return $this; }}