src/Entity/Articles/ConditionnementAchat.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Articles;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * conditionnementAchat
  8.  *
  9.  * @ORM\Table("article__conditionnement_achat")
  10.  * @ORM\Entity(repositoryClass="App\Repository\Articles\ConditionnementAchatRepository")
  11.  */
  12. class ConditionnementAchat
  13. {
  14.     /**
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="conditionnementAchatEan")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $article;    
  26.     /**
  27.      * @ORM\Column(name="quantite", type="float", nullable=true)
  28.      * @Assert\NotBlank(message="Quantité obligatoire")     
  29.      */
  30.     private $quantite;
  31.     /**
  32.      * @ORM\Column(name="identifiant", type="string", length=255, nullable=true)
  33.      * @Assert\NotBlank(message="EAN obligatoire")     
  34.      */
  35.     private $identifiant;
  36.     public function getId(): int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function setQuantite(?float $quantite): ConditionnementAchat
  41.     {
  42.         $this->quantite $quantite;
  43.         return $this;
  44.     }
  45.     public function getQuantite(): ?float
  46.     {
  47.         return $this->quantite;
  48.     }
  49.     public function setIdentifiant(?string $identifiant): ConditionnementAchat
  50.     {
  51.         $this->identifiant $identifiant;
  52.         return $this;
  53.     }
  54.     public function getIdentifiant(): ?string
  55.     {
  56.         return $this->identifiant;
  57.     }
  58.     public function setArticle(?Article $article): ConditionnementAchat
  59.     {
  60.         $this->article $article;
  61.         return $this;
  62.     }
  63.     public function getArticle(): ?Article
  64.     {
  65.         return $this->article;
  66.     }
  67. }