33 lines
582 B
PHP
33 lines
582 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MaintenanceHostHistory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'maintenance_history_id',
|
|
'host_id',
|
|
'summary',
|
|
'is_skipped',
|
|
];
|
|
|
|
protected $cast = [
|
|
'is_skipped' => 'bool'
|
|
];
|
|
|
|
public function host()
|
|
{
|
|
return $this->belongsTo(Host::class);
|
|
}
|
|
|
|
public function historyTasks()
|
|
{
|
|
return $this->hasMany(MaintenanceTaskHistory::class);
|
|
}
|
|
}
|