src/Entity/Request/RequestHistory.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Request;
  3. use App\Entity\User\User;
  4. use App\Repository\Request\RequestHistoryRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. #[ORM\Entity(repositoryClassRequestHistoryRepository::class)]
  9. class RequestHistory
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'requestHistories')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?RequestForm $requestForm null;
  18.     #[ORM\ManyToOne(inversedBy'requestHistories')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?RequestStatus $requestStatus null;
  21.     #[ORM\ManyToOne(inversedBy'requestHistories')]
  22.     private ?User $user null;
  23.     /**
  24.     * @Gedmo\Timestampable(on="create")
  25.     */
  26.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  27.     private ?\DateTimeInterface $dateCreated null;
  28.     public function __construct()
  29.     {
  30.         $this->dateCreated = new \DateTime();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getRequestForm(): ?RequestForm
  37.     {
  38.         return $this->requestForm;
  39.     }
  40.     public function setRequestForm(?RequestForm $requestForm): self
  41.     {
  42.         $this->requestForm $requestForm;
  43.         return $this;
  44.     }
  45.     public function getRequestStatus(): ?RequestStatus
  46.     {
  47.         return $this->requestStatus;
  48.     }
  49.     public function setRequestStatus(?RequestStatus $requestStatus): self
  50.     {
  51.         $this->requestStatus $requestStatus;
  52.         return $this;
  53.     }
  54.     public function getUser(): ?User
  55.     {
  56.         return $this->user;
  57.     }
  58.     public function setUser(?User $user): self
  59.     {
  60.         $this->user $user;
  61.         return $this;
  62.     }
  63.     public function getDateCreated(): ?\DateTimeInterface
  64.     {
  65.         return $this->dateCreated;
  66.     }
  67.     public function setDateCreated(?\DateTimeInterface $dateCreated): self
  68.     {
  69.         $this->dateCreated $dateCreated;
  70.         return $this;
  71.     }
  72. }