src/Entity/System/Brand.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Brand
  7.  *
  8.  * @ORM\Table(name="ps_manufacturer")
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\System\BrandRepository")
  11.  */
  12. class Brand
  13. {
  14.     public const INNOVAGOODS_BRAND_ID 2317;
  15.     public const VARIOS_BRAND_ID 2015;
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id_manufacturer", type="integer")
  20.      *
  21.      * @ORM\Id
  22.      *
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var bool
  28.      *
  29.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)", options={"default" : 0})
  30.      */
  31.     private $active;
  32.     /**
  33.      * @var int
  34.      *
  35.      * @ORM\Column(type="integer", length=11, options={"default" : 0})
  36.      */
  37.     private $position;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="name", type="string")
  42.      */
  43.     private $name;
  44.     /**
  45.      * @var \DateTime|true
  46.      *
  47.      * @ORM\Column(type="datetime", options={"default" : "CURRENT_TIMESTAMP"}, nullable=true)
  48.      */
  49.     private $dateAdd;
  50.     /**
  51.      * @var \DateTime|true
  52.      *
  53.      * @ORM\Column(type="datetime", nullable=true)
  54.      */
  55.     private $dateUpd;
  56.     /**
  57.      * @var string|null
  58.      *
  59.      * @ORM\Column(type="string", nullable=true)
  60.      */
  61.     private $image;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity="App\Entity\System\BrandLanguage", mappedBy="brand", orphanRemoval=true)
  64.      */
  65.     private $brandLanguages;
  66.     /**
  67.      * @var string|null
  68.      *
  69.      * @ORM\Column(type="string", nullable=true)
  70.      */
  71.     private $reference;
  72.     public function __construct()
  73.     {
  74.         $this->brandLanguages = new ArrayCollection();
  75.     }
  76.     /**
  77.      * @return int
  78.      */
  79.     public function getId(): int
  80.     {
  81.         return $this->id;
  82.     }
  83.     /**
  84.      * @param int $id
  85.      *
  86.      * @return Brand
  87.      */
  88.     public function setId(int $id): Brand
  89.     {
  90.         $this->id $id;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return bool
  95.      */
  96.     public function isActive(): bool
  97.     {
  98.         return $this->active;
  99.     }
  100.     /**
  101.      * @param bool $active
  102.      *
  103.      * @return Brand
  104.      */
  105.     public function setActive(bool $active): Brand
  106.     {
  107.         $this->active $active;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return int
  112.      */
  113.     public function getPosition(): int
  114.     {
  115.         return $this->position;
  116.     }
  117.     /**
  118.      * @param int $position
  119.      *
  120.      * @return Brand
  121.      */
  122.     public function setPosition(int $position): Brand
  123.     {
  124.         $this->position $position;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return string
  129.      */
  130.     public function getName(): string
  131.     {
  132.         return $this->name;
  133.     }
  134.     /**
  135.      * @param string $name
  136.      *
  137.      * @return Brand
  138.      */
  139.     public function setName(string $name): Brand
  140.     {
  141.         $this->name $name;
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return \DateTime|true
  146.      */
  147.     public function getDateAdd()
  148.     {
  149.         return $this->dateAdd;
  150.     }
  151.     /**
  152.      * @param \DateTime|true $dateAdd
  153.      *
  154.      * @return Brand
  155.      */
  156.     public function setDateAdd($dateAdd): Brand
  157.     {
  158.         $this->dateAdd $dateAdd;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return \DateTime|true
  163.      */
  164.     public function getDateUpd()
  165.     {
  166.         return $this->dateUpd;
  167.     }
  168.     /**
  169.      * @param \DateTime|true $dateUpd
  170.      *
  171.      * @return Brand
  172.      */
  173.     public function setDateUpd($dateUpd): Brand
  174.     {
  175.         $this->dateUpd $dateUpd;
  176.         return $this;
  177.     }
  178.     /**
  179.      * @return string|null
  180.      */
  181.     public function getImage(): ?string
  182.     {
  183.         return $this->image;
  184.     }
  185.     /**
  186.      * @param string|null $image
  187.      *
  188.      * @return Brand
  189.      */
  190.     public function setImage(?string $image): Brand
  191.     {
  192.         $this->image $image;
  193.         return $this;
  194.     }
  195.     /**
  196.      * @return BrandLanguage[]|ArrayCollection<int, BrandLanguage>
  197.      */
  198.     public function getBrandLanguages()
  199.     {
  200.         return $this->brandLanguages;
  201.     }
  202.     /**
  203.      * @param mixed $brandLanguages
  204.      */
  205.     public function setBrandLanguages($brandLanguages): Brand
  206.     {
  207.         $this->brandLanguages $brandLanguages;
  208.         return $this;
  209.     }
  210.     public function getReference(): ?string
  211.     {
  212.         return $this->reference;
  213.     }
  214.     public function setReference(?string $reference): Brand
  215.     {
  216.         $this->reference $reference;
  217.         return $this;
  218.     }
  219. }