New-Thanasoft/thanasoft-back/app/Models/InterventionAttachment.php
2025-11-11 17:45:58 +03:00

40 lines
788 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class InterventionAttachment extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'intervention_id',
'file_id',
'label'
];
/**
* Get the intervention associated with the attachment.
*/
public function intervention(): BelongsTo
{
return $this->belongsTo(Intervention::class);
}
/**
* Get the file associated with the attachment.
*/
public function file(): BelongsTo
{
return $this->belongsTo(File::class);
}
}