presseportale/app/Models/PressReleaseAiDeclaration.php
Kevin Adametz c387048d7e KI-Kennzeichnung (Art. 50 KI-VO): Pflicht-Deklaration für Text & Bilder
Selbstdeklaration des KI-Einsatzes je PM (Text) und je Bild inkl.
Submit-Gate im PressReleaseService, versioniertem Audit-Trail
(press_release_ai_declarations) und öffentlichem KI-Label in
Einreicher-Stimme. Bestätigung im Submit-Modal ist Pflicht.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 13:54:43 +00:00

55 lines
1.4 KiB
PHP

<?php
namespace App\Models;
use App\Enums\AiTextDeclaration;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Unveränderlicher Audit-Eintrag einer KI-Deklaration (Art. 50 KI-VO).
*
* Wird bei jedem Submit geschrieben (Versionierung durch neue Zeilen) und
* hält fest, welcher User wann welchen KI-Grad für Text und Bilder deklariert
* und bestätigt hat. Einträge werden nie aktualisiert oder gelöscht — sie
* sind der belastbare Nachweis gegenüber Art. 50 Abs. 4 KI-VO.
*/
class PressReleaseAiDeclaration extends Model
{
public $timestamps = false;
protected $fillable = [
'press_release_id',
'user_id',
'company_id',
'text_declaration',
'image_declarations',
'confirmed_at',
'created_at',
];
protected function casts(): array
{
return [
'text_declaration' => AiTextDeclaration::class,
'image_declarations' => 'array',
'confirmed_at' => 'datetime',
'created_at' => 'datetime',
];
}
public function pressRelease(): BelongsTo
{
return $this->belongsTo(PressRelease::class);
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function company(): BelongsTo
{
return $this->belongsTo(Company::class);
}
}