<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* Cursus
*
* @ORM\Table(name="CURSUS", indexes={@ORM\Index(name="utilisateurmaj_id", columns={"utilisateurmaj_id"})})
* @ORM\Entity
*/
class Cursus
{
/**
* @var int
*
* @ORM\Column(name="idcursus", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idcursus;
/**
* @var string
*
* @ORM\Column(name="libellecursus", type="string", length=255, nullable=false)
*/
private $libellecursus;
/**
* @var string
*
* @ORM\Column(name="codecursus", type="string", length=5, nullable=false)
*/
private $codecursus;
/**
* @var \DateTime
*
* @ORM\Column(name="datecrea", type="datetime", nullable=false)
*/
private $datecrea;
/**
* @var \DateTime
*
* @ORM\Column(name="datemaj", type="datetime", nullable=false)
*/
private $datemaj;
/**
* @var \Utilisateur
*
* @ORM\ManyToOne(targetEntity="Utilisateur")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="utilisateurmaj_id", referencedColumnName="idutilisateur")
* })
*/
private $utilisateurmaj;
public function __ToString(): string
{
return $this->codecursus . " - " . $this->libellecursus;
}
public function getIdcursus(): ?int
{
return $this->idcursus;
}
public function getLibellecursus(): ?string
{
return $this->libellecursus;
}
public function setLibellecursus(string $libellecursus): static
{
$this->libellecursus = $libellecursus;
return $this;
}
public function getCodecursus(): ?string
{
return $this->codecursus;
}
public function setCodecursus(string $codecursus): static
{
$this->codecursus = $codecursus;
return $this;
}
public function getDatecrea(): ?\DateTimeInterface
{
return $this->datecrea;
}
public function setDatecrea(\DateTimeInterface $datecrea): static
{
$this->datecrea = $datecrea;
return $this;
}
public function getDatemaj(): ?\DateTimeInterface
{
return $this->datemaj;
}
public function setDatemaj(\DateTimeInterface $datemaj): static
{
$this->datemaj = $datemaj;
return $this;
}
public function getUtilisateurmaj(): ?Utilisateur
{
return $this->utilisateurmaj;
}
public function setUtilisateurmaj(?Utilisateur $utilisateurmaj): static
{
$this->utilisateurmaj = $utilisateurmaj;
return $this;
}
}