src/Entity/Prestation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping\Entity;
  4. use Doctrine\ORM\Mapping\Table;
  5. use Doctrine\ORM\Mapping\Id;
  6. use Doctrine\ORM\Mapping\GeneratedValue;
  7. use Doctrine\ORM\Mapping\Column;
  8. use Doctrine\ORM\Mapping\ManyToOne;
  9. use Doctrine\ORM\Mapping\JoinColumn;
  10. #[Entity]
  11. #[Table(name"prestation")]
  12. class Prestation
  13. {
  14.     #[Id]
  15.     #[GeneratedValue]
  16.     #[Column(type"integer")]
  17.     private int $id;
  18.     #[Column(type"string"length255)]
  19.     private string $nom;
  20.     #[Column(type"decimal"scale2)]
  21.     private float $prix;
  22.     #[ManyToOne(targetEntityCategorie::class)]
  23.     #[JoinColumn(name"categorie_id"referencedColumnName"id")]
  24.     private Categorie $categorie;
  25.     #[Column(type"boolean")]
  26.     private bool $deleted false;
  27.     public function getId(): int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function setId(int $id): void
  32.     {
  33.         $this->id $id;
  34.     }
  35.     public function getNom(): string
  36.     {
  37.         return $this->nom;
  38.     }
  39.     public function setNom(string $nom): void
  40.     {
  41.         $this->nom $nom;
  42.     }
  43.     public function getPrix(): float
  44.     {
  45.         return $this->prix;
  46.     }
  47.     public function setPrix(float $prix): void
  48.     {
  49.         $this->prix $prix;
  50.     }
  51.     public function getCategorie(): Categorie
  52.     {
  53.         return $this->categorie;
  54.     }
  55.     public function setCategorie(Categorie $categorie): void
  56.     {
  57.         $this->categorie $categorie;
  58.     }
  59.     public function isDeleted(): bool
  60.     {
  61.         return $this->deleted;
  62.     }
  63.     public function setDeleted(bool $deleted): void
  64.     {
  65.         $this->deleted $deleted;
  66.     }
  67. }