<?php
namespace App\Entity;
use App\Repository\FournitureCategorieRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=FournitureCategorieRepository::class)
*/
class FournitureCategorie
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Column(type="string", length=255)
*/
private $sousTitre;
/**
* @ORM\Column(type="string", length=255)
*/
private $marque;
/**
* @ORM\Column(type="text")
*/
private $description;
/**
* @ORM\Column(type="boolean")
*/
private $compatibleUsa;
/**
* @ORM\Column(type="float", nullable="true")
*/
private $montantFranco;
/**
* @ORM\Column(type="float", nullable="true")
*/
private $fraisLivraison;
/**
* @ORM\OneToMany(targetEntity=FournitureItem::class, mappedBy="fournitureCategorie")
* @ORM\OrderBy({"ordre" = "ASC"})
*/
private $fournituresItem;
public function __construct()
{
$this->fournituresItem = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getSousTitre(): ?string
{
return $this->sousTitre;
}
public function setSousTitre(string $sousTitre): self
{
$this->sousTitre = $sousTitre;
return $this;
}
public function getMarque(): ?string
{
return $this->marque;
}
public function setMarque(string $marque): self
{
$this->marque = $marque;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function isCompatibleUsa(): ?bool
{
return $this->compatibleUsa;
}
public function setCompatibleUsa(bool $compatibleUsa): self
{
$this->compatibleUsa = $compatibleUsa;
return $this;
}
public function getMontantFranco(): ?float
{
return $this->montantFranco;
}
public function setMontantFranco(float $montantFranco): self
{
$this->montantFranco = $montantFranco;
return $this;
}
public function getFraisLivraison(): ?float
{
return $this->fraisLivraison;
}
public function setFraisLivraison(float $fraisLivraison): self
{
$this->fraisLivraison = $fraisLivraison;
return $this;
}
/**
* @return Collection<int, FournitureItem>
*/
public function getFournituresItem(): Collection
{
return $this->fournituresItem;
}
public function addFournituresItem(FournitureItem $fournituresItem): self
{
if (!$this->fournituresItem->contains($fournituresItem)) {
$this->fournituresItem[] = $fournituresItem;
$fournituresItem->setFournitureCategorie($this);
}
return $this;
}
public function removeFournituresItem(FournitureItem $fournituresItem): self
{
if ($this->fournituresItem->removeElement($fournituresItem)) {
// set the owning side to null (unless already changed)
if ($fournituresItem->getFournitureCategorie() === $this) {
$fournituresItem->setFournitureCategorie(null);
}
}
return $this;
}
}