src/Entity/InterestTranslation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\InterestTranslationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassInterestTranslationRepository::class)]
  8. #[ApiResource(
  9.     normalizationContext: ['groups' => ['profile']],
  10.     denormalizationContext: ['groups' => ['profile']],
  11.     
  12.     )]
  13. class InterestTranslation
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     
  19.     private ?int $id null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     #[Groups("profile")]
  22.     private ?string $content null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     #[Groups("profile")]
  25.     private ?string $locale null;
  26.     #[ORM\ManyToOne(inversedBy'translations')]
  27.     private ?Interest $interest null;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getContent(): ?string
  33.     {
  34.         return $this->content;
  35.     }
  36.     public function setContent(?string $content): self
  37.     {
  38.         $this->content $content;
  39.         return $this;
  40.     }
  41.     public function getLocale(): ?string
  42.     {
  43.         return $this->locale;
  44.     }
  45.     public function setLocale(?string $locale): self
  46.     {
  47.         $this->locale $locale;
  48.         return $this;
  49.     }
  50.     public function getInterest(): ?Interest
  51.     {
  52.         return $this->interest;
  53.     }
  54.     public function setInterest(?Interest $interest): self
  55.     {
  56.         $this->interest $interest;
  57.         return $this;
  58.     }
  59. }