← Code-Übersicht

Dokumentation.php

Pfad: src/Domain/Dokumentation/Dokumentation.php

Ext: php

Größe: 1001 Bytes

Geändert: 2026-07-15 21:43:46+02

<?php
declare(strict_types=1);

namespace Demo\Domain\Dokumentation;

/**
 * Entity/Value Object einer Dokumentation. Unveraenderlich.
 * body ist Markdown (Quellformat); tags sind freie Schlagworte.
 */
final class Dokumentation
{
    /**
     * @param int           $id        Technischer Schluessel.
     * @param string        $slug      Stabile, eindeutige Adresse.
     * @param string        $titel     Anzeigetitel.
     * @param string        $body      Inhalt als Markdown.
     * @param list<string>  $tags      Schlagworte.
     * @param string        $erstellt  Erstellzeitpunkt (ISO 8601).
     * @param string        $geaendert Aenderungszeitpunkt (ISO 8601).
     */
    public function __construct(
        public readonly int $id,
        public readonly string $slug,
        public readonly string $titel,
        public readonly string $body,
        public readonly array $tags,
        public readonly string $erstellt,
        public readonly string $geaendert
    ) {
    }
}