Country.php 622 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Core;
  4. use App\Repository\Core\CountryRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: CountryRepository::class)]
  7. class Country
  8. {
  9. #[ORM\Id]
  10. #[ORM\Column]
  11. #[ORM\GeneratedValue]
  12. private ?int $id = null;
  13. #[ORM\Column(length: 255)]
  14. private string $name;
  15. public function getId(): ?int
  16. {
  17. return $this->id;
  18. }
  19. public function getName(): string
  20. {
  21. return $this->name;
  22. }
  23. public function setName(string $name): self
  24. {
  25. $this->name = $name;
  26. return $this;
  27. }
  28. }