src/Entity/Paiement.php line 23

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use ApiPlatform\Metadata\Get;
  5. use ApiPlatform\Metadata\GetCollection;
  6. use App\Repository\PaiementRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. #[ORM\Entity(repositoryClassPaiementRepository::class)]
  10. #[ApiResource(
  11.     normalizationContext: ['groups' => ['read:paiement']],
  12.     denormalizationContext: ['groups' => ['write:paiement']],
  13.     operations: [
  14.         new Get(),
  15.         new GetCollection(),
  16.     ],
  17.     paginationEnabledtrue,
  18.     paginationItemsPerPage30
  19. )]
  20. class Paiement
  21. {
  22.     #[ORM\Id]
  23.     #[ORM\GeneratedValue]
  24.     #[ORM\Column]
  25.     #[Groups(['read:paiement'])]
  26.     private ?int $id null;
  27.     #[ORM\Column(length255)]
  28.     #[Groups(['read:paiement'])]
  29.     private ?string $nomPaiement null;
  30.     #[ORM\Column(length255)]
  31.     #[Groups(['read:paiement'])]
  32.     private ?string $adressePaiement null;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getNomPaiement(): ?string
  38.     {
  39.         return $this->nomPaiement;
  40.     }
  41.     public function setNomPaiement(string $nomPaiement): self
  42.     {
  43.         $this->nomPaiement $nomPaiement;
  44.         return $this;
  45.     }
  46.     public function getAdressePaiement(): ?string
  47.     {
  48.         return $this->adressePaiement;
  49.     }
  50.     public function setAdressePaiement(string $adressePaiement): self
  51.     {
  52.         $this->adressePaiement $adressePaiement;
  53.         return $this;
  54.     }
  55. }