Changeset View
Changeset View
Standalone View
Standalone View
src/app/Fs/Node.php
- This file was added.
<?php | |||||
namespace App\Fs; | |||||
use Illuminate\Database\Eloquent\Model; | |||||
use Illuminate\Database\Eloquent\SoftDeletes; | |||||
/** | |||||
* The eloquent definition of a file chunk. | |||||
* | |||||
* @property int $id Node identifier | |||||
* @property ?string $file_id File identifier | |||||
* @property string $path Node location | |||||
*/ | |||||
class Node extends Model | |||||
{ | |||||
use SoftDeletes; | |||||
public $timestamps = false; | |||||
/** @var array<int, string> The attributes that are mass assignable */ | |||||
protected $fillable = ['file_id', 'deleted_at']; | |||||
/** @var string Database table name */ | |||||
protected $table = 'fs_nodes'; | |||||
/** | |||||
* The file the node belongs to. | |||||
* | |||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |||||
*/ | |||||
public function file() | |||||
{ | |||||
return $this->belongsTo(File::class); | |||||
} | |||||
} |