<?php

namespace App\Entity;

use App\Repository\EtatLieuxReturnCommentRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: EtatLieuxReturnCommentRepository::class)]
class EtatLieuxReturnComment
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\Column(type: Types::TEXT)]
    private ?string $content = null;

    #[ORM\Column]
    private ?\DateTimeImmutable $createdAt = null;

    #[ORM\ManyToOne(inversedBy: 'commentsReturns')]
    #[ORM\JoinColumn(nullable: false)]
    private ?EtatLieux $etatLieux = null;

    public function __construct()
    {
        $this->createdAt = new \DateTimeImmutable();
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getContent(): ?string
    {
        return $this->content;
    }

    public function setContent(string $content): static
    {
        $this->content = $content;

        return $this;
    }

    public function getCreatedAt(): ?\DateTimeImmutable
    {
        return $this->createdAt;
    }

    public function setCreatedAt(\DateTimeImmutable $createdAt): static
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    public function getEtatLieux(): ?EtatLieux
    {
        return $this->etatLieux;
    }

    public function setEtatLieux(?EtatLieux $etatLieux): static
    {
        $this->etatLieux = $etatLieux;

        return $this;
    }
}
