src/Entity/EditEvaluationHistory.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EditEvaluationHistoryRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassEditEvaluationHistoryRepository::class)]
  7. class EditEvaluationHistory
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?User $user null;
  16.     #[ORM\ManyToOne(inversedBy'editEvaluationHistories')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Evaluation $evaluation null;
  19.     #[ORM\Column]
  20.     private ?\DateTimeImmutable $updatedAt null;
  21.     public function __construct($user$evaluation)
  22.     {
  23.         $this->user $user;
  24.         $this->evaluation $evaluation;
  25.         $this->updatedAt = new DateTimeImmutable();
  26.     }
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getUser(): ?User
  32.     {
  33.         return $this->user;
  34.     }
  35.     public function setUser(?User $user): self
  36.     {
  37.         $this->user $user;
  38.         return $this;
  39.     }
  40.     public function getEvaluation(): ?Evaluation
  41.     {
  42.         return $this->evaluation;
  43.     }
  44.     public function setEvaluation(?Evaluation $evaluation): self
  45.     {
  46.         $this->evaluation $evaluation;
  47.         return $this;
  48.     }
  49.     public function getUpdatedAt(): ?\DateTimeImmutable
  50.     {
  51.         return $this->updatedAt;
  52.     }
  53.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  54.     {
  55.         $this->updatedAt $updatedAt;
  56.         return $this;
  57.     }
  58. }