<?php
namespace App\Entity\Product;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\FamilleRepository;
/**
* Product
*
* @ORM\Table(name="famille")
* @ORM\Entity(repositoryClass=FamilleRepository::class)
*/
class Famille
{
/**
* @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 string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nameCommercial;
/**
* @var Famille ArrayCollection
* @ORM\OneToMany(targetEntity=SousFamille::class, mappedBy="famille")
*/
protected $sousFamilles;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isReservation;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $image;
public function __construct()
{
$this->sousFamilles = new ArrayCollection();
}
/**
* @var ProductType
*
* @ORM\ManyToOne(targetEntity="ProductType")
* @ORM\JoinColumn(name="product_type_id", referencedColumnName="id")
*/
private $productType;
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 string
*/
public function getNameCommercial(): ?string
{
return $this->nameCommercial;
}
/**
* @param string $nameCommercial
*/
public function setNameCommercial(string $nameCommercial): void
{
$this->nameCommercial = $nameCommercial;
}
/**
* @return Company
*/
public function getProductType(): ?ProductType
{
return $this->productType;
}
/**
* @param Company $productType
*/
public function setProductType(ProductType $productType): void
{
$this->productType = $productType;
}
/**
* @return Famille
*/
public function getSousFamilles()
{
return $this->sousFamilles;
}
/**
* @param Famille $sousFamilles
*/
public function setSousFamilles($sousFamilles): void
{
$this->sousFamilles = $sousFamilles;
}
public function isIsReservation(): ?bool
{
return $this->isReservation;
}
public function setIsReservation(?bool $isReservation): self
{
$this->isReservation = $isReservation;
return $this;
}
/**
* @return mixed
*/
public function getImage()
{
return $this->image;
}
/**
* @param mixed $image
*/
public function setImage($image): void
{
$this->image = $image;
}
}