Stack & Setup
- Dockerisierte Dev-Umgebung (PHP 8.4-FPM, Nginx, MariaDB 11.4)
- Symfony 7.4 + API Platform 4.3, Doctrine ORM, LexikJWT, Messenger
- Vue 3 + TS (Vite), Vue Router, Pinia, Axios
Kern-Domäne & Auth
- Entitäten: User, PlatformPlan, Reseller, Company, Domain, Location,
Employee, ContactLink (UUIDv7)
- JWT-Login (/api/login), Rollen-Hierarchie, /api/me
- Mandantentrennung via API-Platform-Query-Extension (Lesen) +
TenantStampProcessor (Schreiben)
Öffentliche Profile (SSR)
- Profil-Landingpage, vCard-Download, QR-Code im Marken-Look
- Stabiler NFC/QR-Kurz-Link /t/{code} -> Redirect aufs aktuelle Profil
- Firmenspezifisches Branding (Farben/Logo) auf der Profilseite
Verwaltungsoberfläche (SPA)
- Brand-Look (dunkle Sidebar), rollenbasierte Navigation
- Dashboard, Reseller (+Provisioning), Firmen, Mitarbeiter, Standorte,
Domains, Design/Branding mit Live-Vorschau
Konzept & Doku: docs/KONZEPT.md (inkl. Wallet/Sync §12), README.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
114 lines
2.2 KiB
PHP
114 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use App\Repository\ContactLinkRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Bridge\Doctrine\Types\UuidType;
|
|
use Symfony\Component\Uid\Uuid;
|
|
|
|
/**
|
|
* Social-/Web-Link auf einem Mitarbeiterprofil.
|
|
*/
|
|
#[ORM\Entity(repositoryClass: ContactLinkRepository::class)]
|
|
#[ApiResource(security: "is_granted('ROLE_COMPANY_ADMIN')")]
|
|
class ContactLink implements ResellerOwnedInterface
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\Column(type: UuidType::NAME, unique: true)]
|
|
private Uuid $id;
|
|
|
|
/** z. B. website, linkedin, xing, instagram, email, phone. */
|
|
#[ORM\Column(length: 40)]
|
|
private string $type;
|
|
|
|
#[ORM\Column(length: 500)]
|
|
private string $url;
|
|
|
|
#[ORM\Column(length: 120, nullable: true)]
|
|
private ?string $label = null;
|
|
|
|
#[ORM\Column]
|
|
private int $position = 0;
|
|
|
|
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'contactLinks')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private Employee $employee;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->id = Uuid::v7();
|
|
}
|
|
|
|
public function getId(): Uuid
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getType(): string
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
public function setType(string $type): self
|
|
{
|
|
$this->type = $type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getUrl(): string
|
|
{
|
|
return $this->url;
|
|
}
|
|
|
|
public function setUrl(string $url): self
|
|
{
|
|
$this->url = $url;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLabel(): ?string
|
|
{
|
|
return $this->label;
|
|
}
|
|
|
|
public function setLabel(?string $label): self
|
|
{
|
|
$this->label = $label;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPosition(): int
|
|
{
|
|
return $this->position;
|
|
}
|
|
|
|
public function setPosition(int $position): self
|
|
{
|
|
$this->position = $position;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getEmployee(): Employee
|
|
{
|
|
return $this->employee;
|
|
}
|
|
|
|
public function setEmployee(Employee $employee): self
|
|
{
|
|
$this->employee = $employee;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getReseller(): ?Reseller
|
|
{
|
|
return $this->employee->getReseller();
|
|
}
|
|
}
|