src/Entity/Microfact.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\MicrofactRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassMicrofactRepository::class)]
  8. #[ApiResource]
  9. class Microfact
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::TEXT)]
  16.     private ?string $text null;
  17.     public function getId(): ?int
  18.     {
  19.         return $this->id;
  20.     }
  21.     public function getText(): ?string
  22.     {
  23.         return $this->text;
  24.     }
  25.     public function setText(string $text): self
  26.     {
  27.         $this->text $text;
  28.         return $this;
  29.     }
  30. }