<?php
namespace JanusHercules\RecurrentJobsSearch\Presentation\Entity;
use App\Entity\RecurrentJob;
use DateTime;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
#[Entity]
#[Table(
name: 'denormalized_recurrent_jobs'
)]
class DenormalizedRecurrentJob
{
public function __construct(
string $recurrentJobId
) {
$this->recurrentJobId = $recurrentJobId;
}
#[Id]
#[Column(
name : 'recurrent_job_id',
type : Types::GUID,
nullable: false
)]
private string $recurrentJobId;
public function getRecurrentJobId(): string
{
return $this->recurrentJobId;
}
#[Column(
name : 'city',
type : Types::STRING,
length : 256,
nullable: true
)]
private ?string $city;
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): void
{
if (!is_null($city)) {
$this->city = $city;
} else {
$this->city = null;
}
}
#[Column(
name : 'zipcode',
type : Types::STRING,
length : 8,
nullable: true
)]
private ?string $zipcode;
public function getZipcode(): ?string
{
return $this->zipcode;
}
public function setZipcode(?string $zipcode): void
{
if (!is_null($zipcode)) {
$this->zipcode = $zipcode;
} else {
$this->zipcode = null;
}
}
#[Column(
type : Types::STRING,
length : 512,
nullable: true
)]
// @NOTE: Value from RecurrentJob -> getJoboffererProfile -> getBusinessName
private ?string $businessName;
public function getBusinessName(): ?string
{
return $this->businessName;
}
public function setBusinessName(?string $businessName): void
{
if (!is_null($businessName)) {
$this->businessName = $businessName;
} else {
$this->businessName = null;
}
}
#[Column(
name : 'self_description',
type : Types::TEXT,
length : 2048,
nullable: true
)]
private ?string $selfDescription; // Quelle: profile (jobofferer)
public function getSelfDescription(): ?string
{
return $this->selfDescription;
}
public function setSelfDescription(?string $selfDescription): void
{
if (!is_null($selfDescription)) {
$this->selfDescription = mb_substr($selfDescription, 0, 2048);
} else {
$this->selfDescription = null;
}
}
#[Column(
name : 'freshness_date',
type : Types::DATETIME_MUTABLE,
nullable: true
)]
private ?DateTime $freshnessDate; // Quelle: recurrent_job
public function getFreshnessDate(): ?DateTime
{
return $this->freshnessDate;
}
public function setFreshnessDate(?DateTime $freshnessDate): void
{
$this->freshnessDate = $freshnessDate;
}
#[Column(
name : 'jobofferer_profiles_id',
type : Types::GUID,
nullable: true
)]
private ?string $joboffererProfileId;
public function getJoboffererProfileId(): ?string
{
return $this->joboffererProfileId;
}
public function setJoboffererProfileId(?string $jobofferererProfileId): void
{
$this->joboffererProfileId = $jobofferererProfileId;
}
#[Column(
name : 'photo_filename',
type : Types::STRING,
length : 512,
nullable: true
)]
// @NOTE: Value from RecurrentJob ->getProfilePhoto ->getFileName
private ?string $photoFilename;
public function getPhotoFilename(): ?string
{
return $this->photoFilename;
}
public function setPhotoFilename(?string $photoFilename): void
{
if (!is_null($photoFilename)) {
$this->photoFilename = mb_substr($photoFilename, 0, 512);
} else {
$this->photoFilename = null;
}
}
/** @var array<int>|null $careerLevels */
#[Column(
name : 'career_levels',
type : Types::SIMPLE_ARRAY,
nullable: true
)]
private ?array $careerLevels;
/** @return array<int>|null */
public function getCareerLevels(): ?array
{
return $this->careerLevels;
}
/**
* @param array<int>|null $careerLevels
*/
public function setCareerLevels(?array $careerLevels): void
{
$this->careerLevels = $careerLevels;
}
/** @var array<int>|null $employmentTypes */
#[Column(
name : 'employment_types',
type : Types::SIMPLE_ARRAY,
nullable: true
)]
private ?array $employmentTypes;
/** @return int[]|null */
public function getEmploymentTypes(): ?array
{
return $this->employmentTypes;
}
/** @param int[]|null $employmentTypes */
public function setEmploymentTypes(?array $employmentTypes): void
{
$this->employmentTypes = $employmentTypes;
}
#[Column(
name : 'integrated_external_partner_customer_id',
type : Types::GUID,
nullable: true
)]
private ?string $integratedExternalPartnerCustomerId;
public function getIntegratedExternalPartnerCustomerId(): ?string
{
return $this->integratedExternalPartnerCustomerId;
}
public function setIntegratedExternalPartnerCustomerId(?string $integratedExternalPartnerCustomerId): void
{
$this->integratedExternalPartnerCustomerId = $integratedExternalPartnerCustomerId;
}
#[Column(
name : 'internal_id',
type : Types::STRING,
length : 256,
nullable: true
)]
private ?string $internalId;
public function getInternalId(): ?string
{
return $this->internalId;
}
public function setInternalId(?string $internalId): void
{
if (!is_null($internalId)) {
$this->internalId = mb_substr($internalId, 0, 256);
} else {
$this->internalId = null;
}
}
#[Column(
name : 'contact_phone',
type : Types::STRING,
length : 256,
nullable: true
)]
private ?string $contactPhone;
public function getContactPhone(): ?string
{
return $this->contactPhone;
}
public function setContactPhone(?string $contactPhone): void
{
if (!is_null($contactPhone)) {
$this->contactPhone = $contactPhone;
} else {
$this->contactPhone = null;
}
}
#[Column(
type : Types::DATETIME_MUTABLE,
nullable: false
)]
private DateTime $createdAt;
public function getCreatedAt(): DateTime
{
return $this->createdAt;
}
public function setCreatedAt(DateTime $createdAt): void
{
$this->createdAt = $createdAt;
}
#[Column(
name : 'external_partner_id',
type : Types::INTEGER,
nullable: true
)]
private ?int $externalPartnerId;
public function setExternalPartnerId(?int $externalPartnerId): void
{
$this->externalPartnerId = $externalPartnerId;
}
public function getExternalPartnerId(): ?int
{
return $this->externalPartnerId;
}
#[Column(
name : 'integrated_external_partner_customer_business_name',
type : Types::STRING,
length : 512,
nullable: true
)]
private ?string $integratedExternalPartnerCustomerBusinessName;
public function setIntegratedExternalPartnerCustomerBusinessName(?string $integratedExternalPartnerCustomerBusinessName): void
{
if (!is_null($integratedExternalPartnerCustomerBusinessName)) {
$this->integratedExternalPartnerCustomerBusinessName = $integratedExternalPartnerCustomerBusinessName;
} else {
$this->integratedExternalPartnerCustomerBusinessName = null;
}
}
public function getIntegratedExternalPartnerCustomerBusinessName(): ?string
{
return $this->integratedExternalPartnerCustomerBusinessName;
}
#[Column(
name : 'has_dedicated_profile_photo',
type : Types::BOOLEAN,
nullable: false
)]
private bool $hasDedicatedProfilePhoto;
public function setHasDedicatedProfilePhoto(bool $hasDedicatedProfilePhoto): void
{
$this->hasDedicatedProfilePhoto = $hasDedicatedProfilePhoto;
}
public function hasDedicatedProfilePhoto(): bool
{
return $this->hasDedicatedProfilePhoto;
}
#[Column(
name : 'recurrentjob_can_be_applied_by_conversation_message',
type : Types::BOOLEAN,
nullable: false
)]
private bool $recurrentJobCanBeAppliedByConversationMessage;
public function setRecurrentJobCanBeAppliedByConversationMessage(bool $recurrentJobCanBeAppliedByConversationMessage): void
{
$this->recurrentJobCanBeAppliedByConversationMessage = $recurrentJobCanBeAppliedByConversationMessage;
}
public function getRecurrentJobCanBeAppliedByConversationMessage(): bool
{
return $this->recurrentJobCanBeAppliedByConversationMessage;
}
#[Column(
name : 'occupational_field_searchterm',
type : Types::STRING,
length : 256,
nullable: true
)]
private ?string $occupationalFieldSearchterm;
public function setOccupationalFieldSearchterm(?string $occupationalFieldSearchterm): void
{
if (!is_null($occupationalFieldSearchterm)) {
$this->occupationalFieldSearchterm = mb_substr($occupationalFieldSearchterm, 0, 256);
} else {
$this->occupationalFieldSearchterm = null;
}
}
public function getOccupationalFieldSearchterm(): ?string
{
return $this->occupationalFieldSearchterm;
}
#[Column(
name : 'user_has_access_to_nonfree_jobofferer_features',
type : Types::BOOLEAN,
nullable: false
)]
private bool $userHasAccessToNonfreeJoboffererFeatures;
public function setUserHasAccessToNonfreeJoboffererFeatures(bool $userHasAccessToNonfreeJoboffererFeatures): void
{
$this->userHasAccessToNonfreeJoboffererFeatures = $userHasAccessToNonfreeJoboffererFeatures;
}
public function getUserHasAccessToNonfreeJoboffererFeatures(): bool
{
return $this->userHasAccessToNonfreeJoboffererFeatures;
}
#[Column(
name : 'profile_photo_uri',
type : Types::STRING,
length : 1024,
nullable: true
)]
private ?string $profilePhotoUri;
public function setProfilePhotoUri(?string $profilePhotoUri): void
{
if (!is_null($profilePhotoUri)) {
$this->profilePhotoUri = mb_substr($profilePhotoUri, 0, 1024);
} else {
$this->profilePhotoUri = null;
}
}
public function getProfilePhotoUri(): ?string
{
return $this->profilePhotoUri;
}
#[Column(
name : 'recurrentjob_must_link_externally',
type : Types::BOOLEAN,
nullable: false
)]
private bool $recurrentJobMustLinkExternally;
public function setRecurrentJobMustLinkExternally(bool $recurrentJobMustLinkExternally): void
{
$this->recurrentJobMustLinkExternally = $recurrentJobMustLinkExternally;
}
public function getRecurrentJobMustLinkExternally(): bool
{
return $this->recurrentJobMustLinkExternally;
}
#[Column(
name : 'url_for_recurrentjob_that_must_link_externally',
type : Types::TEXT,
length : 65535,
nullable: true
)]
private ?string $urlForRecurrentJobThatMustLinkExternally;
public function setUrlForRecurrentJobThatMustLinkExternally(?string $urlForRecurrrentJobThatMustLinkExternally): void
{
if (!is_null($urlForRecurrrentJobThatMustLinkExternally)) {
$this->urlForRecurrentJobThatMustLinkExternally = mb_substr($urlForRecurrrentJobThatMustLinkExternally, 0, 65535);
} else {
$this->urlForRecurrentJobThatMustLinkExternally = null;
}
}
public function getUrlForRecurrentJobThatMustLinkExternally(): ?string
{
return $this->urlForRecurrentJobThatMustLinkExternally;
}
#[Column(
name : 'jobofferer_profile_has_photo',
type : Types::BOOLEAN,
nullable: false
)]
private bool $joboffererProfileHasPhoto;
public function setJoboffererProfileHasPhoto(bool $joboffererProfileHasPhoto): void
{
$this->joboffererProfileHasPhoto = $joboffererProfileHasPhoto;
}
public function getJoboffererProfileHasPhoto(): bool
{
return $this->joboffererProfileHasPhoto;
}
#[Column(
name : 'jobofferer_profile_self_description_as_html',
type : Types::BOOLEAN,
nullable: false
)]
private bool $joboffererProfileSelfDescriptionAsHtml;
public function setJoboffererProfileSelfDescriptionAsHtml(bool $joboffererProfileSelfDescriptionAsHtml): void
{
$this->joboffererProfileSelfDescriptionAsHtml = $joboffererProfileSelfDescriptionAsHtml;
}
public function getJoboffererProfileSelfDescriptionAsHtml(): bool
{
return $this->joboffererProfileSelfDescriptionAsHtml;
}
#[Column(
name : 'recurrentjob_superior_salary',
type : Types::BOOLEAN,
nullable: false
)]
private bool $recurrentJobSuperiorSalary;
public function setRecurrentJobSuperiorSalary(bool $recurrentJobSuperiorSalary): void
{
$this->recurrentJobSuperiorSalary = $recurrentJobSuperiorSalary;
}
public function getRecurrentJobSuperiorSalary(): bool
{
return $this->recurrentJobSuperiorSalary;
}
#[Column(
name : 'jobofferer_profile_photo_file_name',
type : Types::STRING,
length : 512,
nullable: true
)]
// @NOTE: JoboffererProfile -> getPhotoFileName
private ?string $joboffererProfilePhotoFileName;
public function setJoboffererProfilePhotoFileName(?string $joboffererProfilePhotoFileName): void
{
if (!is_null($joboffererProfilePhotoFileName)) {
$this->joboffererProfilePhotoFileName = mb_substr($joboffererProfilePhotoFileName, 0, 512);
} else {
$this->joboffererProfilePhotoFileName = null;
}
}
public function getJoboffererProfilePhotoFileName(): ?string
{
return $this->joboffererProfilePhotoFileName;
}
#[Column(
name : 'user_has_active_jobofferer_membership',
type : Types::BOOLEAN,
nullable: false
)]
private bool $userHasActiveJoboffererMembership;
public function setUserHasActiveJoboffererMembership(bool $userHasActiveJoboffererMembership): void
{
$this->userHasActiveJoboffererMembership = $userHasActiveJoboffererMembership;
}
public function getUserHasActiveJoboffererMembership(): bool
{
return $this->userHasActiveJoboffererMembership;
}
#[Column(
name : 'profile_last_seen_at',
type : Types::DATETIME_MUTABLE,
nullable: true
)]
private ?DateTime $profileLastSeenAt;
public function setProfileLastSeenAt(?DateTime $profileLastsSeenAt): void
{
$this->profileLastSeenAt = $profileLastsSeenAt;
}
public function getProfileLastSeenAt(): ?DateTime
{
return $this->profileLastSeenAt;
}
#[Column(
name : 'recurrentjob_created_at',
type : Types::DATETIME_MUTABLE,
nullable: true
)]
private ?DateTime $recurrentJobCreatedAt;
public function setRecurrentJobCreatedAt(?DateTime $recurrentJobCreatedAt): void
{
$this->recurrentJobCreatedAt = $recurrentJobCreatedAt;
}
public function getRecurrentJobCreatedAt(): ?DateTime
{
return $this->recurrentJobCreatedAt;
}
#[Column(
name : 'users_id',
type : Types::GUID,
nullable: true
)]
private ?string $userId;
public function setUserId(?string $userId): void
{
$this->userId = $userId;
}
public function getUserId(): ?string
{
return $this->userId;
}
/** @var array<bool[]>|null $workingTimes */
#[Column(
name : 'working_times',
type : Types::JSON,
nullable: true
)]
private ?array $workingTimes;
/** @param array<bool[]>|null $workingTimes */
public function setWorkingTimes(?array $workingTimes): void
{
$this->workingTimes = $workingTimes;
}
/** @return array<bool[]>|null */
public function getWorkingTimes(): ?array
{
return $this->workingTimes;
}
}