src/Entity/Parcours.php line 15
<?php
namespace App\Entity;
use App\Repository\ParcoursRepository;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
#[ORM\Entity(repositoryClass: ParcoursRepository::class)]
#[ORM\HasLifecycleCallbacks]
class Parcours
{
const IMAGE_PATH = 'uploads/images/parcours/';
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $entreprise = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $poste = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lien = null;
#[ORM\Column(length: 255)]
private ?string $image = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTime $date_debut = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTime $date_fin = null;
#[ORM\ManyToMany(targetEntity: Skill::class)]
private Collection $skills;
#[ORM\Column]
private ?bool $current = null;
public function __construct()
{
$this->skills = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getEntreprise(): ?string
{
return $this->entreprise;
}
public function setEntreprise(?string $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function getPoste(): ?string
{
return $this->poste;
}
public function setPoste(?string $poste): self
{
$this->poste = $poste;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getLien(): ?string
{
return $this->lien;
}
public function setLien(?string $lien): self
{
$this->lien = $lien;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(string $image): self
{
$this->image = $image;
return $this;
}
public function getDateDebut(): ?DateTime
{
return $this->date_debut;
}
public function setDateDebut(?DateTime $date_debut): self
{
$this->date_debut = $date_debut;
return $this;
}
public function getDateFin(): ?\DateTime
{
return $this->date_fin;
}
public function setDateFin(?\DateTime $date_fin): self
{
$this->date_fin = $date_fin;
return $this;
}
/**
* @return Collection<int, Skill>
*/
public function getSkills(): Collection
{
return $this->skills;
}
public function addSkill(Skill $skill): self
{
if (!$this->skills->contains($skill)) {
$this->skills->add($skill);
}
return $this;
}
public function removeSkill(Skill $skill): self
{
$this->skills->removeElement($skill);
return $this;
}
public function isCurrent(): ?bool
{
return $this->current;
}
public function setCurrent(bool $current): self
{
$this->current = $current;
return $this;
}
public function getAssetImage(): ?string
{
return self::IMAGE_PATH.$this->image;
}
}