<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\OwnerRepository") */class Owner{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $firstname; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $lastname; /** * @ORM\Column(type="smallint", nullable=true) */ private $gender; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $email; /** * @ORM\ManyToMany(targetEntity="App\Entity\store", inversedBy="owner") */ private $store; public function __construct() { $this->store = 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 getFullname(): ?string { return ucfirst($this->firstname).' '.strtoupper($this->lastname); } public function getGender(): ?int { return $this->gender; } public function setGender(?int $gender): self { $this->gender = $gender; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(?string $email): self { $this->email = $email; return $this; } public function getStore(): ?store { return $this->store; } public function setStore(?store $store): self { $this->store = $store; return $this; } public function addStore(store $store): self { if (!$this->store->contains($store)) { $this->store[] = $store; } return $this; } public function removeStore(store $store): self { if ($this->store->contains($store)) { $this->store->removeElement($store); } return $this; }}