- Fix EventType deletion error handling (constraint violations) - Fix Event update error (package_id column missing) - Fix Event Type dropdown options (JSON display issue) - Fix EventPackagesRelationManager query error - Add missing translations for deletion errors - Apply Pint formatting
39 lines
814 B
PHP
39 lines
814 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EventStorageAssignment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'event_id',
|
|
'media_storage_target_id',
|
|
'role',
|
|
'status',
|
|
'assigned_at',
|
|
'released_at',
|
|
'meta',
|
|
];
|
|
|
|
protected $casts = [
|
|
'assigned_at' => 'datetime',
|
|
'released_at' => 'datetime',
|
|
'meta' => 'array',
|
|
];
|
|
|
|
public function event(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Event::class);
|
|
}
|
|
|
|
public function storageTarget(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MediaStorageTarget::class, 'media_storage_target_id');
|
|
}
|
|
}
|