36 lines
745 B
PHP
36 lines
745 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ModuleHost extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'module_host';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'host_id',
|
|
'template',
|
|
'module_datacenter_id',
|
|
'console',
|
|
'iso_path'
|
|
];
|
|
|
|
public function datacenter()
|
|
{
|
|
return $this->belongsTo(\App\Models\ModuleDatacenter::class, 'module_datacenter_id', 'id');
|
|
}
|
|
public function datastore()
|
|
{
|
|
return $this->hasMany(\App\Models\ModuleDatastore::class);
|
|
}
|
|
public function network()
|
|
{
|
|
return $this->hasMany(\App\Models\ModuleNetwork::class);
|
|
}
|
|
}
|