src/Entity/PolitiqueVille.php line 16

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * PolitiqueVille.
  7. *
  8. * @ORM\Table(name="PolitiqueVille")
  9. *
  10. * @ORM\Entity
  11. */
  12. class PolitiqueVille
  13. {
  14. /**
  15. * @var int
  16. *
  17. * @ORM\Column(name="id", type="integer")
  18. *
  19. * @ORM\Id
  20. *
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. */
  23. private $id;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="nom", type="string", length=255)
  28. */
  29. private $nom;
  30. /**
  31. * Get id.
  32. *
  33. * @return int
  34. */
  35. public function getId()
  36. {
  37. return $this->id;
  38. }
  39. /**
  40. * Set nom.
  41. *
  42. * @param string $nom
  43. */
  44. public function setNom($nom): static
  45. {
  46. $this->nom = $nom;
  47. return $this;
  48. }
  49. /**
  50. * Get nom.
  51. *
  52. * @return string
  53. */
  54. public function getNom()
  55. {
  56. return $this->nom;
  57. }
  58. /**
  59. * Methode pour afficher le nom.
  60. */
  61. #[\Override]
  62. public function __toString(): string
  63. {
  64. return $this->getNom();
  65. }
  66. }