src/Entity/Uvemargement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UvemargementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=UvemargementRepository::class)
  9.  */
  10. class Uvemargement
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=1)
  20.      */
  21.     private $jour;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Uvemargementfield::class, mappedBy="uvemargement",cascade={"persist"})
  24.      * @ORM\OrderBy({"uv" = "ASC"})
  25.      */
  26.     private $uvemargementfield;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity=Uvemargementhead::class, inversedBy="uvemargement",cascade={"persist"})
  29.      * @ORM\JoinColumn(nullable=false)
  30.      */
  31.     private $uvemargementhead;
  32.     public function __construct()
  33.     {
  34.         $this->uvemargementfield = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getJour(): ?string
  41.     {
  42.         return $this->jour;
  43.     }
  44.     public function setJour(string $jour): self
  45.     {
  46.         $this->jour $jour;
  47.         return $this;
  48.     }
  49.     /**
  50.      * @return Collection<int, Uvemargementfield>
  51.      */
  52.     public function getUvemargementfield(): Collection
  53.     {
  54.         return $this->uvemargementfield;
  55.     }
  56.     public function addUvemargementfield(Uvemargementfield $uvemargementfield): self
  57.     {
  58.         if (!$this->uvemargementfield->contains($uvemargementfield)) {
  59.             $this->uvemargementfield[] = $uvemargementfield;
  60.             $uvemargementfield->setUvemargement($this);
  61.         }
  62.         return $this;
  63.     }
  64.     public function removeUvemargementfield(Uvemargementfield $uvemargementfield): self
  65.     {
  66.         if ($this->uvemargementfield->removeElement($uvemargementfield)) {
  67.             // set the owning side to null (unless already changed)
  68.             if ($uvemargementfield->getUvemargement() === $this) {
  69.                 $uvemargementfield->setUvemargement(null);
  70.             }
  71.         }
  72.         return $this;
  73.     }
  74.     public function getUvemargementhead(): ?Uvemargementhead
  75.     {
  76.         return $this->uvemargementhead;
  77.     }
  78.     public function setUvemargementhead(?Uvemargementhead $uvemargementhead): self
  79.     {
  80.         $this->uvemargementhead $uvemargementhead;
  81.         return $this;
  82.     }
  83. }