src/Entity/Experience.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExperienceRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ExperienceRepository::class)
  8.  */
  9. class Experience
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $employer;
  21.     /**
  22.      * @ORM\Column(type="date")
  23.      */
  24.     private $start_at;
  25.     /**
  26.      * @ORM\Column(type="date", nullable=true)
  27.      */
  28.     private $end_at;
  29.     /**
  30.      * @ORM\Column(type="text")
  31.      */
  32.     private $objectif;
  33.     /**
  34.      * @ORM\Column(type="text")
  35.      */
  36.     private $missions;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $environment;
  41.     /**
  42.      * @ORM\Column(type="boolean", nullable=true)
  43.      */
  44.     private $actualyHere;
  45.     /**
  46.      * @return mixed
  47.      */
  48.     public function isActualyHere()
  49.     {
  50.         return $this->actualyHere;
  51.     }
  52.     /**
  53.      * @param mixed $actualyHere
  54.      */
  55.     public function setActualyHere($actualyHere): void
  56.     {
  57.         $this->actualyHere $actualyHere;
  58.     }
  59.     /**
  60.      * @ORM\ManyToOne(targetEntity=Profile::class, inversedBy="experiences")
  61.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  62.      */
  63.     private $profile;
  64.     /**
  65.      * @ORM\Column(type="string", length=255)
  66.      */
  67.     private $title;
  68.     public function getId(): ?int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function getEmployer(): ?string
  73.     {
  74.         return $this->employer;
  75.     }
  76.     public function setEmployer(?string $employer): self
  77.     {
  78.         $this->employer $employer;
  79.         return $this;
  80.     }
  81.     public function getStartAt(): ?\DateTimeInterface
  82.     {
  83.         return $this->start_at;
  84.     }
  85.     public function setStartAt($start_at): self
  86.     {
  87.         $this->start_at $start_at;
  88.         return $this;
  89.     }
  90.     public function getEndAt(): ?\DateTimeInterface
  91.     {
  92.         return $this->end_at;
  93.     }
  94.     public function setEndAt($end_at): self
  95.     {
  96.         $this->end_at $end_at;
  97.         // Si end_at est null, on considère qu'il est encore en poste
  98.         $this->actualyHere = ($end_at === null);
  99.         return $this;
  100.     }
  101.     public function getObjectif(): ?string
  102.     {
  103.         return $this->objectif;
  104.     }
  105.     public function setObjectif(?string $objectif): self
  106.     {
  107.         $this->objectif $objectif;
  108.         return $this;
  109.     }
  110.     public function getMissions(): ?string
  111.     {
  112.         return $this->missions;
  113.     }
  114.     public function setMissions(?string $missions): self
  115.     {
  116.         $this->missions $missions;
  117.         return $this;
  118.     }
  119.     public function getEnvironment(): ?string
  120.     {
  121.         return $this->environment;
  122.     }
  123.     public function setEnvironment(?string $environment): self
  124.     {
  125.         $this->environment $environment;
  126.         return $this;
  127.     }
  128.     public function getProfile(): ?Profile
  129.     {
  130.         return $this->profile;
  131.     }
  132.     public function setProfile(?Profile $profile): self
  133.     {
  134.         $this->profile $profile;
  135.         return $this;
  136.     }
  137.     public function getTitle(): ?string
  138.     {
  139.         return $this->title;
  140.     }
  141.     public function setTitle(?string $title): self
  142.     {
  143.         $this->title $title;
  144.         return $this;
  145.     }
  146. }