optimizations
This commit is contained in:
31
app/Models/CollectionEntityLink.php
Normal file
31
app/Models/CollectionEntityLink.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class CollectionEntityLink extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'collection_id',
|
||||
'linked_type',
|
||||
'linked_id',
|
||||
'relationship_type',
|
||||
'metadata_json',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'metadata_json' => 'array',
|
||||
];
|
||||
|
||||
public function collection(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Collection::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user