<?phpnamespace App\Entity;use App\Repository\PartnerRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=PartnerRepository::class) * @ORM\AssociationOverrides({ * @ORM\AssociationOverride(name="company", inversedBy="partners") * }) */class Partner extends EntityBase{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $displayName; /** * @ORM\Column(type="boolean", nullable=true) */ private $isEmployee; /** * @ORM\Column(type="text", nullable=true) */ private $address; /** * @ORM\OneToOne(targetEntity=AppUser::class, mappedBy="partner") */ private $userAccount; /** * @ORM\OneToOne(targetEntity=Employee::class, mappedBy="partner", cascade={"persist", "remove"}) */ private $employee; public function getId(): ?int { return $this->id; } public function getDisplayName(): ?string { return $this->displayName; } public function setDisplayName(string $displayName): self { $this->displayName = $displayName; return $this; } public function getIsEmployee(): ?bool { return $this->isEmployee; } public function setIsEmployee(?bool $isEmployee): self { $this->isEmployee = $isEmployee; return $this; } public function getAddress(): ?string { return $this->address; } public function setAddress(?string $address): self { $this->address = $address; return $this; } public function getUserAccount(): ?AppUser { return $this->userAccount; } public function setUserAccount(?AppUser $userAccount): self { // unset the owning side of the relation if necessary if ($userAccount === null && $this->userAccount !== null) { $this->userAccount->setPartner(null); } // set the owning side of the relation if necessary if ($userAccount !== null && $userAccount->getPartner() !== $this) { $userAccount->setPartner($this); } $this->userAccount = $userAccount; return $this; } public function getEmployee(): ?Employee { return $this->employee; } public function setEmployee(Employee $employee): self { // set the owning side of the relation if necessary if ($employee->getPartner() !== $this) { $employee->setPartner($this); } $this->employee = $employee; return $this; }}