<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Translatable;
use App\Repository\EsystemRepository;
use App\Entity\Translation\PageTranslation;
use App\Entity\Translation\EsystemTranslation;
use Gedmo\Mapping\Annotation\TranslationEntity;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
#[ORM\Entity(repositoryClass: EsystemRepository::class)]
#[TranslationEntity(class: EsystemTranslation::class)]
class Esystem implements EntityInterface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[GedmoTranslatable]
#[ORM\Column(length: 255)]
private ?string $name = '';
#[GedmoTranslatable]
#[ORM\Column(type: Types::TEXT)]
private ?string $cont = '';
#[ORM\Column(type: Types::TEXT)]
private ?string $form = '';
#[ORM\Column(length: 255)]
private ?string $script = '';
#[ORM\Column]
private ?float $course = 1;
#[ORM\Column]
private ?bool $visible = true;
#[ORM\Column]
private ?bool $autof = true;
#[ORM\Column(type: Types::SMALLINT)]
private ?int $prior = 0;
#[ORM\Column(type: Types::SMALLINT)]
private ?int $minsum = 0;
#[ORM\Column]
private ?bool $retail = false;
#[ORM\Column]
private ?bool $opt = false;
#[GedmoLocale]
private $locale;
#[ORM\OneToMany(targetEntity: EsystemTranslation::class, mappedBy: 'object', cascade: ['persist', 'remove'])]
private $translations;
public function __construct()
{
$this->translations = new ArrayCollection();
}
public function setLocale($locale)
{
$this->locale = $locale;
}
public function getTranslations()
{
return $this->translations;
}
public function addTranslation(EsystemTranslation $t)
{
if (!$this->translations->contains($t)) {
$this->translations[] = $t;
$t->setObject($this);
}
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCont(): ?string
{
return $this->cont;
}
public function setCont(string $cont): self
{
$this->cont = $cont;
return $this;
}
public function getForm(): ?string
{
return $this->form;
}
public function setForm(string $form): self
{
$this->form = $form;
return $this;
}
public function getScript(): ?string
{
return $this->script;
}
public function setScript(string $script): self
{
$this->script = $script;
return $this;
}
public function getCourse(): ?float
{
return $this->course;
}
public function setCourse(float $course): self
{
$this->course = $course;
return $this;
}
public function isVisible(): ?bool
{
return $this->visible;
}
public function setVisible(bool $visible): self
{
$this->visible = $visible;
return $this;
}
public function isAutof(): ?bool
{
return $this->autof;
}
public function setAutof(bool $autof): self
{
$this->autof = $autof;
return $this;
}
public function getPrior(): ?int
{
return $this->prior;
}
public function setPrior(int $prior): self
{
$this->prior = $prior;
return $this;
}
public function getMinsum(): ?int
{
return $this->minsum;
}
public function setMinsum(int $minsum): self
{
$this->minsum = $minsum;
return $this;
}
public function isRetail(): ?bool
{
return $this->retail;
}
public function setRetail(bool $retail): self
{
$this->retail = $retail;
return $this;
}
public function isOpt(): ?bool
{
return $this->opt;
}
public function setOpt(bool $opt): self
{
$this->opt = $opt;
return $this;
}
}