| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Core;
- use ApiPlatform\Metadata\ApiResource;
- use ApiPlatform\Metadata\Get;
- use ApiPlatform\Metadata\GetCollection;
- use App\Repository\Core\CountryRepository;
- // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Pays
- */
- #[ApiResource(
- operations: [
- new Get(),
- new GetCollection(),
- ],
- paginationEnabled: false
- )]
- // #[Auditable]
- #[ORM\Entity(repositoryClass: CountryRepository::class)]
- class Country
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private ?int $id = null;
- #[ORM\Column(length: 255)]
- private string $name;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getName(): string
- {
- return $this->name;
- }
- public function setName(string $name): self
- {
- $this->name = $name;
- return $this;
- }
- }
|