<?php
namespace App\Entity;
use App\Repository\NormRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=NormRepository::class)
*/
class Norm
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"norm@core"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"norm@core"})
*/
private $norm;
/**
* @ORM\Column(type="string", length=500, nullable=true)
* @Groups({"norm@core"})
*/
private $description;
/**
* @ORM\ManyToMany(targetEntity=SupplierProducts::class, mappedBy="norms")
* @Groups({"norm@supplier_products"})
*/
private $supplier_products;
public function __construct()
{
$this->supplier_products = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNorm(): ?string
{
return $this->norm;
}
public function setNorm(string $norm): self
{
$this->norm = $norm;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getSupplierProducts(): Collection
{
return $this->supplier_products;
}
}