<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class JobApplication implements JobApplicationInterface
{
use ResourceTrait;
use TimestampableTrait;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Job", inversedBy="jobApplications")
* @ORM\JoinColumn(name="job_id", nullable=false)
*/
private ?JobInterface $job = null;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $name = null;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $email = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $coverLetter = null;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $cvFilePath = null;
/**
* @ORM\Column(type="boolean", nullable=false)
*/
private bool $privacyPolicyAccepted = false;
public function __toString(): string
{
return sprintf('%s - %s', $this->job->getName(), $this->getName());
}
public function getJob(): ?JobInterface
{
return $this->job;
}
public function setJob(?JobInterface $job): void
{
$this->job = $job;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): void
{
$this->name = $name;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): void
{
$this->email = $email;
}
public function getCoverLetter(): ?string
{
return $this->coverLetter;
}
public function setCoverLetter(?string $coverLetter): void
{
$this->coverLetter = $coverLetter;
}
public function getCvFilePath(): ?string
{
return $this->cvFilePath;
}
public function setCvFilePath(?string $cvFilePath): void
{
$this->cvFilePath = $cvFilePath;
}
public function isPrivacyPolicyAccepted(): bool
{
return $this->privacyPolicyAccepted;
}
public function setPrivacyPolicyAccepted(bool $privacyPolicyAccepted): void
{
$this->privacyPolicyAccepted = $privacyPolicyAccepted;
}
}