<?php
namespace App\Entity;
use App\Repository\RecruitApplicationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: RecruitApplicationRepository::class)]
class RecruitApplication
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups("application")]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: RecruitVacancy::class, inversedBy: 'applications')]
#[ORM\JoinColumn(nullable: false)]
private ?RecruitVacancy $vacancyId = null;
#[ORM\ManyToOne(inversedBy: 'Applications')]
#[ORM\JoinColumn(nullable: false)]
#[Groups("application")]
private ?RecruitTalent $talentId = null;
#[ORM\Column]
#[Groups("application")]
private ?int $lastSalary = null;
#[ORM\Column]
#[Groups("application")]
private ?int $expectedSalaryStart = null;
#[ORM\Column]
#[Groups("application")]
private ?int $expectedSalaryEnd = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
#[Groups("application")]
private ?\DateTime $startDate = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups("application")]
private ?string $reportingLine = null;
#[ORM\ManyToOne(inversedBy: 'recruitApplicationComments')]
private ?User $commentRejectedBy = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups("application")]
private ?string $commentsWithdraw = null;
#[ORM\ManyToOne(inversedBy: 'recruitApplicationWithdrawComments')]
private ?User $commentsWithdrawnBy = null;
#[ORM\Column]
#[Groups("application")]
private ?int $noticePeriodInDays = null;
#[ORM\Column(length: 255)]
#[Groups("application")]
private ?string $status = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups("application")]
private ?string $socialId = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $commentRejected = null;
#[ORM\OneToMany(mappedBy: 'application', targetEntity: RecruitApplicationActivity::class, orphanRemoval: true)]
private Collection $recruitApplicationActivities;
#[ORM\OneToMany(mappedBy: 'application', targetEntity: RecruitApplicationComment::class, orphanRemoval: true)]
private Collection $recruitApplicationComments;
#[ORM\OneToMany(mappedBy: 'application', targetEntity: RecruitAnswer::class, orphanRemoval: true)]
private Collection $recruitAnswers;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\OneToMany(mappedBy: 'application', targetEntity: RecruitEvaluationScore::class, orphanRemoval: true)]
private Collection $recruitEvaluationScores;
#[ORM\Column(length: 255)]
#[ORM\JoinColumn(nullable: true)]
private ?string $designation = null;
#[ORM\Column]
#[ORM\JoinColumn(nullable: true)]
private ?int $salaryProbation = null;
#[ORM\Column]
#[ORM\JoinColumn(nullable: true)]
private ?int $salaryAfterProbation = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $commencementDate = null;
#[ORM\ManyToOne(inversedBy: 'recruitApplications')]
#[ORM\JoinColumn(nullable: true)]
private ?User $reportingTo = null;
#[ORM\Column(length: 255)]
#[ORM\JoinColumn(nullable: true)]
private ?string $probationPeriod = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $annualLeave = null;
#[ORM\Column(length: 255)]
#[ORM\JoinColumn(nullable: true)]
private ?string $workSchedule = null;
#[ORM\Column(length: 255)]
#[ORM\JoinColumn(nullable: true)]
private ?string $workSetup = null;
#[ORM\Column(nullable: true)]
private ?float $currentScore = null;
#[ORM\OneToMany(mappedBy: 'applicationId', targetEntity: RecruitEmailHistory::class, cascade: ['persist', 'remove'])]
private Collection $recruitEmailHistories;
#[ORM\ManyToOne(inversedBy: 'applicationsAsInterviewer')]
private ?User $interviewer = null;
#[ORM\ManyToOne(inversedBy: 'hrInterviewer')]
private ?User $hrInterviewer = null;
#[ORM\Column(length: 65535, type: "text", nullable: true)]
private ?string $hrInterviewTranscript = null;
#[ORM\Column(length: 1000, nullable: true)]
private ?string $hrInterviewVideo = null;
#[ORM\Column(length: 65535, type: "text", nullable: true)]
private ?string $gmInterviewTranscript = null;
#[ORM\Column(length: 1000, nullable: true)]
private ?string $gmInterviewVideo = null;
#[ORM\Column(length: 65535, type: "text", nullable: true)]
private ?string $hmInterviewTranscript = null;
#[ORM\Column(length: 1000, nullable: true)]
private ?string $hmInterviewVideo = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $coverLetterUrl = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $coverLetterFilename = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cvUrl = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cvFilename = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $portfolioUrl = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $portfolioUserUrl = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $additionalFileFilename = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $additionalFileUrl = null;
#[ORM\Column(nullable: true)]
private ?bool $hrScored = null;
#[ORM\Column(nullable: true)]
private ?bool $hmScored = null;
#[ORM\OneToOne(mappedBy: 'recruitApplicant', cascade: ['persist', 'remove'])]
private ?PersonalInfo $personalInfo = null;
public function __construct()
{
$this->recruitApplicationActivities = new ArrayCollection();
$this->recruitApplicationComments = new ArrayCollection();
$this->recruitAnswers = new ArrayCollection();
$this->recruitEvaluationScores = new ArrayCollection();
$this->recruitEmailHistories = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getVacancyId(): ?RecruitVacancy
{
return $this->vacancyId;
}
public function setVacancyId(?RecruitVacancy $vacancyId): self
{
$this->vacancyId = $vacancyId;
return $this;
}
public function getTalentId(): ?RecruitTalent
{
return $this->talentId;
}
public function setTalentId(?RecruitTalent $talentId): self
{
$this->talentId = $talentId;
return $this;
}
public function getLastSalary(): ?int
{
return $this->lastSalary;
}
public function setLastSalary(int $lastSalary): self
{
$this->lastSalary = $lastSalary;
return $this;
}
public function getExpectedSalaryStart(): ?int
{
return $this->expectedSalaryStart;
}
public function setExpectedSalaryStart(int $expectedSalaryStart): self
{
$this->expectedSalaryStart = $expectedSalaryStart;
return $this;
}
public function getExpectedSalaryEnd(): ?int
{
return $this->expectedSalaryEnd;
}
public function setExpectedSalaryEnd(int $expectedSalaryEnd): self
{
$this->expectedSalaryEnd = $expectedSalaryEnd;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?string $startDate): self
{
$this->startDate = new \DateTime($startDate);
return $this;
}
public function getReportingLine(): ?string
{
return $this->reportingLine;
}
public function setReportingLine(?string $reportingLine): self
{
$this->reportingLine = $reportingLine;
return $this;
}
public function getCommentRejectedBy(): ?User
{
return $this->commentRejectedBy;
}
public function setCommentRejectedBy(?User $commentRejectedBy): self
{
$this->commentRejectedBy = $commentRejectedBy;
return $this;
}
public function getCommentsWithdraw(): ?string
{
return $this->commentsWithdraw;
}
public function setCommentsWithdraw(?string $commentsWithdraw): self
{
$this->commentsWithdraw = $commentsWithdraw;
return $this;
}
public function getCommentsWithdrawnBy(): ?User
{
return $this->commentsWithdrawnBy;
}
public function setCommentsWithdrawnBy(?User $commentsWithdrawnBy): self
{
$this->commentsWithdrawnBy = $commentsWithdrawnBy;
return $this;
}
public function getNoticePeriodInDays(): ?int
{
return $this->noticePeriodInDays;
}
public function setNoticePeriodInDays(int $noticePeriodInDays): self
{
$this->noticePeriodInDays = $noticePeriodInDays;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getSocialId(): ?string
{
return $this->socialId;
}
public function setSocialId(?string $socialId): self
{
$this->socialId = $socialId;
return $this;
}
public function getCommentRejected(): ?string
{
return $this->commentRejected;
}
public function setCommentRejected(?string $commentRejected): self
{
$this->commentRejected = $commentRejected;
return $this;
}
/**
* @return Collection<int, RecruitApplicationActivity>
*/
public function getRecruitApplicationActivities(): Collection
{
return $this->recruitApplicationActivities;
}
public function addRecruitApplicationActivity(RecruitApplicationActivity $recruitApplicationActivity): self
{
if (!$this->recruitApplicationActivities->contains($recruitApplicationActivity)) {
$this->recruitApplicationActivities->add($recruitApplicationActivity);
$recruitApplicationActivity->setApplication($this);
}
return $this;
}
public function removeRecruitApplicationActivity(RecruitApplicationActivity $recruitApplicationActivity): self
{
if ($this->recruitApplicationActivities->removeElement($recruitApplicationActivity)) {
// set the owning side to null (unless already changed)
if ($recruitApplicationActivity->getApplication() === $this) {
$recruitApplicationActivity->setApplication(null);
}
}
return $this;
}
/**
* @return Collection<int, RecruitApplicationComment>
*/
public function getRecruitApplicationComments(): Collection
{
return $this->recruitApplicationComments;
}
public function addRecruitApplicationComment(RecruitApplicationComment $recruitApplicationComment): self
{
if (!$this->recruitApplicationComments->contains($recruitApplicationComment)) {
$this->recruitApplicationComments->add($recruitApplicationComment);
$recruitApplicationComment->setApplication($this);
}
return $this;
}
public function removeRecruitApplicationComment(RecruitApplicationComment $recruitApplicationComment): self
{
if ($this->recruitApplicationComments->removeElement($recruitApplicationComment)) {
// set the owning side to null (unless already changed)
if ($recruitApplicationComment->getApplication() === $this) {
$recruitApplicationComment->setApplication(null);
}
}
return $this;
}
/**
* @return Collection<int, RecruitAnswer>
*/
public function getRecruitAnswers(): Collection
{
return $this->recruitAnswers;
}
public function addRecruitAnswer(RecruitAnswer $recruitAnswer): self
{
if (!$this->recruitAnswers->contains($recruitAnswer)) {
$this->recruitAnswers->add($recruitAnswer);
$recruitAnswer->setApplication($this);
}
return $this;
}
public function removeRecruitAnswer(RecruitAnswer $recruitAnswer): self
{
if ($this->recruitAnswers->removeElement($recruitAnswer)) {
// set the owning side to null (unless already changed)
if ($recruitAnswer->getApplication() === $this) {
$recruitAnswer->setApplication(null);
}
}
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return Collection<int, RecruitEvaluationScore>
*/
public function getRecruitEvaluationScores(): Collection
{
return $this->recruitEvaluationScores;
}
public function addRecruitEvaluationScore(RecruitEvaluationScore $recruitEvaluationScore): self
{
if (!$this->recruitEvaluationScores->contains($recruitEvaluationScore)) {
$this->recruitEvaluationScores->add($recruitEvaluationScore);
$recruitEvaluationScore->setApplication($this);
}
return $this;
}
public function removeRecruitEvaluationScore(RecruitEvaluationScore $recruitEvaluationScore): self
{
if ($this->recruitEvaluationScores->removeElement($recruitEvaluationScore)) {
// set the owning side to null (unless already changed)
if ($recruitEvaluationScore->getApplication() === $this) {
$recruitEvaluationScore->setApplication(null);
}
}
return $this;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getSalaryProbation(): ?int
{
return $this->salaryProbation;
}
public function setSalaryProbation(int $salaryProbation): self
{
$this->salaryProbation = $salaryProbation;
return $this;
}
public function getSalaryAfterProbation(): ?int
{
return $this->salaryAfterProbation;
}
public function setSalaryAfterProbation(int $salaryAfterProbation): self
{
$this->salaryAfterProbation = $salaryAfterProbation;
return $this;
}
public function getCommencementDate(): ?\DateTimeInterface
{
return $this->commencementDate;
}
public function setCommencementDate(?\DateTimeInterface $commencementDate): self
{
$this->commencementDate = $commencementDate;
return $this;
}
public function getReportingTo(): ?User
{
return $this->reportingTo;
}
public function setReportingTo(?User $reportingTo): self
{
$this->reportingTo = $reportingTo;
return $this;
}
public function getProbationPeriod(): ?string
{
return $this->probationPeriod;
}
public function setProbationPeriod(string $probationPeriod): self
{
$this->probationPeriod = $probationPeriod;
return $this;
}
public function getAnnualLeave(): ?string
{
return $this->annualLeave;
}
public function setAnnualLeave(?string $annualLeave): self
{
$this->annualLeave = $annualLeave;
return $this;
}
public function getWorkSchedule(): ?string
{
return $this->workSchedule;
}
public function setWorkSchedule(string $workSchedule): self
{
$this->workSchedule = $workSchedule;
return $this;
}
public function getWorkSetup(): ?string
{
return $this->workSetup;
}
public function setWorkSetup(string $workSetup): self
{
$this->workSetup = $workSetup;
return $this;
}
public function getCurrentScore(): ?float
{
return $this->currentScore;
}
public function setCurrentScore(?float $currentScore): self
{
$this->currentScore = $currentScore;
return $this;
}
/**
* @return Collection<int, RecruitEmailHistory>
*/
public function getRecruitEmailHistories(): Collection
{
return $this->recruitEmailHistories;
}
public function addRecruitEmailHistory(RecruitEmailHistory $recruitEmailHistory): self
{
if (!$this->recruitEmailHistories->contains($recruitEmailHistory)) {
$this->recruitEmailHistories->add($recruitEmailHistory);
$recruitEmailHistory->setApplicationId($this);
}
return $this;
}
public function removeRecruitEmailHistory(RecruitEmailHistory $recruitEmailHistory): self
{
if ($this->recruitEmailHistories->removeElement($recruitEmailHistory)) {
// set the owning side to null (unless already changed)
if ($recruitEmailHistory->getApplicationId() === $this) {
$recruitEmailHistory->setApplicationId(null);
}
}
return $this;
}
public function getInterviewer(): ?User
{
return $this->interviewer;
}
public function setInterviewer(?User $interviewer): self
{
$this->interviewer = $interviewer;
return $this;
}
public function getHrInterviewer(): ?User
{
return $this->hrInterviewer;
}
public function setHrInterviewer(?User $hrInterviewer): self
{
$this->hrInterviewer = $hrInterviewer;
return $this;
}
public function getHrInterviewTranscript(): ?string
{
return $this->hrInterviewTranscript;
}
public function setHrInterviewTranscript(?string $hrInterviewTranscript): self
{
$this->hrInterviewTranscript = $hrInterviewTranscript;
return $this;
}
public function getHrInterviewVideo(): ?string
{
return $this->hrInterviewVideo;
}
public function setHrInterviewVideo(?string $hrInterviewVideo): self
{
$this->hrInterviewVideo = $hrInterviewVideo;
return $this;
}
public function getGmInterviewTranscript(): ?string
{
return $this->gmInterviewTranscript;
}
public function setGmInterviewTranscript(?string $gmInterviewTranscript): self
{
$this->gmInterviewTranscript = $gmInterviewTranscript;
return $this;
}
public function getGmInterviewVideo(): ?string
{
return $this->gmInterviewVideo;
}
public function setGmInterviewVideo(?string $gmInterviewVideo): self
{
$this->gmInterviewVideo = $gmInterviewVideo;
return $this;
}
public function getHmInterviewTranscript(): ?string
{
return $this->hmInterviewTranscript;
}
public function setHmInterviewTranscript(?string $hmInterviewTranscript): self
{
$this->hmInterviewTranscript = $hmInterviewTranscript;
return $this;
}
public function getHmInterviewVideo(): ?string
{
return $this->hmInterviewVideo;
}
public function setHmInterviewVideo(?string $hmInterviewVideo): self
{
$this->hmInterviewVideo = $hmInterviewVideo;
return $this;
}
public function getCoverLetterUrl(): ?string
{
return $this->coverLetterUrl;
}
public function setCoverLetterUrl(?string $coverLetterUrl): self
{
$this->coverLetterUrl = $coverLetterUrl;
return $this;
}
public function getCvUrl(): ?string
{
return $this->cvUrl;
}
public function setCvUrl(?string $cvUrl): self
{
$this->cvUrl = $cvUrl;
return $this;
}
public function getPortfolioUrl(): ?string
{
return $this->portfolioUrl;
}
public function setPortfolioUrl(?string $portfolioUrl): self
{
$this->portfolioUrl = $portfolioUrl;
return $this;
}
public function getPortfolioUserUrl(): ?string
{
return $this->portfolioUserUrl;
}
public function setPortfolioUserUrl(?string $portfolioUserUrl): self
{
$this->portfolioUserUrl = $portfolioUserUrl;
return $this;
}
public function getAdditionalFileUrl(): ?string
{
return $this->additionalFileUrl;
}
public function setAdditionalFileUrl(?string $additionalFileUrl): self
{
$this->additionalFileUrl = $additionalFileUrl;
return $this;
}
public function getCoverLetterFilename(): ?string
{
return $this->coverLetterFilename;
}
public function setCoverLetterFilename(?string $coverLetterFilename): self
{
$this->coverLetterFilename = $coverLetterFilename;
return $this;
}
public function getCvFilename(): ?string
{
return $this->cvFilename;
}
public function setCvFilename(?string $cvFilename): self
{
$this->cvFilename = $cvFilename;
return $this;
}
public function getAdditionalFileFilename(): ?string
{
return $this->additionalFileFilename;
}
public function setAdditionalFileFilename(?string $additionalFileFilename): self
{
$this->additionalFileFilename = $additionalFileFilename;
return $this;
}
public function isHrScored(): ?bool
{
return $this->hrScored;
}
public function setHrScored(?bool $hrScored): self
{
$this->hrScored = $hrScored;
return $this;
}
public function isHmScored(): ?bool
{
return $this->hmScored;
}
public function setHmScored(?bool $hmScored): self
{
$this->hmScored = $hmScored;
return $this;
}
public function getPersonalInfo(): ?PersonalInfo
{
return $this->personalInfo;
}
public function setPersonalInfo(?PersonalInfo $personalInfo): self
{
// unset the owning side of the relation if necessary
if ($personalInfo === null && $this->personalInfo !== null) {
$this->personalInfo->setRecruitApplicant(null);
}
// set the owning side of the relation if necessary
if ($personalInfo !== null && $personalInfo->getRecruitApplicant() !== $this) {
$personalInfo->setRecruitApplicant($this);
}
$this->personalInfo = $personalInfo;
return $this;
}
}