src/Entity/PersonalData.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\PersonalDataRepository;
  6. /**
  7.  * @ORM\Entity(repositoryClass=PersonalDataRepository::class)
  8.  * @ApiResource(
  9.  *     collectionOperations={
  10.  *          "get-personal-data"={
  11.  *              "method"="GET",
  12.  *              "path"="/public/personal-data",
  13.  *          }
  14.  *     },
  15.  *      itemOperations={"get"={"method"="GET"}}
  16.  *     )
  17.  */
  18. class PersonalData
  19. {
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @ORM\Column(type="datetime_immutable")
  28.      */
  29.     private $createAt;
  30.     /**
  31.      * @ORM\Column(type="datetime_immutable")
  32.      */
  33.     private $LastModifAt;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      */
  37.     private $content;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getCreateAt(): ?\DateTimeImmutable
  43.     {
  44.         return $this->createAt;
  45.     }
  46.     public function setCreateAt(\DateTimeImmutable $createAt): self
  47.     {
  48.         $this->createAt $createAt;
  49.         return $this;
  50.     }
  51.     public function getLastModifAt(): ?\DateTimeImmutable
  52.     {
  53.         return $this->LastModifAt;
  54.     }
  55.     public function setLastModifAt(\DateTimeImmutable $LastModifAt): self
  56.     {
  57.         $this->LastModifAt $LastModifAt;
  58.         return $this;
  59.     }
  60.     public function getContent(): ?string
  61.     {
  62.         return $this->content;
  63.     }
  64.     public function setContent(string $content): self
  65.     {
  66.         $this->content $content;
  67.         return $this;
  68.     }
  69. }