<?php
namespace App\Entity;
use App\Translation\AutoTranslationTrait;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
#[ORM\Entity]
class CropTranslation implements TranslationInterface
{
use AutoTranslationTrait;
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $name = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description = null;
#[ORM\Column(nullable: true)]
private ?array $growing_tipps = [];
#[ORM\Column(type: 'datetime')]
private $createdAt;
#[ORM\Column(type: 'datetime')]
private $updatedAt;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $origin = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $short_description = null;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
}
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return string
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string $name
* @return CropTranslation
*/
public function setName($name): CropTranslation
{
$this->name = $name;
return $this;
}
/**
* @return mixed
*/
public function getDescription(): ?string
{
return $this->description;
}
/**
* @param mixed $description
* @return CropTranslation
*/
public function setDescription($description): CropTranslation
{
$this->description = $description;
return $this;
}
public function getGrowingTipps(): ?array
{
return $this->growing_tipps;
}
public function setGrowingTipps(?array $growing_tipps): static
{
$this->growing_tipps = $growing_tipps;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getOrigin(): ?string
{
return $this->origin;
}
public function setOrigin(?string $origin): static
{
$this->origin = $origin;
return $this;
}
public function getShortDescription(): ?string
{
return $this->short_description;
}
public function setShortDescription(?string $short_description): static
{
$this->short_description = $short_description;
return $this;
}
}