2024-07-30 08:44:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class MaintenanceHostHistory extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
2024-08-06 06:31:51 +00:00
|
|
|
|
2024-08-06 09:02:45 +00:00
|
|
|
protected $fillable = [
|
|
|
|
'maintenance_history_id',
|
|
|
|
'host_id',
|
2024-08-09 06:37:00 +00:00
|
|
|
'summary',
|
|
|
|
'is_skipped',
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $cast = [
|
|
|
|
'is_skipped' => 'bool'
|
2024-08-06 09:02:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
public function host()
|
2024-08-06 06:31:51 +00:00
|
|
|
{
|
2024-08-06 09:02:45 +00:00
|
|
|
return $this->belongsTo(Host::class);
|
2024-08-06 06:31:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-06 09:02:45 +00:00
|
|
|
public function historyTasks()
|
2024-08-06 06:31:51 +00:00
|
|
|
{
|
|
|
|
return $this->hasMany(MaintenanceTaskHistory::class);
|
|
|
|
}
|
2024-07-30 08:44:58 +00:00
|
|
|
}
|