src/Entity/Uvemargementhead.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UvemargementheadRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=UvemargementheadRepository::class)
  9.  */
  10. class Uvemargementhead
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Session::class, inversedBy="uvemargementheads")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $session;
  23.     /**
  24.      * @ORM\Column(type="string")
  25.      */
  26.     private $startdate;
  27.     /**
  28.      * @ORM\Column(type="string")
  29.      */
  30.     private $enddate;
  31.     /**
  32.      * @ORM\OneToMany(targetEntity=Uvemargement::class, mappedBy="uvemargementhead")
  33.      */
  34.     private $uvemargement;
  35.     public function __construct()
  36.     {
  37.         $this->uvemargement = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getSession(): ?Session
  44.     {
  45.         return $this->session;
  46.     }
  47.     public function setSession(?Session $session): self
  48.     {
  49.         $this->session $session;
  50.         return $this;
  51.     }
  52.     public function getStartdate(): ?String
  53.     {
  54.         return $this->startdate;
  55.     }
  56.     public function setStartdate(String $startdate): self
  57.     {
  58.         $this->startdate $startdate;
  59.         return $this;
  60.     }
  61.     public function getEnddate(): ?String
  62.     {
  63.         return $this->enddate;
  64.     }
  65.     public function setEnddate(String $enddate): self
  66.     {
  67.         $this->enddate $enddate;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return Collection<int, Uvemargement>
  72.      */
  73.     public function getUvemargement(): Collection
  74.     {
  75.         return $this->uvemargement;
  76.     }
  77.     public function addUvemargement(Uvemargement $uvemargement): self
  78.     {
  79.         if (!$this->uvemargement->contains($uvemargement)) {
  80.             $this->uvemargement[] = $uvemargement;
  81.             $uvemargement->setUvemargementhead($this);
  82.         }
  83.         return $this;
  84.     }
  85.     public function removeUvemargement(Uvemargement $uvemargement): self
  86.     {
  87.         if ($this->uvemargement->removeElement($uvemargement)) {
  88.             // set the owning side to null (unless already changed)
  89.             if ($uvemargement->getUvemargementhead() === $this) {
  90.                 $uvemargement->setUvemargementhead(null);
  91.             }
  92.         }
  93.         return $this;
  94.     }
  95. }