src/Entity/VisitReportComment.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VisitReportCommentRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassVisitReportCommentRepository::class)]
  7. class VisitReportComment
  8. {
  9.     use IdentifiableTrait;
  10.     #[ORM\ManyToOne]
  11.     #[ORM\JoinColumn(nullablefalse)]
  12.     private ?User $user null;
  13.     #[ORM\Column]
  14.     private ?\DateTimeImmutable $created_at null;
  15.     #[ORM\Column(typeTypes::TEXT)]
  16.     private ?string $content null;
  17.     #[ORM\ManyToOne(inversedBy'comments')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?VisitReport $visitReport null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getUser(): ?User
  25.     {
  26.         return $this->user;
  27.     }
  28.     public function setUser(?User $user): static
  29.     {
  30.         $this->user $user;
  31.         return $this;
  32.     }
  33.     public function getCreatedAt(): ?\DateTimeImmutable
  34.     {
  35.         return $this->created_at;
  36.     }
  37.     public function setCreatedAt(\DateTimeImmutable $created_at): static
  38.     {
  39.         $this->created_at $created_at;
  40.         return $this;
  41.     }
  42.     public function getContent(): ?string
  43.     {
  44.         return $this->content;
  45.     }
  46.     public function setContent(string $content): static
  47.     {
  48.         $this->content $content;
  49.         return $this;
  50.     }
  51.     public function getVisitReport(): ?VisitReport
  52.     {
  53.         return $this->visitReport;
  54.     }
  55.     public function setVisitReport(?VisitReport $visitReport): static
  56.     {
  57.         $this->visitReport $visitReport;
  58.         return $this;
  59.     }
  60. }