src/Entity/JobApplication.php line 12

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity()
  7.  */
  8. class JobApplication implements JobApplicationInterface
  9. {
  10.     use ResourceTrait;
  11.     use TimestampableTrait;
  12.     /**
  13.      * @ORM\ManyToOne(targetEntity="App\Entity\Job", inversedBy="jobApplications")
  14.      * @ORM\JoinColumn(name="job_id", nullable=false)
  15.      */
  16.     private ?JobInterface $job null;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=false)
  19.      */
  20.     private ?string $name null;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=false)
  23.      */
  24.     private ?string $email null;
  25.     /**
  26.      * @ORM\Column(type="text", nullable=true)
  27.      */
  28.     private ?string $coverLetter null;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=false)
  31.      */
  32.     private ?string $cvFilePath null;
  33.     /**
  34.      * @ORM\Column(type="boolean", nullable=false)
  35.      */
  36.     private bool $privacyPolicyAccepted false;
  37.     public function __toString(): string
  38.     {
  39.         return sprintf('%s - %s'$this->job->getName(), $this->getName());
  40.     }
  41.     public function getJob(): ?JobInterface
  42.     {
  43.         return $this->job;
  44.     }
  45.     public function setJob(?JobInterface $job): void
  46.     {
  47.         $this->job $job;
  48.     }
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     public function setName(?string $name): void
  54.     {
  55.         $this->name $name;
  56.     }
  57.     public function getEmail(): ?string
  58.     {
  59.         return $this->email;
  60.     }
  61.     public function setEmail(?string $email): void
  62.     {
  63.         $this->email $email;
  64.     }
  65.     public function getCoverLetter(): ?string
  66.     {
  67.         return $this->coverLetter;
  68.     }
  69.     public function setCoverLetter(?string $coverLetter): void
  70.     {
  71.         $this->coverLetter $coverLetter;
  72.     }
  73.     public function getCvFilePath(): ?string
  74.     {
  75.         return $this->cvFilePath;
  76.     }
  77.     public function setCvFilePath(?string $cvFilePath): void
  78.     {
  79.         $this->cvFilePath $cvFilePath;
  80.     }
  81.     public function isPrivacyPolicyAccepted(): bool
  82.     {
  83.         return $this->privacyPolicyAccepted;
  84.     }
  85.     public function setPrivacyPolicyAccepted(bool $privacyPolicyAccepted): void
  86.     {
  87.         $this->privacyPolicyAccepted $privacyPolicyAccepted;
  88.     }
  89. }