<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
#[ORM\Entity]
#[ORM\Table(name: 'jm_consultant_details')]
class ConsultantDetails
{
public const RESOURCE_KEY = 'consultants';
public const RESOURCE_KEY_PENDING = 'consultant_pending';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\OneToOne(inversedBy: 'consultantDetails', targetEntity: User::class)]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: true)]
private ?User $user = null;
#[ORM\Column(type: 'string', length: 1000)]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private ?string $myOffer = '';
#[ORM\Column(type: 'string', length: 255)]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private ?string $title = '';
#[ORM\Column(type: 'json')]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private array $languages = [];
#[ORM\Column(type: 'json')]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private array $countries = [];
#[ORM\Column(type: 'json')]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private array $categories = [];
#[ORM\Column(type: 'json')]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private ?array $focalPoints = [];
#[ORM\Column(type: 'string')]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private ?string $focalPoint = '';
#[ORM\OneToOne(inversedBy: 'consultantDetails', targetEntity: ConsultantCompany::class, cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id', nullable: true)]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private ?ConsultantCompany $company = null;
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private bool $terms = false;
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
#[Serializer\Groups(['consultant', 'profile', 'fullUser'])]
private bool $policy = false;
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private bool $active = false;
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private bool $deleteRequest = false;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTime $deleteRequestDate = null;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTerms(): ?bool
{
return $this->terms;
}
public function setTerms(bool $terms): self
{
$this->terms = $terms;
return $this;
}
public function getPolicy(): ?bool
{
return $this->policy;
}
public function setPolicy(bool $policy): self
{
$this->policy = $policy;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getMyOffer(): ?string
{
return $this->myOffer;
}
public function setMyOffer(?string $myOffer): self
{
$this->myOffer = $myOffer;
return $this;
}
public function getConsultantCompany(): ?ConsultantCompany
{
return $this->company;
}
public function setConsultantCompany(?ConsultantCompany $company): self
{
$this->company = $company;
return $this;
}
public function getActive(): bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getLanguages(): array
{
return $this->languages;
}
public function setLanguages(array $languages): self
{
$this->languages = $languages;
return $this;
}
public function getCountries(): array
{
return $this->countries;
}
public function setCountries(array $countries): self
{
$this->countries = $countries;
return $this;
}
public function getCategories(): array
{
return $this->categories;
}
public function setCategories(array $categories): self
{
$this->categories = $categories;
return $this;
}
public function getFocalPoints(): ?array
{
return $this->focalPoints;
}
public function setFocalPoints(array $focalPoints): self
{
$this->focalPoints = $focalPoints;
return $this;
}
public function getFocalPoint(): ?string
{
return $this->focalPoint;
}
public function setFocalPoint(?string $focalPoint): self
{
$this->focalPoint = $focalPoint;
return $this;
}
public function setDeleteRequest(bool $deleteRequest): self
{
$this->deleteRequest = $deleteRequest;
return $this;
}
public function getDeleteRequest(): bool
{
return $this->deleteRequest;
}
public function setDeleteRequestDate(?\DateTime $deleteRequestDate): self
{
$this->deleteRequestDate = $deleteRequestDate;
return $this;
}
public function getDeleteRequestDate(): ?\DateTime
{
return $this->deleteRequestDate;
}
}