src/Entity/System/Brand.php line 16

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