<?php
namespace App\Entity;
use App\Repository\CertificationRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CertificationRepository::class)
*/
class Certification
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="string", length=255)
*/
private $etablissement;
/**
* @ORM\ManyToOne(targetEntity=Profile::class, inversedBy="certifications")
* @ORM\JoinColumn(onDelete="CASCADE")
*/
private $profile;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $obtention_year;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getEtablissement(): ?string
{
return $this->etablissement;
}
public function setEtablissement(?string $etablissement): self
{
$this->etablissement = $etablissement;
return $this;
}
public function getProfile(): ?Profile
{
return $this->profile;
}
public function setProfile(?Profile $profile): self
{
$this->profile = $profile;
return $this;
}
public function getObtentionYear(): ?int
{
return $this->obtention_year;
}
public function setObtentionYear($obtention_year): self
{
// Forcez la conversion en int ici
$this->obtention_year = $obtention_year !== null ? (int) $obtention_year : null;
return $this;
}
}