Quellübung mit stabiler Kennung und Inhaltswert, genau ein Stand je Prüfsumme, bewusste Übernahme als neue lokale Fassung, lokale Ergänzungen bleiben erhalten, Ausblenden an der Quelle setzt nur die Verfügbarkeit. Seite Übernahme (Shinkan), Feldzuordnung, ADR-49 (inklusive Abweichung bei der Mediensperre), Abnahmestand und Rückfallverfahren. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
31 lines
882 B
PHP
31 lines
882 B
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* Ein abgerufener Inhaltsstand einer Quellübung (Prüfsumme der Quelle und ihre Nutzlast). Er ist unveränderlich;
|
|
* nur die Übernahme trägt die daraus entstandene lokale Fassung ein.
|
|
*/
|
|
class ExerciseSourceSnapshot extends Model
|
|
{
|
|
protected $fillable = ['exercise_source_id', 'content_hash', 'payload', 'adopted_version_id', 'fetched_at'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['payload' => 'array', 'fetched_at' => 'datetime'];
|
|
}
|
|
|
|
public function source(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ExerciseSource::class, 'exercise_source_id');
|
|
}
|
|
|
|
public function adoptedVersion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(CompositionVersion::class, 'adopted_version_id');
|
|
}
|
|
}
|