<?php

namespace App\Entity;

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

/**
 * @ORM\Entity(repositoryClass=IndiceCommuneRepository::class)
 */
class IndiceCommune
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private $id;

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

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

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    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\ManyToOne(targetEntity=Year::class)
     */
    private $year;

    /**
     * @ORM\ManyToOne(targetEntity=Commune::class)
     */
    private $commune;

    /**
     * @ORM\ManyToOne(targetEntity=Indicator::class, inversedBy="indiceCommunes")
     */
    private $indicator;

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

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

    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 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 getYear(): ?Year
    {
        return $this->year;
    }

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

        return $this;
    }

    public function getCommune(): ?Commune
    {
        return $this->commune;
    }

    public function setCommune(?Commune $commune): self
    {
        $this->commune = $commune;

        return $this;
    }

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

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

        return $this;
    }

    public function getSource(): ?string
    {
        return $this->source;
    }

    public function setSource(?string $source): self
    {
        $this->source = $source;

        return $this;
    }
}
