<?php

namespace App\Entity;

use App\Repository\ParametreRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Ignore;

/**
 * @ORM\Entity(repositoryClass=ParametreRepository::class)
 * @ORM\Table(schema="sav")
 */
class Parametre
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=80, nullable=true)
     */
    private $libelle;

    /**
     * @ORM\Column(type="bigint", nullable=true)
     */
    private $sequence;

    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    private $nom_utilisateur;

    /**
     * @ORM\Column(type="string", length=200, nullable=true)
     */
    private $valeur_alphanum;

    /**
     * @ORM\Column(type="float", nullable=true)
     */
    private $valeur_num;

    /**
     * @ORM\Column(type="string", length=200, nullable=true)
     */
    private $note;

    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    private $regroup_param;

    /**
     * @ORM\OneToMany(targetEntity=PlnParametres::class, mappedBy="parametre", orphanRemoval=true)
     * @Ignore()
     */
    private $plnParametres;

    public function __construct()
    {
        $this->plnParametres = new ArrayCollection();
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getLibelle(): ?string
    {
        return $this->libelle;
    }

    public function setLibelle(?string $libelle): self
    {
        $this->libelle = $libelle;

        return $this;
    }

    public function getSequence(): ?string
    {
        return $this->sequence;
    }

    public function setSequence(?string $sequence): self
    {
        $this->sequence = $sequence;

        return $this;
    }

    public function getNomUtilisateur(): ?string
    {
        return $this->nom_utilisateur;
    }

    public function setNomUtilisateur(?string $nom_utilisateur): self
    {
        $this->nom_utilisateur = $nom_utilisateur;

        return $this;
    }

    public function getValeurAlphanum(): ?string
    {
        return $this->valeur_alphanum;
    }

    public function setValeurAlphanum(?string $valeur_alphanum): self
    {
        $this->valeur_alphanum = $valeur_alphanum;

        return $this;
    }

    public function getValeurNum(): ?float
    {
        return $this->valeur_num;
    }

    public function setValeurNum(?float $valeur_num): self
    {
        $this->valeur_num = $valeur_num;

        return $this;
    }

    public function getNote(): ?string
    {
        return $this->note;
    }

    public function setNote(?string $note): self
    {
        $this->note = $note;

        return $this;
    }

    public function getRegroupParam(): ?string
    {
        return $this->regroup_param;
    }

    public function setRegroupParam(?string $regroup_param): self
    {
        $this->regroup_param = $regroup_param;

        return $this;
    }

    /**
     * @return Collection<int, PlnParametres>
     */
    public function getPlnParametres(): Collection
    {
        return $this->plnParametres;
    }

    public function addPlnParametre(PlnParametres $plnParametre): self
    {
        if (!$this->plnParametres->contains($plnParametre)) {
            $this->plnParametres[] = $plnParametre;
            $plnParametre->setParametre($this);
        }

        return $this;
    }

    public function removePlnParametre(PlnParametres $plnParametre): self
    {
        if ($this->plnParametres->removeElement($plnParametre)) {
            // set the owning side to null (unless already changed)
            if ($plnParametre->getParametre() === $this) {
                $plnParametre->setParametre(null);
            }
        }

        return $this;
    }
}
