Loheide-eu-mitarbeiterplatt.../plugins-core/news/src/Models/NewsAcknowledgement.php
Friederich Loheide 443599b739
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 8m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 7m39s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 12m30s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 17m0s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m43s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 24m25s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 11m16s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 3m39s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m17s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 10m40s
Pflichtlektüre für Neuigkeiten (0.59.0)
Beiträge mit Lesebestätigung (namentlich), Frist, Aufgabe und Feed-Hinweis;
Auswertung für die Redaktion (bestätigt von / wer fehlt).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 15:16:16 +00:00

34 lines
788 B
PHP

<?php
namespace Inhaus\Plugins\News\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Lesebestätigung einer Pflichtlektüre („Gelesen und verstanden“).
*/
#[Fillable(['post_id', 'user_id', 'acknowledged_at'])]
class NewsAcknowledgement extends Model
{
public $timestamps = false;
protected $table = 'news_acknowledgements';
protected function casts(): array
{
return ['acknowledged_at' => 'datetime'];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function post(): BelongsTo
{
return $this->belongsTo(NewsPost::class, 'post_id');
}
}