<?php
namespace App\Entity;
use App\Repository\TarifUsagerRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: TarifUsagerRepository::class)]
class TarifUsager
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotNull(message:'Le champ Intitulé du tarif doit être renseigné')]
private ?string $intituleTarif = null;
#[ORM\Column(type: Types::DECIMAL, precision: 20, scale: 2)]
#[Assert\Type(type: 'numeric')]
#[Assert\PositiveOrZero]
#[Assert\NotNull(message: 'Le champ tarif doit être renseigé')]
private ?string $tarif = null;
#[ORM\ManyToOne(inversedBy: 'tarifUsager')]
#[ORM\JoinColumn(name: 'donnee_performance_id', referencedColumnName: 'id', nullable: true)]
private ?DonneePerformance $donneePerformance = null;
public function getId(): ?int
{
return $this->id;
}
public function getIntituleTarif(): ?string
{
return $this->intituleTarif;
}
public function setIntituleTarif(string $intituleTarif): static
{
$this->intituleTarif = $intituleTarif;
return $this;
}
public function getTarif(): ?string
{
return $this->tarif;
}
public function setTarif(string $tarif): static
{
$this->tarif = $tarif;
return $this;
}
public function getDonneePerformance(): ?DonneePerformance
{
return $this->donneePerformance;
}
public function setDonneePerformance(?DonneePerformance $donneePerformance): static
{
$this->donneePerformance = $donneePerformance;
return $this;
}
}