src/Entity/Product/Famille.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Product;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\FamilleRepository;
  6. /**
  7.  * Product
  8.  *
  9.  * @ORM\Table(name="famille")
  10.  * @ORM\Entity(repositoryClass=FamilleRepository::class)
  11.  */
  12. class Famille
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="name", type="string", nullable=false)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $nameCommercial;
  34.     /**
  35.      * @var Famille ArrayCollection
  36.      * @ORM\OneToMany(targetEntity=SousFamille::class, mappedBy="famille")
  37.      */
  38.     protected $sousFamilles;
  39.     /**
  40.      * @ORM\Column(type="boolean", nullable=true)
  41.      */
  42.     private $isReservation;
  43.     /**
  44.      * @ORM\Column(type="string", nullable=true)
  45.      */
  46.     private $image;
  47.     public function __construct()
  48.     {
  49.         $this->sousFamilles = new ArrayCollection();
  50.     }
  51.     /**
  52.      * @var ProductType
  53.      *
  54.      * @ORM\ManyToOne(targetEntity="ProductType")
  55.      * @ORM\JoinColumn(name="product_type_id", referencedColumnName="id")
  56.      */
  57.     private $productType;
  58.     public function __toString()
  59.     {
  60.         return $this->name;
  61.     }
  62.     /**
  63.      * @return int
  64.      */
  65.     public function getId(): int
  66.     {
  67.         return $this->id;
  68.     }
  69.     /**
  70.      * @param int $id
  71.      */
  72.     public function setId(int $id): void
  73.     {
  74.         $this->id $id;
  75.     }
  76.     /**
  77.      * @return string
  78.      */
  79.     public function getName(): ?string
  80.     {
  81.         return $this->name;
  82.     }
  83.     /**
  84.      * @param string $name
  85.      */
  86.     public function setName(string $name): void
  87.     {
  88.         $this->name $name;
  89.     }
  90.     /**
  91.      * @return string
  92.      */
  93.     public function getNameCommercial(): ?string
  94.     {
  95.         return $this->nameCommercial;
  96.     }
  97.     /**
  98.      * @param string $nameCommercial
  99.      */
  100.     public function setNameCommercial(string $nameCommercial): void
  101.     {
  102.         $this->nameCommercial $nameCommercial;
  103.     }
  104.     /**
  105.      * @return Company
  106.      */
  107.     public function getProductType(): ?ProductType
  108.     {
  109.         return $this->productType;
  110.     }
  111.     /**
  112.      * @param Company $productType
  113.      */
  114.     public function setProductType(ProductType $productType): void
  115.     {
  116.         $this->productType $productType;
  117.     }
  118.     /**
  119.      * @return Famille
  120.      */
  121.     public function getSousFamilles()
  122.     {
  123.         return $this->sousFamilles;
  124.     }
  125.     /**
  126.      * @param Famille $sousFamilles
  127.      */
  128.     public function setSousFamilles($sousFamilles): void
  129.     {
  130.         $this->sousFamilles $sousFamilles;
  131.     }
  132.     public function isIsReservation(): ?bool
  133.     {
  134.         return $this->isReservation;
  135.     }
  136.     public function setIsReservation(?bool $isReservation): self
  137.     {
  138.         $this->isReservation $isReservation;
  139.         return $this;
  140.     }
  141.     /**
  142.      * @return mixed
  143.      */
  144.     public function getImage()
  145.     {
  146.         return $this->image;
  147.     }
  148.     /**
  149.      * @param mixed $image
  150.      */
  151.     public function setImage($image): void
  152.     {
  153.         $this->image $image;
  154.     }
  155. }