<?php

namespace App\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="App\Repository\NotationIaTempRepository")
 * @ORM\Table(name="notation_ia_temp")
 */
class NotationIaTemp
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Activity", inversedBy="notationsIaTemp")
     * @ORM\JoinColumn(nullable=false)
     */
    private $activity;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Nature")
     * @ORM\JoinColumn(nullable=false)
     */
    private $nature;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Target")
     * @ORM\JoinColumn(nullable=true)
     */
    private $target;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Appreciation")
     * @ORM\JoinColumn(nullable=false)
     */
    private $appreciation;

    /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Indicator")
     */
    private $indicators;

    /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Commune")
     */
    private $communes;

    /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Poste")
     */
    private $postes;

     /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Arrondissement")
     */
    private $arrondissements;

    /**
     * @ORM\Column(type="integer")
     */
    private $nbOfLocation;

    /**
     * @ORM\Column(type="decimal", precision=5, scale=2)
     */
    private $targetRate;

    /**
     * @ORM\Column(type="decimal", precision=5, scale=2)
     */
    private $locationRate;

    /**
     * @ORM\Column(type="decimal", precision=5, scale=2)
     */
    private $sensitivity;

    /**
     * @ORM\Column(type="boolean")
     */
    private $duplicated = false;

    public function __construct()
    {
        $this->indicators = new ArrayCollection();
        $this->communes = new ArrayCollection();
        $this->postes = new ArrayCollection();
        $this->arrondissements = new ArrayCollection();
    }

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

    public function getActivity(): ?Activity
    {
        return $this->activity;
    }

    public function setActivity(?Activity $activity): self
    {
        $this->activity = $activity;

        return $this;
    }

    public function getNature(): ?Nature
    {
        return $this->nature;
    }

    public function setNature(?Nature $nature): self
    {
        $this->nature = $nature;

        return $this;
    }

    public function getTarget(): ?Target
    {
        return $this->target;
    }

    public function setTarget(?Target $target): self
    {
        $this->target = $target;

        return $this;
    }

    public function getAppreciation(): ?Appreciation
    {
        return $this->appreciation;
    }

    public function setAppreciation(?Appreciation $appreciation): self
    {
        $this->appreciation = $appreciation;

        return $this;
    }

    /**
     * @return Collection|Indicator[]
     */
    public function getIndicators(): Collection
    {
        return $this->indicators;
    }

    public function addIndicator(Indicator $indicator): self
    {
        if (!$this->indicators->contains($indicator)) {
            $this->indicators[] = $indicator;
        }

        return $this;
    }

    public function removeIndicator(Indicator $indicator): self
    {
        if ($this->indicators->contains($indicator)) {
            $this->indicators->removeElement($indicator);
        }

        return $this;
    }

    /**
     * @return Collection|Commune[]
     */
    public function getCommunes(): Collection
    {
        return $this->communes;
    }

    public function addCommune(Commune $commune): self
    {
        if (!$this->communes->contains($commune)) {
            $this->communes[] = $commune;
        }

        return $this;
    }

    public function removeCommune(Commune $commune): self
    {
        if ($this->communes->contains($commune)) {
            $this->communes->removeElement($commune);
        }

        return $this;
    }

    /**
     * @return Collection|Arrondissement[]
     */
    public function getArrondissements(): Collection
    {
        return $this->arrondissements;
    }

    public function addArrondissement(Arrondissement $arrondissement): self
    {
        if (!$this->arrondissements->contains($arrondissement)) {
            $this->arrondissements[] = $arrondissement;
        }

        return $this;
    }

    public function removeArrondissement(Arrondissement $arrondissement): self
    {
        if ($this->arrondissements->contains($arrondissement)) {
            $this->arrondissements->removeElement($arrondissement);
        }

        return $this;
    }

    /**
     * @return Collection|Poste[]
     */
    public function getPostes(): Collection
    {
        return $this->postes;
    }

    public function addPoste(Poste $poste): self
    {
        if (!$this->postes->contains($poste)) {
            $this->postes[] = $poste;
        }

        return $this;
    }

    public function removePoste(Poste $poste): self
    {
        if ($this->postes->contains($poste)) {
            $this->postes->removeElement($poste);
        }

        return $this;
    }

    public function getNbOfLocation(): ?int
    {
        return $this->nbOfLocation;
    }

    public function setNbOfLocation(?int $nbOfLocation): self
    {
        $this->nbOfLocation = $nbOfLocation;

        return $this;
    }

    public function getTargetRate(): ?float
    {
        return $this->targetRate;
    }

    public function setTargetRate(float $targetRate): self
    {
        $this->targetRate = $targetRate;

        return $this;
    }

    public function getLocationRate(): ?float
    {
        return $this->locationRate;
    }

    public function setLocationRate(float $locationRate): self
    {
        $this->locationRate = $locationRate;

        return $this;
    }

    public function getSensitivity(): ?float
    {
        return $this->sensitivity;
    }

    public function setSensitivity(float $sensitivity): self
    {
        $this->sensitivity = $sensitivity;

        return $this;
    }

    public function getDuplicated(): ?bool
    {
        return $this->duplicated;
    }

    public function setDuplicated(bool $duplicated): self
    {
        $this->duplicated = $duplicated;

        return $this;
    }
}