src/Entity/System/Tag.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Tag
  6.  *
  7.  * @ORM\Table(name="ps_tag", indexes={
  8.  *
  9.  *     @ORM\Index(name="active", columns={"active"}),
  10.  *     @ORM\Index(name="ps_tag_deleted_active_index", columns={"deleted", "active"}),
  11.  *     @ORM\Index(name="deleted", columns={"deleted"}),
  12.  *     @ORM\Index(name="name", columns={"name"}),
  13.  *     @ORM\Index(name="id_tag", columns={"id_tag"})
  14.  * })
  15.  *
  16.  * @ORM\Entity(repositoryClass="App\Repository\System\TagRepository")
  17.  */
  18. class Tag
  19. {
  20.     public const OUTLET_TAG_ID 20;
  21.     public const TELESHOPPING_TAG_ID 28;
  22.     public const CHRISTMAS_TAG_ID 34;
  23.     public const ORIGINAL_GIFT_TAG_ID 66;
  24.     public const BLACK_FRIDAY_TAG_ID 72;
  25.     public const HOTDEAL_TAG_ID 85;
  26.     public const VALENTINES_DAY 35;
  27.     public const EURO_2024_TAG_ID 93;
  28.     public const ID_WINNING_PRODUCTS 96// TODO CAMBIAR CUANDO WINNIG PRODUCTS ESTÉ ACTIVO
  29.     public const ID_B2B_DEALS 96;
  30.     public const COVID19_TAG_ID 99;
  31.     public const RENEWED_TAG_ID 100;
  32.     public const BACK_TO_SCHOOL_TAG_ID 38;
  33.     public const TAG_BLACK_FRIDAY_TEXT 'Black Friday';
  34.     public const TAG_HOTDEALS_TEXT 'hot deals';
  35.     public const TAG_RENEWED_TEXT 'Renewed';
  36.     public const ID_TAG_ACADEMY_ECOMMERCE 10001;
  37.     public const ID_TAG_ACADEMY_MARKETPLACE 10002;
  38.     public const ID_TAG_ACADEMY_MARKETING 10003;
  39.     public const ECOMMERCE = [
  40.         'name' => 'ECOMMERCE',
  41.         'color' => '#F28800',
  42.     ];
  43.     public const MARKETPLACE = [
  44.         'name' => 'MARKETPLACE',
  45.         'color' => '#73AF00',
  46.     ];
  47.     public const MARKETING = [
  48.         'name' => 'MARKETING',
  49.         'color' => '#F6BB00',
  50.     ];
  51.     /**
  52.      * @var int
  53.      *
  54.      * @ORM\Column(name="id_tag", type="integer")
  55.      *
  56.      * @ORM\Id
  57.      */
  58.     private $id;
  59.     /**
  60.      * @ORM\Id()
  61.      *
  62.      * @var Language
  63.      *
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  65.      *
  66.      * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang")
  67.      */
  68.     private $language;
  69.     /**
  70.      * @var string|null
  71.      *
  72.      * @ORM\Column(type="string", length=255)
  73.      */
  74.     private $name;
  75.     /**
  76.      * @var string|null
  77.      *
  78.      * @ORM\Column(type="string", length=255)
  79.      */
  80.     private $linkRewrite;
  81.     /**
  82.      * @var string|null
  83.      *
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $alt;
  87.     /**
  88.      * @var string|null
  89.      *
  90.      * @ORM\Column(type="text", nullable=true)
  91.      */
  92.     private $description;
  93.     /**
  94.      * @var int
  95.      *
  96.      * @ORM\Column(type="integer", name="Book_keeper", options={"default" : 0})
  97.      */
  98.     private $bookKeeper;
  99.     /**
  100.      * @var bool
  101.      *
  102.      * @ORM\Column(name="active", type="boolean", length=4)
  103.      */
  104.     private $active;
  105.     /**
  106.      * @var bool
  107.      *
  108.      * @ORM\Column(name="deleted", type="boolean", length=4, options={"default" : 0})
  109.      */
  110.     private $deleted;
  111.     /**
  112.      * @return mixed
  113.      */
  114.     public function getId()
  115.     {
  116.         return $this->id;
  117.     }
  118.     /**
  119.      * @param mixed $id
  120.      *
  121.      * @return Tag
  122.      */
  123.     public function setId(int $id): Tag
  124.     {
  125.         $this->id $id;
  126.         return $this;
  127.     }
  128.     /**
  129.      * @return Language
  130.      */
  131.     public function getLanguage(): Language
  132.     {
  133.         return $this->language;
  134.     }
  135.     public function getLanguageIsoCode(): ?string
  136.     {
  137.         return $this->getLanguage()->getIsoCode();
  138.     }
  139.     /**
  140.      * @param Language $language
  141.      *
  142.      * @return Tag
  143.      */
  144.     public function setLanguage(Language $language): Tag
  145.     {
  146.         $this->language $language;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return string|null
  151.      */
  152.     public function getName(): ?string
  153.     {
  154.         return $this->name;
  155.     }
  156.     /**
  157.      * @param string|null $name
  158.      *
  159.      * @return Tag
  160.      */
  161.     public function setName(string $name): Tag
  162.     {
  163.         $this->name $name;
  164.         return $this;
  165.     }
  166.     /**
  167.      * @return string|null
  168.      */
  169.     public function getLinkRewrite(): ?string
  170.     {
  171.         return $this->linkRewrite;
  172.     }
  173.     /**
  174.      * @param string|null $linkRewrite
  175.      *
  176.      * @return Tag
  177.      */
  178.     public function setLinkRewrite(string $linkRewrite): Tag
  179.     {
  180.         $this->linkRewrite $linkRewrite;
  181.         return $this;
  182.     }
  183.     /**
  184.      * @return string|null
  185.      */
  186.     public function getAlt(): ?string
  187.     {
  188.         return $this->alt;
  189.     }
  190.     /**
  191.      * @param string|null $alt
  192.      *
  193.      * @return Tag
  194.      */
  195.     public function setAlt(string $alt): Tag
  196.     {
  197.         $this->alt $alt;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return string|null
  202.      */
  203.     public function getDescription(): ?string
  204.     {
  205.         return $this->description;
  206.     }
  207.     /**
  208.      * @param string|null $description
  209.      *
  210.      * @return Tag
  211.      */
  212.     public function setDescription(string $description): Tag
  213.     {
  214.         $this->description $description;
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return int
  219.      */
  220.     public function getBookKeeper(): int
  221.     {
  222.         return $this->bookKeeper;
  223.     }
  224.     /**
  225.      * @param int $bookKeeper
  226.      *
  227.      * @return Tag
  228.      */
  229.     public function setBookKeeper(int $bookKeeper): Tag
  230.     {
  231.         $this->bookKeeper $bookKeeper;
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return bool
  236.      */
  237.     public function isActive(): bool
  238.     {
  239.         return $this->active;
  240.     }
  241.     public function setActive(bool $active): Tag
  242.     {
  243.         $this->active $active;
  244.         return $this;
  245.     }
  246.     /**
  247.      * @return bool
  248.      */
  249.     public function isDeleted(): bool
  250.     {
  251.         return $this->deleted;
  252.     }
  253.     /**
  254.      * @param bool $deleted
  255.      *
  256.      * @return Tag
  257.      */
  258.     public function setDeleted(bool $deleted): Tag
  259.     {
  260.         $this->deleted $deleted;
  261.         return $this;
  262.     }
  263. }