src/Entity/Storage.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StorageRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass=StorageRepository::class)
  10.  */
  11. class Storage
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      * @Groups({"stock_edit"})
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      * @Groups({"stock_edit"})
  23.      */
  24.     private $type;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Stock::class, inversedBy="storages")
  27.      */
  28.     private $stock;
  29.     /**
  30.      * @ORM\Column(type="integer",nullable="true")
  31.      * @Groups({"stock_edit"})
  32.      */
  33.     private $quantity;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Truck::class, inversedBy="storages")
  36.      * @Groups({"stock_edit"})
  37.      */
  38.     private $truck;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getType(): ?string
  44.     {
  45.         return $this->type;
  46.     }
  47.     public function setType(string $type): self
  48.     {
  49.         $this->type $type;
  50.         return $this;
  51.     }
  52.     public function getStock(): ?Stock
  53.     {
  54.         return $this->stock;
  55.     }
  56.     public function setStock(?Stock $stock): self
  57.     {
  58.         $this->stock $stock;
  59.         return $this;
  60.     }
  61.     public function getQuantity(): ?int
  62.     {
  63.         return $this->quantity;
  64.     }
  65.     public function setQuantity(int $quantity): self
  66.     {
  67.         $this->quantity $quantity;
  68.         return $this;
  69.     }
  70.     public function getTruck(): ?Truck
  71.     {
  72.         return $this->truck;
  73.     }
  74.     public function setTruck(?Truck $truck): self
  75.     {
  76.         $this->truck $truck;
  77.         return $this;
  78.     }
  79. }