36 lines
826 B
PHP
36 lines
826 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AssistenzaTecnorepairAllegato extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'assistenza_tecnorepair_allegati_legacy';
|
|
|
|
protected $fillable = [
|
|
'scheda_id',
|
|
'legacy_id',
|
|
'legacy_scheda_id',
|
|
'legacy_attachment_number',
|
|
'file_name',
|
|
'file_path',
|
|
'imported_from_path',
|
|
'metadata',
|
|
];
|
|
|
|
protected $casts = [
|
|
'metadata' => 'array',
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
|
|
public function scheda(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AssistenzaTecnorepairScheda::class, 'scheda_id');
|
|
}
|
|
}
|