Files
construprogress/app/Models/InspectionTemplate.php
T

27 lines
524 B
PHP
Raw Normal View History

2026-05-07 23:31:33 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class InspectionTemplate extends Model
{
2026-05-11 14:35:24 +02:00
protected $fillable = ['name', 'description', 'project_id', 'phase_id', 'fields'];
2026-05-07 23:31:33 +02:00
protected $casts = ['fields' => 'array'];
public function project()
{
return $this->belongsTo(Project::class);
}
2026-05-11 14:35:24 +02:00
public function phase()
{
return $this->belongsTo(Phase::class);
}
2026-05-07 23:31:33 +02:00
public function inspections()
{
return $this->hasMany(Inspection::class);
}
2026-05-11 14:35:24 +02:00
}