mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Rewrite ipv4 address discovery to Eloquent (#15830)
* rewrite ipv4 discovery to Eloquent * style ci
This commit is contained in:
@@ -33,4 +33,11 @@ class Ipv4Address extends PortRelatedModel
|
||||
|
||||
public $timestamps = false;
|
||||
protected $primaryKey = 'ipv4_address_id';
|
||||
protected $fillable = [
|
||||
'ipv4_address',
|
||||
'ipv4_prefixlen',
|
||||
'ipv4_network_id',
|
||||
'port_id',
|
||||
'context_name',
|
||||
];
|
||||
}
|
||||
|
@@ -35,11 +35,14 @@ class Ipv4Network extends Model
|
||||
|
||||
public $timestamps = false;
|
||||
protected $primaryKey = 'ipv4_network_id';
|
||||
|
||||
protected $fillable = [
|
||||
'ipv4_network',
|
||||
'context_name',
|
||||
];
|
||||
// ---- Define Relationships ----
|
||||
|
||||
public function ipv4(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Ipv4Address::class, 'ipv4_network_id');
|
||||
return $this->hasMany(Ipv4Address::class, 'ipv4_network_id');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user