<?phpnamespace App\Entity;use App\Repository\ExperienceRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ExperienceRepository::class) */class Experience{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $employer; /** * @ORM\Column(type="date") */ private $start_at; /** * @ORM\Column(type="date", nullable=true) */ private $end_at; /** * @ORM\Column(type="text") */ private $objectif; /** * @ORM\Column(type="text") */ private $missions; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $environment; /** * @ORM\Column(type="boolean", nullable=true) */ private $actualyHere; /** * @return mixed */ public function isActualyHere() { return $this->actualyHere; } /** * @param mixed $actualyHere */ public function setActualyHere($actualyHere): void { $this->actualyHere = $actualyHere; } /** * @ORM\ManyToOne(targetEntity=Profile::class, inversedBy="experiences") * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") */ private $profile; /** * @ORM\Column(type="string", length=255) */ private $title; public function getId(): ?int { return $this->id; } public function getEmployer(): ?string { return $this->employer; } public function setEmployer(?string $employer): self { $this->employer = $employer; return $this; } public function getStartAt(): ?\DateTimeInterface { return $this->start_at; } public function setStartAt($start_at): self { $this->start_at = $start_at; return $this; } public function getEndAt(): ?\DateTimeInterface { return $this->end_at; } public function setEndAt($end_at): self { $this->end_at = $end_at; // Si end_at est null, on considère qu'il est encore en poste $this->actualyHere = ($end_at === null); return $this; } public function getObjectif(): ?string { return $this->objectif; } public function setObjectif(?string $objectif): self { $this->objectif = $objectif; return $this; } public function getMissions(): ?string { return $this->missions; } public function setMissions(?string $missions): self { $this->missions = $missions; return $this; } public function getEnvironment(): ?string { return $this->environment; } public function setEnvironment(?string $environment): self { $this->environment = $environment; return $this; } public function getProfile(): ?Profile { return $this->profile; } public function setProfile(?Profile $profile): self { $this->profile = $profile; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(?string $title): self { $this->title = $title; return $this; }}