30 lines
547 B
PHP
30 lines
547 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OsGroup extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'os_group';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'thumbnail',
|
|
'module_host_id',
|
|
'status'
|
|
];
|
|
|
|
public function host()
|
|
{
|
|
return $this->belongsTo(\App\Models\ModuleHost::class,'module_host_id','id');
|
|
}
|
|
public function os()
|
|
{
|
|
return $this->hasMany(\App\Models\Os::class);
|
|
}
|
|
}
|