src/Entity/ThirdParty.php line 13
<?phpnamespace App\Entity;use ApiPlatform\Metadata\ApiResource;use App\Repository\ThirdPartyRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ThirdPartyRepository::class)]#[ApiResource]class ThirdParty{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255, nullable: true)]private ?string $firstName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $lastName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $companyName = null;#[ORM\Column(length: 255)]private ?string $address = null;#[ORM\Column(length: 255, nullable: true)]private ?string $address1 = null;#[ORM\Column(length: 255, nullable: true)]private ?string $address2 = null;#[ORM\Column(length: 255, nullable: true)]private ?string $city = null;#[ORM\Column(length: 255, nullable: true)]private ?string $state = null;#[ORM\Column(length: 255, nullable: true)]private ?string $phoneNumber = null;#[ORM\Column(length: 255, nullable: true)]private ?string $email = null;#[ORM\Column(length: 255, nullable: true)]private ?string $webSite = null;#[ORM\Column(nullable: true)]private ?int $employees = null;#[ORM\Column(nullable: true)]private ?float $turnover = null;#[ORM\Column(length: 255, nullable: true)]private ?string $premiumFunction = null;#[ORM\ManyToOne(inversedBy: 'thirdParties')]#[ORM\JoinColumn(nullable: false)]private ?Country $country = null;#[ORM\ManyToOne(inversedBy: 'thirdParties')]#[ORM\JoinColumn(nullable: false)]private ?ThirdPartyCategory $thirdPartyCategory = null;#[ORM\ManyToOne(inversedBy: 'thirdParties')]#[ORM\JoinColumn(nullable: false)]private ?ClientType $thirdPartyClientType = null;#[ORM\OneToMany(mappedBy: 'thirdParty', targetEntity: Portfolio::class, orphanRemoval: true)]private Collection $portfolios;#[ORM\Column(length: 10, nullable: true)]private ?string $algorithm = null;#[ORM\OneToMany(mappedBy: 'thirdParty', targetEntity: Insured::class, orphanRemoval: true)]private Collection $insureds;public function __construct(){$this->portfolios = new ArrayCollection();$this->insureds = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(?string $firstName): self{$this->firstName = $firstName;return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(?string $lastName): self{$this->lastName = $lastName;return $this;}public function getCompanyName(): ?string{return $this->companyName;}public function setCompanyName(?string $companyName): self{$this->companyName = $companyName;return $this;}public function getAddress(): ?string{return $this->address;}public function setAddress(string $address): self{$this->address = $address;return $this;}public function getAddress1(): ?string{return $this->address1;}public function setAddress1(?string $address1): self{$this->address1 = $address1;return $this;}public function getAddress2(): ?string{return $this->address2;}public function setAddress2(?string $address2): self{$this->address2 = $address2;return $this;}public function getCity(): ?string{return $this->city;}public function setCity(?string $city): self{$this->city = $city;return $this;}public function getState(): ?string{return $this->state;}public function setState(?string $state): self{$this->state = $state;return $this;}public function getPhoneNumber(): ?string{return $this->phoneNumber;}public function setPhoneNumber(?string $phoneNumber): self{$this->phoneNumber = $phoneNumber;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): self{$this->email = $email;return $this;}public function getWebSite(): ?string{return $this->webSite;}public function setWebSite(?string $webSite): self{$this->webSite = $webSite;return $this;}public function getEmployees(): ?int{return $this->employees;}public function setEmployees(?int $employees): self{$this->employees = $employees;return $this;}public function getTurnover(): ?float{return $this->turnover;}public function setTurnover(?float $turnover): self{$this->turnover = $turnover;return $this;}public function getPremiumFunction(): ?string{return $this->premiumFunction;}public function setPremiumFunction(?string $premiumFunction): self{$this->premiumFunction = $premiumFunction;return $this;}public function getCountry(): ?Country{return $this->country;}public function setCountry(?Country $country): self{$this->country = $country;return $this;}public function getThirdPartyCategory(): ?ThirdPartyCategory{return $this->thirdPartyCategory;}public function setThirdPartyCategory(?ThirdPartyCategory $thirdPartyCategory): self{$this->thirdPartyCategory = $thirdPartyCategory;return $this;}public function getThirdPartyClientType(): ?ClientType{return $this->thirdPartyClientType;}public function setThirdPartyClientType(?ClientType $thirdPartyClientType): self{$this->thirdPartyClientType = $thirdPartyClientType;return $this;}/*** @return Collection<int, Portfolio>*/public function getPortfolios(): Collection{return $this->portfolios;}public function addPortfolio(Portfolio $portfolio): self{if (!$this->portfolios->contains($portfolio)) {$this->portfolios->add($portfolio);$portfolio->setThirdParty($this);}return $this;}public function removePortfolio(Portfolio $portfolio): self{if ($this->portfolios->removeElement($portfolio)) {// set the owning side to null (unless already changed)if ($portfolio->getThirdParty() === $this) {$portfolio->setThirdParty(null);}}return $this;}public function getAlgorithm(): ?string{return $this->algorithm;}public function setAlgorithm(?string $algorithm): self{$this->algorithm = $algorithm;return $this;}/*** @return Collection<int, Insured>*/public function getInsureds(): Collection{return $this->insureds;}public function addInsured(Insured $insured): self{if (!$this->insureds->contains($insured)) {$this->insureds->add($insured);$insured->setThirdParty($this);}return $this;}public function removeInsured(Insured $insured): self{if ($this->insureds->removeElement($insured)) {// set the owning side to null (unless already changed)if ($insured->getThirdParty() === $this) {$insured->setThirdParty(null);}}return $this;}}