src/Entity/QPV.php line 17

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\QPVRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * QPV.
  8. *
  9. * @ORM\Table(name="QPV")
  10. *
  11. * @ORM\Entity(repositoryClass=QPVRepository::class)
  12. */
  13. class QPV
  14. {
  15. /**
  16. * @var int
  17. *
  18. * @ORM\Column(name="id", type="integer")
  19. *
  20. * @ORM\Id
  21. *
  22. * @ORM\GeneratedValue(strategy="AUTO")
  23. */
  24. private $id;
  25. /**
  26. * @var string
  27. *
  28. * @ORM\Column(name="code_quartier", type="string", length=255)
  29. */
  30. private $codeQuartier;
  31. /**
  32. * @var string
  33. *
  34. * @ORM\Column(name="quartier_prioritaire", type="string", length=255)
  35. */
  36. private $quartierPrioritaire;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="communes_concernees", type="string", length=255)
  41. */
  42. private $communesConcernees;
  43. /**
  44. * @ORM\ManyToOne(targetEntity="Departement")
  45. *
  46. * @ORM\JoinColumn(name="departement_id", referencedColumnName="id")
  47. */
  48. private $departement;
  49. #[\Override]
  50. public function __toString(): string
  51. {
  52. return $this->codeQuartier.' - '.$this->quartierPrioritaire.' ('.$this->getCommunesConcernees().' - '.$this->getDepartement()->getNum().')';
  53. }
  54. /**
  55. * Get id.
  56. *
  57. * @return int
  58. */
  59. public function getId()
  60. {
  61. return $this->id;
  62. }
  63. /**
  64. * Set codeQuartier.
  65. *
  66. * @param string $codeQuartier
  67. */
  68. public function setCodeQuartier($codeQuartier): static
  69. {
  70. $this->codeQuartier = $codeQuartier;
  71. return $this;
  72. }
  73. /**
  74. * Get codeQuartier.
  75. *
  76. * @return string
  77. */
  78. public function getCodeQuartier()
  79. {
  80. return $this->codeQuartier;
  81. }
  82. /**
  83. * Set quartierPrioritaire.
  84. *
  85. * @param string $quartierPrioritaire
  86. */
  87. public function setQuartierPrioritaire($quartierPrioritaire): static
  88. {
  89. $this->quartierPrioritaire = $quartierPrioritaire;
  90. return $this;
  91. }
  92. /**
  93. * Get quartierPrioritaire.
  94. *
  95. * @return string
  96. */
  97. public function getQuartierPrioritaire()
  98. {
  99. return $this->quartierPrioritaire;
  100. }
  101. /**
  102. * Set communesConcernees.
  103. *
  104. * @param string $communesConcernees
  105. */
  106. public function setCommunesConcernees($communesConcernees): static
  107. {
  108. $this->communesConcernees = $communesConcernees;
  109. return $this;
  110. }
  111. /**
  112. * Get communesConcernees.
  113. *
  114. * @return string
  115. */
  116. public function getCommunesConcernees()
  117. {
  118. return $this->communesConcernees;
  119. }
  120. /**
  121. * Set departement.
  122. *
  123. * @return Commune
  124. */
  125. public function setDepartement(?Departement $departement = null): static
  126. {
  127. $this->departement = $departement;
  128. return $this;
  129. }
  130. /**
  131. * Get departement.
  132. *
  133. * @return Departement
  134. */
  135. public function getDepartement()
  136. {
  137. return $this->departement;
  138. }
  139. }