src/Entity/Referentiel/Canton.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Referentiel;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity
  6.  * @ORM\Table(name="efc.ref_canton")
  7.  */
  8. class Canton {
  9. // <editor-fold defaultstate="collapsed" desc="Attributs privés">
  10.     /**
  11.      * @ORM\Column(type="integer")
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue(strategy="IDENTITY")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=70)
  18.      */
  19.     private $code_externe;
  20.     /**
  21.      * @ORM\Column(type="string", length=100)
  22.      */
  23.     private $libelle;
  24.     /**
  25.      * @ORM\ManyToMany(targetEntity="App\Entity\Referentiel\Commune", mappedBy="cantons")
  26.      */
  27.     private $communes;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity="App\Entity\AssistantMaternel\AssistantMaternel", mappedBy="canton")
  30.      */
  31.     private $assmats;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity="App\Entity\MAM\MAM", mappedBy="canton")
  34.      */
  35.     private $mams;
  36. // </editor-fold>
  37. // <editor-fold desc="Accesseurs">
  38. // 
  39.     /**
  40.      * Get id
  41.      *
  42.      * @return integer
  43.      */
  44.     public function getId() {
  45.         return $this->id;
  46.     }
  47.     /**
  48.      * Set codeExterne
  49.      *
  50.      * @param integer $codeExterne
  51.      *
  52.      * @return Canton
  53.      */
  54.     public function setCodeExterne($codeExterne) {
  55.         $this->code_externe $codeExterne;
  56.         return $this;
  57.     }
  58.     /**
  59.      * Get codeExterne
  60.      *
  61.      * @return integer
  62.      */
  63.     public function getCodeExterne() {
  64.         return $this->code_externe;
  65.     }
  66.     /**
  67.      * Set libelle
  68.      *
  69.      * @param string $libelle
  70.      *
  71.      * @return SecteurPmi
  72.      */
  73.     public function setLibelle($libelle) {
  74.         $this->libelle $libelle;
  75.         return $this;
  76.     }
  77.     /**
  78.      * Get libelle
  79.      *
  80.      * @return string
  81.      */
  82.     public function getLibelle() {
  83.         return $this->libelle;
  84.     }
  85.     /**
  86.      * Get communes
  87.      *
  88.      * @return \Doctrine\Common\Collections\Collection
  89.      */
  90.     public function getCommunes() {
  91.         return $this->communes;
  92.     }
  93. // </editor-fold>
  94. // <editor-fold desc="Méthodes publiques">
  95.     /**
  96.      * Constructor
  97.      */
  98.     public function __construct() {
  99.     }
  100.     /**
  101.      * Add commune
  102.      *
  103.      * @param Commune $commune
  104.      *
  105.      * @return Canton
  106.      */
  107.     public function addCommune(Commune $commune) {
  108.         $this->communes[] = $commune;
  109.         return $this;
  110.     }
  111.     /**
  112.      * Remove commune
  113.      *
  114.      * @param Commune $commune
  115.      */
  116.     public function removeCommune(Commune $commune) {
  117.         $this->communes->removeElement($commune);
  118.     }
  119. // </editor-fold>
  120. }