src/Entity/Experience.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\ExperienceRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassExperienceRepository::class)]
  8. #[ApiResource]
  9. class Experience
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $poste null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $typeemploi null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $nomdeentreprise null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $lieu null;
  23.     #[ORM\ManyToOne(inversedBy'experiences')]
  24.     #[ORM\JoinColumn(referencedColumnName:"id",onDelete"CASCADE"name"user_id")]
  25.     private ?User $user null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $Typedeprofil null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $nbexperience null;
  30.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  31.     private ?\DateTimeInterface $datededebut null;
  32.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  33.     private ?\DateTimeInterface $datedefin null;
  34.     public function __toString(): string
  35.     {
  36.         return $this->getTitreduprofil();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getPoste(): ?string
  43.     {
  44.         return $this->poste;
  45.     }
  46.     public function setPoste(?string $poste): self
  47.     {
  48.         $this->poste $poste;
  49.         return $this;
  50.     }
  51.     public function getTypeemploi(): ?string
  52.     {
  53.         return $this->typeemploi;
  54.     }
  55.     public function setTypeemploi(?string $typeemploi): self
  56.     {
  57.         $this->typeemploi $typeemploi;
  58.         return $this;
  59.     }
  60.     public function getNomdeentreprise(): ?string
  61.     {
  62.         return $this->nomdeentreprise;
  63.     }
  64.     public function setNomdeentreprise(?string $nomdeentreprise): self
  65.     {
  66.         $this->nomdeentreprise $nomdeentreprise;
  67.         return $this;
  68.     }
  69.     public function getLieu(): ?string
  70.     {
  71.         return $this->lieu;
  72.     }
  73.     public function setLieu(?string $lieu): self
  74.     {
  75.         $this->lieu $lieu;
  76.         return $this;
  77.     }
  78.     public function getUser(): ?User
  79.     {
  80.         return $this->user;
  81.     }
  82.     public function setUser(?User $user): self
  83.     {
  84.         $this->user $user;
  85.         return $this;
  86.     }
  87.     public function getTypedeprofil(): ?string
  88.     {
  89.         return $this->Typedeprofil;
  90.     }
  91.     public function setTypedeprofil(?string $Typedeprofil): self
  92.     {
  93.         $this->Typedeprofil $Typedeprofil;
  94.         return $this;
  95.     }
  96.     public function getNbexperience(): ?string
  97.     {
  98.         return $this->nbexperience;
  99.     }
  100.     public function setNbexperience(?string $nbexperience): self
  101.     {
  102.         $this->nbexperience $nbexperience;
  103.         return $this;
  104.     }
  105.     public function getDatededebut(): ?\DateTimeInterface
  106.     {
  107.         return $this->datededebut;
  108.     }
  109.     public function setDatededebut(?\DateTimeInterface $datededebut): self
  110.     {
  111.         $this->datededebut $datededebut;
  112.         return $this;
  113.     }
  114.     public function getDatedefin(): ?\DateTimeInterface
  115.     {
  116.         return $this->datedefin;
  117.     }
  118.     public function setDatedefin(?\DateTimeInterface $datedefin): self
  119.     {
  120.         $this->datedefin $datedefin;
  121.         return $this;
  122.     }
  123. }