src/Entity/Norm.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NormRepository;
  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=NormRepository::class)
  10.  */
  11. class Norm
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      * @Groups({"norm@core"})
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      * @Groups({"norm@core"})
  23.      */
  24.     private $norm;
  25.     /**
  26.      * @ORM\Column(type="string", length=500, nullable=true)
  27.      * @Groups({"norm@core"})
  28.      */
  29.     private $description;
  30.     /**
  31.      * @ORM\ManyToMany(targetEntity=SupplierProducts::class, mappedBy="norms")
  32.      * @Groups({"norm@supplier_products"})
  33.      */
  34.     private $supplier_products;
  35.     public function __construct()
  36.     {
  37.         $this->supplier_products = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getNorm(): ?string
  44.     {
  45.         return $this->norm;
  46.     }
  47.     public function setNorm(string $norm): self
  48.     {
  49.         $this->norm $norm;
  50.         return $this;
  51.     }
  52.     public function getDescription(): ?string
  53.     {
  54.         return $this->description;
  55.     }
  56.     public function setDescription(?string $description): self
  57.     {
  58.         $this->description $description;
  59.         return $this;
  60.     }
  61.     public function getSupplierProducts(): Collection
  62.     {
  63.         return $this->supplier_products;
  64.     }
  65. }