26 lines
620 B
PHP
26 lines
620 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class NetworkHost extends Model
|
|
{
|
|
protected $fillable = [
|
|
'scan_id', 'device_id', 'ip_address', 'mac_address',
|
|
'hostname', 'mac_vendor', 'status', 'ping_ms',
|
|
'netbios_info', 'ttl', 'ports', 'http_sender', 'web_detection',
|
|
];
|
|
|
|
public function scan(): BelongsTo
|
|
{
|
|
return $this->belongsTo(NetworkScan::class, 'scan_id');
|
|
}
|
|
|
|
public function device(): BelongsTo
|
|
{
|
|
return $this->belongsTo(NetworkDevice::class, 'device_id');
|
|
}
|
|
}
|