24 lines
475 B
PHP
24 lines
475 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EntryFile extends Model
|
|
{
|
|
protected $fillable = [
|
|
'entry_id', 'filename', 'filepath', 'favorite_server', 'favorite_at', 'filesize', 'state', 'file_uuid'
|
|
];
|
|
|
|
protected $casts = [
|
|
'favorite_at' => 'timestamp'
|
|
];
|
|
|
|
public function entry(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Entry::class);
|
|
}
|
|
|
|
}
|