<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\EventTagRepository") */class EventTag{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity="App\Entity\Event", inversedBy="eventTags") * @ORM\JoinColumn(nullable=false) */ private $event; /** * @ORM\ManyToOne(targetEntity="App\Entity\Tag", inversedBy="eventTags") * @ORM\JoinColumn(nullable=true, onDelete="SET NULL") */ private $tag; /** * @ORM\Column(type="integer") */ private $ord; /** * @ORM\Column(type="integer") */ private $remoteId; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $remoteName; public function __construct() { $this->remoteId = -1; } public function __toString() : string { return $this->event->getName().' - '.($this->tag ?? 'deleted tag'); } public function getId(): ?int { return $this->id; } public function getEvent(): ?Event { return $this->event; } public function setEvent(?Event $event): self { $this->event = $event; return $this; } public function getTag(): ?Tag { return $this->tag; } public function setTag(?Tag $tag): self { $this->tag = $tag; return $this; } public function getOrd(): ?int { return $this->ord; } public function setOrd(int $ord): self { $this->ord = $ord; return $this; } public function getRemoteId(): ?int { return $this->remoteId; } public function setRemoteId(int $remoteId): self { $this->remoteId = $remoteId; return $this; } public function getRemoteName(): ?string { return $this->remoteName; } public function setRemoteName(?string $remoteName): self { $this->remoteName = $remoteName; return $this; }}