<?php

namespace App\Entity;

use App\Repository\IndiceRepository;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=IndiceRepository::class)
 * @ORM\Table(name="indice",
 *      uniqueConstraints={@ORM\UniqueConstraint(name="indice_unique",columns={"indicator_id","year"})},
 * )
 */
class Indice
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity=Indicator::class)
     * @ORM\JoinColumn(nullable=false)
     */
    private $indicator;

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

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

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

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

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


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

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

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

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

    /**
     * @ORM\ManyToOne(targetEntity=Desagregation::class)
     */
    private $desagregation;

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

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

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

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

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

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

    public function getIndicator(): ?Indicator
    {
        return $this->indicator;
    }

    public function setIndicator(?Indicator $indicator): self
    {
        $this->indicator = $indicator;

        return $this;
    }

    public function getYear(): ?int
    {
        return $this->year;
    }

    public function setYear(int $year): self
    {
        $this->year = $year;

        return $this;
    }

    public function getValue(): ?float
    {
        return $this->value;
    }

    public function setValue(?float $value): self
    {
        $this->value = $value;

        return $this;
    }

    public function getObservation(): ?string
    {
        return $this->observation;
    }

    public function setObservation(?string $observation): self
    {
        $this->observation = $observation;

        return $this;
    }

    public function getRefYear(): ?int
    {
        return $this->refYear;
    }

    public function setRefYear(?int $refYear): self
    {
        $this->refYear = $refYear;

        return $this;
    }

    public function getRefValue(): ?float
    {
        return $this->refValue;
    }

    public function setRefValue(?float $refValue): self
    {
        $this->refValue = $refValue;

        return $this;
    }

    /*public function getRecValue(): ?string
    {
        return $this->recValue;
    }

    public function setRecValue(?string $recValue): self
    {
        $this->recValue = $recValue;

        return $this;
    }*/

    public function getMinValue(): ?float
    {
        return $this->minValue;
    }

    public function setMinValue(?float $minValue): self
    {
        $this->minValue = $minValue;

        return $this;
    }

    public function getMaxValue(): ?float
    {
        return $this->maxValue;
    }

    public function setMaxValue(?float $maxValue): self
    {
        $this->maxValue = $maxValue;

        return $this;
    }

    /*public function getTrend(): ?string
    {
        return $this->trend;
    }

    public function setTrend(?string $trend): self
    {
        $this->trend = $trend;

        return $this;
    }*/

    public function getIndiceDimentionnel(): ?float
    {
        return $this->indice_dimentionnel;
    }

    public function setIndiceDimentionnel(?float $indice_dimentionnel): self
    {
        $this->indice_dimentionnel = $indice_dimentionnel;

        return $this;
    }

    public function getDesagregation(): ?Desagregation
    {
        return $this->desagregation;
    }

    public function setDesagregation(?Desagregation $desagregation): self
    {
        $this->desagregation = $desagregation;

        return $this;
    }

    public function getModalite(): ?int
    {
        return $this->modalite;
    }

    public function setModalite(?int $modalite): self
    {
        $this->modalite = $modalite;

        return $this;
    }

    public function getValeurAdministrative(): ?float
    {
        return $this->valeur_administrative;
    }

    public function setValeurAdministrative(?float $valeur_administrative): self
    {
        $this->valeur_administrative = $valeur_administrative;

        return $this;
    }

    public function getInstad(): ?bool
    {
        return $this->instad;
    }

    public function setInstad(?bool $instad): self
    {
        $this->instad = $instad;

        return $this;
    }

    public function getObservationAdministrative(): ?string
    {
        return $this->observation_administrative;
    }

    public function setObservationAdministrative(?string $observation_administrative): self
    {
        $this->observation_administrative = $observation_administrative;

        return $this;
    }
}
