src/Entity/TarifUsager.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TarifUsagerRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. #[ORM\Entity(repositoryClassTarifUsagerRepository::class)]
  8. class TarifUsager
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     #[Assert\NotNull(message:'Le champ Intitulé du tarif doit être renseigné')]
  16.     private ?string $intituleTarif null;
  17.     #[ORM\Column(typeTypes::DECIMALprecision20scale2)]
  18.     #[Assert\Type(type'numeric')]
  19.     #[Assert\PositiveOrZero]
  20.     #[Assert\NotNull(message'Le champ tarif doit être renseigé')]
  21.     private ?string $tarif null;
  22.     #[ORM\ManyToOne(inversedBy'tarifUsager')]
  23.     #[ORM\JoinColumn(name'donnee_performance_id'referencedColumnName'id'nullabletrue)]
  24.     private ?DonneePerformance $donneePerformance null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getIntituleTarif(): ?string
  30.     {
  31.         return $this->intituleTarif;
  32.     }
  33.     public function setIntituleTarif(string $intituleTarif): static
  34.     {
  35.         $this->intituleTarif $intituleTarif;
  36.         return $this;
  37.     }
  38.     public function getTarif(): ?string
  39.     {
  40.         return $this->tarif;
  41.     }
  42.     public function setTarif(string $tarif): static
  43.     {
  44.         $this->tarif $tarif;
  45.         return $this;
  46.     }
  47.     public function getDonneePerformance(): ?DonneePerformance
  48.     {
  49.         return $this->donneePerformance;
  50.     }
  51.     public function setDonneePerformance(?DonneePerformance $donneePerformance): static
  52.     {
  53.         $this->donneePerformance $donneePerformance;
  54.         return $this;
  55.     }
  56. }