src/Entity/BlocHeure.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BlocHeureRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassBlocHeureRepository::class)]
  7. class BlocHeure
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(typeTypes::SMALLINT)]
  14.     private ?int $jour null;
  15.     #[ORM\Column(typeTypes::SMALLINT)]
  16.     private ?int $duree null;
  17.     #[ORM\ManyToOne]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Matiere $refMatiere null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getJour(): ?int
  25.     {
  26.         return $this->jour;
  27.     }
  28.     public function setJour(int $jour): self
  29.     {
  30.         $this->jour $jour;
  31.         return $this;
  32.     }
  33.     public function getDuree(): ?int
  34.     {
  35.         return $this->duree;
  36.     }
  37.     public function setDuree(int $duree): self
  38.     {
  39.         $this->duree $duree;
  40.         return $this;
  41.     }
  42.     public function getRefMatiere(): ?Matiere
  43.     {
  44.         return $this->refMatiere;
  45.     }
  46.     public function setRefMatiere(?Matiere $refMatiere): self
  47.     {
  48.         $this->refMatiere $refMatiere;
  49.         return $this;
  50.     }
  51.     public function __toString(): string
  52.     {
  53.      return $this->refMatiere." (j:".$this->jour." duree:".$this->duree."h)";   // TODO: Implement __toString() method.
  54.     }
  55. }