<?php
namespace App\Entity;
use App\Repository\BlocHeureRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BlocHeureRepository::class)]
class BlocHeure
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::SMALLINT)]
private ?int $jour = null;
#[ORM\Column(type: Types::SMALLINT)]
private ?int $duree = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?Matiere $refMatiere = null;
public function getId(): ?int
{
return $this->id;
}
public function getJour(): ?int
{
return $this->jour;
}
public function setJour(int $jour): self
{
$this->jour = $jour;
return $this;
}
public function getDuree(): ?int
{
return $this->duree;
}
public function setDuree(int $duree): self
{
$this->duree = $duree;
return $this;
}
public function getRefMatiere(): ?Matiere
{
return $this->refMatiere;
}
public function setRefMatiere(?Matiere $refMatiere): self
{
$this->refMatiere = $refMatiere;
return $this;
}
public function __toString(): string
{
return $this->refMatiere." (j:".$this->jour." duree:".$this->duree."h)"; // TODO: Implement __toString() method.
}
}