feat: Netzwerk-Modul v0.5.0 – Import, Geräte-Tracking, Ereignislog
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class NetworkScan extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'subnet', 'source', 'scanner', 'total_hosts',
|
||||
'online_hosts', 'new_devices', 'changed_devices',
|
||||
'notes', 'created_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function hosts(): HasMany
|
||||
{
|
||||
return $this->hasMany(NetworkHost::class, 'scan_id');
|
||||
}
|
||||
|
||||
public function creator(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user