<?php

namespace App\Entity;

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

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

    /**
     * @ORM\ManyToOne(targetEntity=NormeActionCommune::class, inversedBy="action")
     */
    private $norme;

    /**
     * @ORM\Column(type="text")
     */
    private $action;

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

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

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

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

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

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

    /**
     * @ORM\ManyToOne(targetEntity=Commune::class, inversedBy="activityNormeCommunes")
     * @ORM\JoinColumn(nullable=false)
     */
    private $commune;

    public function __toString()
    {
        return $this->getAction();
    }

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

    public function getNorme(): ?NormeActionCommune
    {
        return $this->norme;
    }

    public function setNorme(?NormeActionCommune $norme): self
    {
        $this->norme = $norme;

        return $this;
    }

    public function getAction(): ?string
    {
        return $this->action;
    }

    public function setAction(string $action): self
    {
        $this->action = $action;

        return $this;
    }

    public function getPrevu(): ?string
    {
        return $this->prevu;
    }

    public function setPrevu(?string $prevu): self
    {
        $this->prevu = $prevu;

        return $this;
    }

    public function getRealise(): ?string
    {
        return $this->realise;
    }

    public function setRealise(?string $realise): self
    {
        $this->realise = $realise;

        return $this;
    }

    public function getTef(): ?float
    {
        return $this->tef;
    }

    public function setTef(?float $tef): self
    {
        $this->tef = $tef;

        return $this;
    }

    public function getContraintes(): ?string
    {
        return $this->contraintes;
    }

    public function setContraintes(?string $contraintes): self
    {
        $this->contraintes = $contraintes;

        return $this;
    }

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

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

        return $this;
    }

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

    public function setYear(int $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;
    }
}
