src/Entity/Char.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\CharRepository;
  6. use Gedmo\Translatable\Translatable;
  7. use App\Entity\Translation\CharTranslation;
  8. use App\Entity\Translation\PageTranslation;
  9. use Gedmo\Mapping\Annotation\TranslationEntity;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
  12. use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
  13. #[ORM\Entity(repositoryClassCharRepository::class)]
  14. #[ORM\Table(name'`char`')]
  15. #[TranslationEntity(class: CharTranslation::class)]
  16. class Char implements EntityInterface
  17. {
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue]
  20.     #[ORM\Column]
  21.     private ?int $id null;
  22.     #[ORM\Column(type'integer')]
  23.     private int $cat 0;
  24.     #[GedmoTranslatable]
  25.     #[ORM\Column(length255)]
  26.     private ?string $name null;
  27.     #[ORM\Column(typeTypes::SMALLINT)]
  28.     private ?int $type null;
  29.     #[ORM\Column]
  30.     private ?int $search null;
  31.     #[ORM\Column(typeTypes::SMALLINT)]
  32.     private ?int $buy null;
  33.     #[ORM\Column(length255)]
  34.     private ?string $izm null;
  35.     #[ORM\Column(typeTypes::SMALLINT)]
  36.     private ?int $prior null;
  37.     #[ORM\Column]
  38.     private ?bool $visible null;
  39.     #[ORM\Column(typeTypes::SMALLINT)]
  40.     private ?int $incat null;
  41.     #[GedmoLocale]
  42.     private $locale;
  43.     #[ORM\OneToMany(targetEntityCharTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  44.     private $translations;
  45.     #[ORM\Column]
  46.     private bool $inprod true;
  47.     public function __construct()
  48.     {
  49.         $this->translations = new ArrayCollection();
  50.     }
  51.     public function setLocale($locale)
  52.     {
  53.         $this->locale $locale;
  54.     }
  55.     public function getTranslations()
  56.     {
  57.         return $this->translations;
  58.     }
  59.     public function addTranslation(CharTranslation $t)
  60.     {
  61.         if (!$this->translations->contains($t)) {
  62.             $this->translations[] = $t;
  63.             $t->setObject($this);
  64.         }
  65.     }
  66.     public function getId(): ?int
  67.     {
  68.         return $this->id;
  69.     }
  70.     public function getCatId(): ?int
  71.     {
  72.         return $this->cat;
  73.     }
  74.     public function setCatId(int $cat_id): self
  75.     {
  76.         $this->cat $cat_id;
  77.         return $this;
  78.     }
  79.     public function getName(): ?string
  80.     {
  81.         return $this->name;
  82.     }
  83.     public function setName(string $name): self
  84.     {
  85.         $this->name $name;
  86.         return $this;
  87.     }
  88.     public function getType(): ?int
  89.     {
  90.         return $this->type;
  91.     }
  92.     public function setType(int $type): self
  93.     {
  94.         $this->type $type;
  95.         return $this;
  96.     }
  97.     public function getSearch(): ?int
  98.     {
  99.         return $this->search;
  100.     }
  101.     public function setSearch(int $search): self
  102.     {
  103.         $this->search $search;
  104.         return $this;
  105.     }
  106.     public function getBuy(): ?int
  107.     {
  108.         return $this->buy;
  109.     }
  110.     public function setBuy(int $buy): self
  111.     {
  112.         $this->buy $buy;
  113.         return $this;
  114.     }
  115.     public function getIzm(): ?string
  116.     {
  117.         return $this->izm;
  118.     }
  119.     public function setIzm(string $izm): self
  120.     {
  121.         $this->izm $izm;
  122.         return $this;
  123.     }
  124.     public function getPrior(): ?int
  125.     {
  126.         return $this->prior;
  127.     }
  128.     public function setPrior(int $prior): self
  129.     {
  130.         $this->prior $prior;
  131.         return $this;
  132.     }
  133.     public function isVisible(): ?bool
  134.     {
  135.         return $this->visible;
  136.     }
  137.     public function setVisible(bool $visible): self
  138.     {
  139.         $this->visible $visible;
  140.         return $this;
  141.     }
  142.     public function getIncat(): ?int
  143.     {
  144.         return $this->incat;
  145.     }
  146.     public function setIncat(int $incat): self
  147.     {
  148.         $this->incat $incat;
  149.         return $this;
  150.     }
  151.     public function isInprod(): bool
  152.     {
  153.         return $this->inprod;
  154.     }
  155.     public function setInprod(bool $inprod): static
  156.     {
  157.         $this->inprod $inprod;
  158.         return $this;
  159.     }
  160. }