src/Entity/ThirdParty.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\ThirdPartyRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassThirdPartyRepository::class)]
  9. #[ApiResource]
  10. class ThirdParty
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $firstName null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $lastName null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $companyName null;
  22.     #[ORM\Column(length255)]
  23.     private ?string $address null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $address1 null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $address2 null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $city null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $state null;
  32.     #[ORM\Column(length255nullabletrue)]
  33.     private ?string $phoneNumber null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     private ?string $email null;
  36.     #[ORM\Column(length255nullabletrue)]
  37.     private ?string $webSite null;
  38.     #[ORM\Column(nullabletrue)]
  39.     private ?int $employees null;
  40.     #[ORM\Column(nullabletrue)]
  41.     private ?float $turnover null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $premiumFunction null;
  44.     #[ORM\ManyToOne(inversedBy'thirdParties')]
  45.     #[ORM\JoinColumn(nullablefalse)]
  46.     private ?Country $country null;
  47.     #[ORM\ManyToOne(inversedBy'thirdParties')]
  48.     #[ORM\JoinColumn(nullablefalse)]
  49.     private ?ThirdPartyCategory $thirdPartyCategory null;
  50.     #[ORM\ManyToOne(inversedBy'thirdParties')]
  51.     #[ORM\JoinColumn(nullablefalse)]
  52.     private ?ClientType $thirdPartyClientType null;
  53.     #[ORM\OneToMany(mappedBy'thirdParty'targetEntityPortfolio::class, orphanRemovaltrue)]
  54.     private Collection $portfolios;
  55.     #[ORM\Column(length10nullabletrue)]
  56.     private ?string $algorithm null;
  57.     #[ORM\OneToMany(mappedBy'thirdParty'targetEntityInsured::class, orphanRemovaltrue)]
  58.     private Collection $insureds;
  59.     public function __construct()
  60.     {
  61.         $this->portfolios = new ArrayCollection();
  62.         $this->insureds = new ArrayCollection();
  63.     }
  64.     public function getId(): ?int
  65.     {
  66.         return $this->id;
  67.     }
  68.     public function getFirstName(): ?string
  69.     {
  70.         return $this->firstName;
  71.     }
  72.     public function setFirstName(?string $firstName): self
  73.     {
  74.         $this->firstName $firstName;
  75.         return $this;
  76.     }
  77.     public function getLastName(): ?string
  78.     {
  79.         return $this->lastName;
  80.     }
  81.     public function setLastName(?string $lastName): self
  82.     {
  83.         $this->lastName $lastName;
  84.         return $this;
  85.     }
  86.     public function getCompanyName(): ?string
  87.     {
  88.         return $this->companyName;
  89.     }
  90.     public function setCompanyName(?string $companyName): self
  91.     {
  92.         $this->companyName $companyName;
  93.         return $this;
  94.     }
  95.     public function getAddress(): ?string
  96.     {
  97.         return $this->address;
  98.     }
  99.     public function setAddress(string $address): self
  100.     {
  101.         $this->address $address;
  102.         return $this;
  103.     }
  104.     public function getAddress1(): ?string
  105.     {
  106.         return $this->address1;
  107.     }
  108.     public function setAddress1(?string $address1): self
  109.     {
  110.         $this->address1 $address1;
  111.         return $this;
  112.     }
  113.     public function getAddress2(): ?string
  114.     {
  115.         return $this->address2;
  116.     }
  117.     public function setAddress2(?string $address2): self
  118.     {
  119.         $this->address2 $address2;
  120.         return $this;
  121.     }
  122.     public function getCity(): ?string
  123.     {
  124.         return $this->city;
  125.     }
  126.     public function setCity(?string $city): self
  127.     {
  128.         $this->city $city;
  129.         return $this;
  130.     }
  131.     public function getState(): ?string
  132.     {
  133.         return $this->state;
  134.     }
  135.     public function setState(?string $state): self
  136.     {
  137.         $this->state $state;
  138.         return $this;
  139.     }
  140.     public function getPhoneNumber(): ?string
  141.     {
  142.         return $this->phoneNumber;
  143.     }
  144.     public function setPhoneNumber(?string $phoneNumber): self
  145.     {
  146.         $this->phoneNumber $phoneNumber;
  147.         return $this;
  148.     }
  149.     public function getEmail(): ?string
  150.     {
  151.         return $this->email;
  152.     }
  153.     public function setEmail(?string $email): self
  154.     {
  155.         $this->email $email;
  156.         return $this;
  157.     }
  158.     public function getWebSite(): ?string
  159.     {
  160.         return $this->webSite;
  161.     }
  162.     public function setWebSite(?string $webSite): self
  163.     {
  164.         $this->webSite $webSite;
  165.         return $this;
  166.     }
  167.     public function getEmployees(): ?int
  168.     {
  169.         return $this->employees;
  170.     }
  171.     public function setEmployees(?int $employees): self
  172.     {
  173.         $this->employees $employees;
  174.         return $this;
  175.     }
  176.     public function getTurnover(): ?float
  177.     {
  178.         return $this->turnover;
  179.     }
  180.     public function setTurnover(?float $turnover): self
  181.     {
  182.         $this->turnover $turnover;
  183.         return $this;
  184.     }
  185.     public function getPremiumFunction(): ?string
  186.     {
  187.         return $this->premiumFunction;
  188.     }
  189.     public function setPremiumFunction(?string $premiumFunction): self
  190.     {
  191.         $this->premiumFunction $premiumFunction;
  192.         return $this;
  193.     }
  194.     public function getCountry(): ?Country
  195.     {
  196.         return $this->country;
  197.     }
  198.     public function setCountry(?Country $country): self
  199.     {
  200.         $this->country $country;
  201.         return $this;
  202.     }
  203.     public function getThirdPartyCategory(): ?ThirdPartyCategory
  204.     {
  205.         return $this->thirdPartyCategory;
  206.     }
  207.     public function setThirdPartyCategory(?ThirdPartyCategory $thirdPartyCategory): self
  208.     {
  209.         $this->thirdPartyCategory $thirdPartyCategory;
  210.         return $this;
  211.     }
  212.     public function getThirdPartyClientType(): ?ClientType
  213.     {
  214.         return $this->thirdPartyClientType;
  215.     }
  216.     public function setThirdPartyClientType(?ClientType $thirdPartyClientType): self
  217.     {
  218.         $this->thirdPartyClientType $thirdPartyClientType;
  219.         return $this;
  220.     }
  221.     /**
  222.      * @return Collection<int, Portfolio>
  223.      */
  224.     public function getPortfolios(): Collection
  225.     {
  226.         return $this->portfolios;
  227.     }
  228.     public function addPortfolio(Portfolio $portfolio): self
  229.     {
  230.         if (!$this->portfolios->contains($portfolio)) {
  231.             $this->portfolios->add($portfolio);
  232.             $portfolio->setThirdParty($this);
  233.         }
  234.         return $this;
  235.     }
  236.     public function removePortfolio(Portfolio $portfolio): self
  237.     {
  238.         if ($this->portfolios->removeElement($portfolio)) {
  239.             // set the owning side to null (unless already changed)
  240.             if ($portfolio->getThirdParty() === $this) {
  241.                 $portfolio->setThirdParty(null);
  242.             }
  243.         }
  244.         return $this;
  245.     }
  246.     public function getAlgorithm(): ?string
  247.     {
  248.         return $this->algorithm;
  249.     }
  250.     public function setAlgorithm(?string $algorithm): self
  251.     {
  252.         $this->algorithm $algorithm;
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return Collection<int, Insured>
  257.      */
  258.     public function getInsureds(): Collection
  259.     {
  260.         return $this->insureds;
  261.     }
  262.     public function addInsured(Insured $insured): self
  263.     {
  264.         if (!$this->insureds->contains($insured)) {
  265.             $this->insureds->add($insured);
  266.             $insured->setThirdParty($this);
  267.         }
  268.         return $this;
  269.     }
  270.     public function removeInsured(Insured $insured): self
  271.     {
  272.         if ($this->insureds->removeElement($insured)) {
  273.             // set the owning side to null (unless already changed)
  274.             if ($insured->getThirdParty() === $this) {
  275.                 $insured->setThirdParty(null);
  276.             }
  277.         }
  278.         return $this;
  279.     }
  280. }