<?php
namespace App\Entity\Product;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Product\Famille;
/**
* Product
*
* @ORM\Table(name="product_type")
* @ORM\Entity
*/
class ProductType
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", nullable=false)
*/
private $name;
/**
* @var Famille ArrayCollection
* @ORM\OneToMany(targetEntity=Famille::class, mappedBy="productType")
*/
protected $familles;
public function __construct()
{
$this->familles = new ArrayCollection();
}
public function __toString()
{
return $this->name;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @return
*/
public function getFamilles()
{
return $this->familles;
}
/**
* @param
*/
public function setFamilles($familles): void
{
$this->familles = $familles;
}
}