<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\ExperienceRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ExperienceRepository::class)]
#[ApiResource]
class Experience
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $poste = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $typeemploi = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nomdeentreprise = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lieu = null;
#[ORM\ManyToOne(inversedBy: 'experiences')]
#[ORM\JoinColumn(referencedColumnName:"id",onDelete: "CASCADE", name: "user_id")]
private ?User $user = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Typedeprofil = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nbexperience = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $datededebut = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $datedefin = null;
public function __toString(): string
{
return $this->getTitreduprofil();
}
public function getId(): ?int
{
return $this->id;
}
public function getPoste(): ?string
{
return $this->poste;
}
public function setPoste(?string $poste): self
{
$this->poste = $poste;
return $this;
}
public function getTypeemploi(): ?string
{
return $this->typeemploi;
}
public function setTypeemploi(?string $typeemploi): self
{
$this->typeemploi = $typeemploi;
return $this;
}
public function getNomdeentreprise(): ?string
{
return $this->nomdeentreprise;
}
public function setNomdeentreprise(?string $nomdeentreprise): self
{
$this->nomdeentreprise = $nomdeentreprise;
return $this;
}
public function getLieu(): ?string
{
return $this->lieu;
}
public function setLieu(?string $lieu): self
{
$this->lieu = $lieu;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTypedeprofil(): ?string
{
return $this->Typedeprofil;
}
public function setTypedeprofil(?string $Typedeprofil): self
{
$this->Typedeprofil = $Typedeprofil;
return $this;
}
public function getNbexperience(): ?string
{
return $this->nbexperience;
}
public function setNbexperience(?string $nbexperience): self
{
$this->nbexperience = $nbexperience;
return $this;
}
public function getDatededebut(): ?\DateTimeInterface
{
return $this->datededebut;
}
public function setDatededebut(?\DateTimeInterface $datededebut): self
{
$this->datededebut = $datededebut;
return $this;
}
public function getDatedefin(): ?\DateTimeInterface
{
return $this->datedefin;
}
public function setDatedefin(?\DateTimeInterface $datedefin): self
{
$this->datedefin = $datedefin;
return $this;
}
}