<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\UserTranslationRepository;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslation;
use Locastic\ApiPlatformTranslationBundle\Model\TranslatableInterface;
/**
* @ORM\Entity(repositoryClass=UserTranslationRepository::class)
*/
class UserTranslation extends AbstractTranslation
{
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="translations")
* @ORM\JoinColumn(onDelete="CASCADE")
* @Groups({"User:Write", "User:Change-Profile", "UserTranslationGroup"})
*/
protected $translatable = null;
/**
* @ORM\Column(type="string", length=16)
* @Groups({"User:Write", "User:Change-Profile", "UserTranslationGroup"})
*
* @Assert\NotBlank(message="validation.userTranslation:locale.notBlank")
*/
protected $locale = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text", nullable=true)
* @Groups({"User:Write", "User:Get-Item", "User:Change-Profile", "UserTranslationGroup"})
*/
private $biography;
public function getId(): ?int
{
return $this->id;
}
public function getBiography(): ?string
{
return $this->biography;
}
public function setBiography(?string $biography): self
{
$this->biography = $biography;
return $this;
}
}