src/Entity/ArticleBuy.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ArticleBuyRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ArticleBuyRepository::class)
  7.  */
  8. class ArticleBuy
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $price;
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $quantity;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Article::class, inversedBy="articleBuys")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $article;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Client::class, inversedBy="articleBuys")
  31.      * @ORM\JoinColumn(nullable=false)
  32.      */
  33.     private $client;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getPrice(): ?int
  39.     {
  40.         return $this->price;
  41.     }
  42.     public function setPrice(int $price): self
  43.     {
  44.         $this->price $price;
  45.         return $this;
  46.     }
  47.     public function getQuantity(): ?int
  48.     {
  49.         return $this->quantity;
  50.     }
  51.     public function setQuantity(int $quantity): self
  52.     {
  53.         $this->quantity $quantity;
  54.         return $this;
  55.     }
  56.     public function getArticle(): ?Article
  57.     {
  58.         return $this->article;
  59.     }
  60.     public function setArticle(?Article $article): self
  61.     {
  62.         $this->article $article;
  63.         return $this;
  64.     }
  65.     public function getClient(): ?Client
  66.     {
  67.         return $this->client;
  68.     }
  69.     public function setClient(?Client $client): self
  70.     {
  71.         $this->client $client;
  72.         return $this;
  73.     }
  74. }