src/Entity/Product/SousFamille.php line 14

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