src/Entity/Transfers.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TransfersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=TransfersRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class Transfers
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="date")
  19.      */
  20.     private $transferDate;
  21.     /**
  22.      * @ORM\Column(type="datetime", nullable=true)
  23.      */
  24.     private $receptionDate;
  25.     /**
  26.      * @ORM\Column(type="datetime")
  27.      */
  28.     private $createdAt;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $updatedAt;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Car::class)
  35.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  36.      */
  37.     private $car;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Destinations::class, inversedBy="transfers")
  40.      * @ORM\JoinColumn(nullable=false)
  41.      */
  42.     private $destination;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $description;
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getDestination(): ?Destinations
  52.     {
  53.         return $this->destination;
  54.     }
  55.     public function setDestination(?Destinations $destination): self
  56.     {
  57.         $this->destination $destination;
  58.         return $this;
  59.     }
  60.     public function getTransferDate(): ?\DateTimeInterface
  61.     {
  62.         return $this->transferDate;
  63.     }
  64.     public function setTransferDate(\DateTimeInterface $transferDate): self
  65.     {
  66.         $this->transferDate $transferDate;
  67.         return $this;
  68.     }
  69.     public function getReceptionDate(): ?\DateTimeInterface
  70.     {
  71.         return $this->receptionDate;
  72.     }
  73.     public function setReceptionDate(\DateTimeInterface $receptionDate): self
  74.     {
  75.         $this->receptionDate $receptionDate;
  76.         return $this;
  77.     }
  78.     public function getCreatedAt(): ?\DateTimeInterface
  79.     {
  80.         return $this->createdAt;
  81.     }
  82.     /**
  83.      * @ORM\PrePersist
  84.      */
  85.     public function setCreatedAt(): self
  86.     {
  87.         $this->createdAt = new \DateTime();
  88.         return $this;
  89.     }
  90.     public function getUpdatedAt(): ?\DateTimeInterface
  91.     {
  92.         return $this->updatedAt;
  93.     }
  94.     /**
  95.      * @ORM\PreUpdate
  96.      */
  97.     public function setUpdatedAt(): self
  98.     {
  99.         $this->updatedAt = new \DateTime();
  100.         return $this;
  101.     }
  102.     public function getCar(): ?Car
  103.     {
  104.         return $this->car;
  105.     }
  106.     public function setCar(?Car $car): self
  107.     {
  108.         $this->car $car;
  109.         return $this;
  110.     }
  111.     public function getDescription(): ?string
  112.     {
  113.         return $this->description;
  114.     }
  115.     public function setDescription(?string $description): self
  116.     {
  117.         $this->description $description;
  118.         return $this;
  119.     }
  120. }