src/Entity/CropTranslation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Translation\AutoTranslationTrait;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  7. #[ORM\Entity]
  8. class CropTranslation implements TranslationInterface
  9. {
  10.     use AutoTranslationTrait;
  11.     #[ORM\Id]
  12.     #[ORM\Column(type'integer')]
  13.     #[ORM\GeneratedValue(strategy'AUTO')]
  14.     private $id;
  15.     #[ORM\Column(type'string'nullabletrue)]
  16.     private ?string $name null;
  17.     #[ORM\Column(type'text'nullabletrue)]
  18.     private ?string $description null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?array $growing_tipps = [];
  21.     #[ORM\Column(type'datetime')]
  22.     private $createdAt;
  23.     #[ORM\Column(type'datetime')]
  24.     private $updatedAt;
  25.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  26.     private ?string $origin null;
  27.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  28.     private ?string $short_description null;
  29.     public function __construct()
  30.     {
  31.         $this->createdAt = new \DateTime();
  32.         $this->updatedAt = new \DateTime();
  33.     }
  34.     /**
  35.      * @return int
  36.      */
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     /**
  42.      * @return string
  43.      */
  44.     public function getName(): ?string
  45.     {
  46.         return $this->name;
  47.     }
  48.     /**
  49.      * @param string $name
  50.      * @return CropTranslation
  51.      */
  52.     public function setName($name): CropTranslation
  53.     {
  54.         $this->name $name;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return mixed
  59.      */
  60.     public function getDescription(): ?string
  61.     {
  62.         return $this->description;
  63.     }
  64.     /**
  65.      * @param mixed $description
  66.      * @return CropTranslation
  67.      */
  68.     public function setDescription($description): CropTranslation
  69.     {
  70.         $this->description $description;
  71.         return $this;
  72.     }
  73.     public function getGrowingTipps(): ?array
  74.     {
  75.         return $this->growing_tipps;
  76.     }
  77.     public function setGrowingTipps(?array $growing_tipps): static
  78.     {
  79.         $this->growing_tipps $growing_tipps;
  80.         return $this;
  81.     }
  82.     public function getCreatedAt(): ?\DateTimeInterface
  83.     {
  84.         return $this->createdAt;
  85.     }
  86.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  87.     {
  88.         $this->createdAt $createdAt;
  89.         return $this;
  90.     }
  91.     public function getUpdatedAt(): ?\DateTimeInterface
  92.     {
  93.         return $this->updatedAt;
  94.     }
  95.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  96.     {
  97.         $this->updatedAt $updatedAt;
  98.         return $this;
  99.     }
  100.     public function getOrigin(): ?string
  101.     {
  102.         return $this->origin;
  103.     }
  104.     public function setOrigin(?string $origin): static
  105.     {
  106.         $this->origin $origin;
  107.         return $this;
  108.     }
  109.     public function getShortDescription(): ?string
  110.     {
  111.         return $this->short_description;
  112.     }
  113.     public function setShortDescription(?string $short_description): static
  114.     {
  115.         $this->short_description $short_description;
  116.         return $this;
  117.     }
  118. }