src/Entity/Esystem.php line 18

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 Gedmo\Translatable\Translatable;
  6. use App\Repository\EsystemRepository;
  7. use App\Entity\Translation\PageTranslation;
  8. use App\Entity\Translation\EsystemTranslation;
  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(repositoryClassEsystemRepository::class)]
  14. #[TranslationEntity(class: EsystemTranslation::class)]
  15. class Esystem implements EntityInterface
  16. {
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue]
  19.     #[ORM\Column]
  20.     private ?int $id null;
  21.     #[GedmoTranslatable]
  22.     #[ORM\Column(length255)]
  23.     private ?string $name '';
  24.     #[GedmoTranslatable]
  25.     #[ORM\Column(typeTypes::TEXT)]
  26.     private ?string $cont '';
  27.     #[ORM\Column(typeTypes::TEXT)]
  28.     private ?string $form '';
  29.     #[ORM\Column(length255)]
  30.     private ?string $script '';
  31.     #[ORM\Column]
  32.     private ?float $course 1;
  33.     #[ORM\Column]
  34.     private ?bool $visible true;
  35.     #[ORM\Column]
  36.     private ?bool $autof true;
  37.     #[ORM\Column(typeTypes::SMALLINT)]
  38.     private ?int $prior 0;
  39.     #[ORM\Column(typeTypes::SMALLINT)]
  40.     private ?int $minsum 0;
  41.     #[ORM\Column]
  42.     private ?bool $retail false;
  43.     #[ORM\Column]
  44.     private ?bool $opt false;
  45.     #[GedmoLocale]
  46.     private $locale;
  47.     #[ORM\OneToMany(targetEntityEsystemTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  48.     private $translations;
  49.     public function __construct()
  50.     {
  51.         $this->translations = new ArrayCollection();
  52.     }
  53.     public function setLocale($locale)
  54.     {
  55.         $this->locale $locale;
  56.     }
  57.     public function getTranslations()
  58.     {
  59.         return $this->translations;
  60.     }
  61.     public function addTranslation(EsystemTranslation $t)
  62.     {
  63.         if (!$this->translations->contains($t)) {
  64.             $this->translations[] = $t;
  65.             $t->setObject($this);
  66.         }
  67.     }
  68.     public function getId(): ?int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function getName(): ?string
  73.     {
  74.         return $this->name;
  75.     }
  76.     public function setName(string $name): self
  77.     {
  78.         $this->name $name;
  79.         return $this;
  80.     }
  81.     public function getCont(): ?string
  82.     {
  83.         return $this->cont;
  84.     }
  85.     public function setCont(string $cont): self
  86.     {
  87.         $this->cont $cont;
  88.         return $this;
  89.     }
  90.     public function getForm(): ?string
  91.     {
  92.         return $this->form;
  93.     }
  94.     public function setForm(string $form): self
  95.     {
  96.         $this->form $form;
  97.         return $this;
  98.     }
  99.     public function getScript(): ?string
  100.     {
  101.         return $this->script;
  102.     }
  103.     public function setScript(string $script): self
  104.     {
  105.         $this->script $script;
  106.         return $this;
  107.     }
  108.     public function getCourse(): ?float
  109.     {
  110.         return $this->course;
  111.     }
  112.     public function setCourse(float $course): self
  113.     {
  114.         $this->course $course;
  115.         return $this;
  116.     }
  117.     public function isVisible(): ?bool
  118.     {
  119.         return $this->visible;
  120.     }
  121.     public function setVisible(bool $visible): self
  122.     {
  123.         $this->visible $visible;
  124.         return $this;
  125.     }
  126.     public function isAutof(): ?bool
  127.     {
  128.         return $this->autof;
  129.     }
  130.     public function setAutof(bool $autof): self
  131.     {
  132.         $this->autof $autof;
  133.         return $this;
  134.     }
  135.     public function getPrior(): ?int
  136.     {
  137.         return $this->prior;
  138.     }
  139.     public function setPrior(int $prior): self
  140.     {
  141.         $this->prior $prior;
  142.         return $this;
  143.     }
  144.     public function getMinsum(): ?int
  145.     {
  146.         return $this->minsum;
  147.     }
  148.     public function setMinsum(int $minsum): self
  149.     {
  150.         $this->minsum $minsum;
  151.         return $this;
  152.     }
  153.     public function isRetail(): ?bool
  154.     {
  155.         return $this->retail;
  156.     }
  157.     public function setRetail(bool $retail): self
  158.     {
  159.         $this->retail $retail;
  160.         return $this;
  161.     }
  162.     public function isOpt(): ?bool
  163.     {
  164.         return $this->opt;
  165.     }
  166.     public function setOpt(bool $opt): self
  167.     {
  168.         $this->opt $opt;
  169.         return $this;
  170.     }
  171. }