src/Entity/ArticleSupply.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ArticleSupplyRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassArticleSupplyRepository::class)]
  6. class ArticleSupply
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'articles')]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private ?Supply $supply null;
  15.     #[ORM\Column]
  16.     private ?int $quantity null;
  17.     #[ORM\ManyToOne(inversedBy'supplies')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Article $article null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getSupply(): ?Supply
  25.     {
  26.         return $this->supply;
  27.     }
  28.     public function setSupply(?Supply $supply): self
  29.     {
  30.         $this->supply $supply;
  31.         return $this;
  32.     }
  33.     public function getQuantity(): ?int
  34.     {
  35.         return $this->quantity;
  36.     }
  37.     public function setQuantity(int $quantity): self
  38.     {
  39.         $this->quantity $quantity;
  40.         return $this;
  41.     }
  42.     public function getArticle(): ?Article
  43.     {
  44.         return $this->article;
  45.     }
  46.     public function setArticle(?Article $article): self
  47.     {
  48.         $this->article $article;
  49.         return $this;
  50.     }
  51. }