Taxe.php 1,74 ko
Newer Older
NOPepin's avatar
NOPepin a validé
<?php

namespace App\Entity;

use ApiPlatform\Metadata\ApiResource;
use App\Repository\TaxeRepository;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: TaxeRepository::class)]
#[ApiResource]
class Taxe
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\ManyToOne(inversedBy: 'taxes')]
    #[ORM\JoinColumn(nullable: false)]
    private ?Commune $commune = null;

    #[ORM\Column]
    private ?int $annee = null;

    #[ORM\ManyToOne(inversedBy: 'taxes')]
    #[ORM\JoinColumn(nullable: false)]
    private ?TypeTaxe $type = null;

    #[ORM\Column]
    private ?float $taux = null;

    #[ORM\Column]
    private ?float $volume = null;

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

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

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

        return $this;
    }

    public function getAnnee(): ?int
    {
        return $this->annee;
    }

    public function setAnnee(int $annee): static
    {
        $this->annee = $annee;

        return $this;
    }

    public function getType(): ?TypeTaxe
    {
        return $this->type;
    }

    public function setType(?TypeTaxe $type): static
    {
        $this->type = $type;

        return $this;
    }

    public function getTaux(): ?float
    {
        return $this->taux;
    }

    public function setTaux(float $taux): static
    {
        $this->taux = $taux;

        return $this;
    }

    public function getVolume(): ?float
    {
        return $this->volume;
    }

    public function setVolume(float $volume): static
    {
        $this->volume = $volume;

        return $this;
    }
}