<?php
namespace App\Entity\ExternalPartner;
use App\Entity\Profile\JoboffererProfile;
use Doctrine\ORM\Mapping as ORM;
use Exception;
/**
* @ORM\Entity
*
* @ORM\Table(
* name="external_partner_jobofferer_profile_additional_infos",
* indexes={
*
* @ORM\Index(name="info_name_info_string_value_idx", columns={"info_name", "info_string_value"}),
* @ORM\Index(name="info_name_info_int_value_idx", columns={"info_name", "info_int_value"})
* }
* )
*/
class JoboffererProfileAdditionalInfo
{
/**
* @var JoboffererProfile
*
* @ORM\ManyToOne(targetEntity="App\Entity\Profile\JoboffererProfile", inversedBy="externalPartnerJoboffererProfileAdditionalInfos", cascade={"persist"})
*
* @ORM\Id
*
* @ORM\JoinColumn(name="jobofferer_profiles_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $joboffererProfile;
public function getJoboffererProfile(): JoboffererProfile
{
return $this->joboffererProfile;
}
public function setJoboffererProfile(JoboffererProfile $joboffererProfile)
{
$this->joboffererProfile = $joboffererProfile;
}
/**
* @var string
*
* @ORM\Id
*
* @ORM\Column(type="string", nullable=false)
*/
private $infoName;
public function getInfoName(): string
{
return $this->infoName;
}
public function setInfoName(string $infoName): void
{
$this->infoName = $infoName;
}
/**
* @var string
*
* @ORM\Column(type="string", nullable=true, length=15000)
*/
private $infoStringValue;
public function getInfoStringValue(): ?string
{
return $this->infoStringValue;
}
/** @throws Exception */
public function setInfoStringValue(?string $infoStringValue): void
{
if (!is_null($this->infoIntValue)) {
throw new Exception('Cannot set infoStringValue because infoIntValue is already set.');
}
$this->infoStringValue = $infoStringValue;
}
/**
* @var int
*
* @ORM\Column(type="integer", nullable=true)
*/
private $infoIntValue;
public function getInfoIntValue(): ?int
{
return $this->infoIntValue;
}
/** @throws Exception */
public function setInfoIntValue(?int $infoIntValue): void
{
if (!is_null($this->infoStringValue)) {
throw new Exception('Cannot set infoIntValue because infoStringValue is already set.');
}
$this->infoIntValue = $infoIntValue;
}
}