src/Entity/Delivery.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\DeliveryRepository;
  7. use App\Entity\Translation\PageTranslation;
  8. use App\Entity\Translation\DeliveryTranslation;
  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(repositoryClassDeliveryRepository::class)]
  14. #[TranslationEntity(class: DeliveryTranslation::class)]
  15. class Delivery implements EntityInterface
  16. {
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue]
  19.     #[ORM\Column]
  20.     private ?int $id null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $intname null;
  23.     #[GedmoTranslatable]
  24.     #[ORM\Column(length255)]
  25.     private ?string $name null;
  26.     #[GedmoTranslatable]
  27.     #[ORM\Column(typeTypes::TEXT)]
  28.     private ?string $cont null;
  29.     #[ORM\Column(typeTypes::SMALLINT)]
  30.     private ?int $prior null;
  31.     #[ORM\Column]
  32.     private ?int $price null;
  33.     #[ORM\Column]
  34.     private array $fields = [];
  35.     #[ORM\Column]
  36.     private ?bool $visible null;
  37.     #[GedmoLocale]
  38.     private $locale;
  39.     #[ORM\OneToMany(targetEntityDeliveryTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  40.     private $translations;
  41.     public function __construct()
  42.     {
  43.         $this->translations = new ArrayCollection();
  44.     }
  45.     public function setLocale($locale)
  46.     {
  47.         $this->locale $locale;
  48.     }
  49.     public function getTranslations()
  50.     {
  51.         return $this->translations;
  52.     }
  53.     public function addTranslation(DeliveryTranslation $t)
  54.     {
  55.         if (!$this->translations->contains($t)) {
  56.             $this->translations[] = $t;
  57.             $t->setObject($this);
  58.         }
  59.     }
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getIntname(): ?string
  65.     {
  66.         return $this->intname;
  67.     }
  68.     public function setIntname(string $intname): self
  69.     {
  70.         $this->intname $intname;
  71.         return $this;
  72.     }
  73.     public function getName(): ?string
  74.     {
  75.         return $this->name;
  76.     }
  77.     public function setName(string $name): self
  78.     {
  79.         $this->name $name;
  80.         return $this;
  81.     }
  82.     public function getCont(): ?string
  83.     {
  84.         return $this->cont;
  85.     }
  86.     public function setCont(string $cont): self
  87.     {
  88.         $this->cont $cont;
  89.         return $this;
  90.     }
  91.     public function getPrior(): ?int
  92.     {
  93.         return $this->prior;
  94.     }
  95.     public function setPrior(int $prior): self
  96.     {
  97.         $this->prior $prior;
  98.         return $this;
  99.     }
  100.     public function getPrice(): ?int
  101.     {
  102.         return $this->price;
  103.     }
  104.     public function setPrice(int $price): self
  105.     {
  106.         $this->price $price;
  107.         return $this;
  108.     }
  109.     public function getFields(): array
  110.     {
  111.         return $this->fields;
  112.     }
  113.     public function setFields(array $fields): self
  114.     {
  115.         $this->fields $fields;
  116.         return $this;
  117.     }
  118.     public function isVisible(): ?bool
  119.     {
  120.         return $this->visible;
  121.     }
  122.     public function setVisible(bool $visible): self
  123.     {
  124.         $this->visible $visible;
  125.         return $this;
  126.     }
  127. }