src/Entity/Periode.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Periode
  8.  *
  9.  * @ORM\Table(name="mmpp_periode")
  10.  * @ORM\Entity(repositoryClass="App\Repository\PeriodeRepository");
  11.  */
  12. class Periode
  13. {
  14.     /**
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string")
  22.      */
  23.     private $name;
  24.     /**
  25.      * @ORM\Column(type="boolean", name="is_default")
  26.      */
  27.     private $isDefault;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity="Preinscription", mappedBy="periode")
  30.      */
  31.     private $preinscriptions;
  32.     /**
  33.      * Constructor
  34.      */
  35.     public function __construct()
  36.     {
  37.         $this->preinscriptions = new \Doctrine\Common\Collections\ArrayCollection();
  38.     }
  39.     /**
  40.      * Get id
  41.      *
  42.      * @return integer
  43.      */
  44.     public function getId()
  45.     {
  46.         return $this->id;
  47.     }
  48.     /**
  49.      * Set name
  50.      *
  51.      * @param string $name
  52.      * @return Periode
  53.      */
  54.     public function setName($name)
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     /**
  60.      * Get name
  61.      *
  62.      * @return string
  63.      */
  64.     public function getName()
  65.     {
  66.         return $this->name;
  67.     }
  68.     /**
  69.      * Set isDefault
  70.      *
  71.      * @param boolean $isDefault
  72.      * @return Periode
  73.      */
  74.     public function setIsDefault($isDefault)
  75.     {
  76.         $this->isDefault $isDefault;
  77.         return $this;
  78.     }
  79.     /**
  80.      * Get isDefault
  81.      *
  82.      * @return boolean
  83.      */
  84.     public function getIsDefault()
  85.     {
  86.         return $this->isDefault;
  87.     }
  88.     /**
  89.      * Add preinscriptions
  90.      *
  91.      * @param \App\Entity\Preinscription $preinscriptions
  92.      * @return Periode
  93.      */
  94.     public function addPreinscription(\App\Entity\Preinscription $preinscriptions)
  95.     {
  96.         $this->preinscriptions[] = $preinscriptions;
  97.         return $this;
  98.     }
  99.     /**
  100.      * Remove preinscriptions
  101.      *
  102.      * @param \App\Entity\Preinscription $preinscriptions
  103.      */
  104.     public function removePreinscription(\App\Entity\Preinscription $preinscriptions)
  105.     {
  106.         $this->preinscriptions->removeElement($preinscriptions);
  107.     }
  108.     /**
  109.      * Get preinscriptions
  110.      *
  111.      * @return \Doctrine\Common\Collections\Collection
  112.      */
  113.     public function getPreinscriptions()
  114.     {
  115.         return $this->preinscriptions;
  116.     }
  117.     public function isIsDefault(): ?bool
  118.     {
  119.         return $this->isDefault;
  120.     }
  121. }