| @@ 35-81 (lines=47) @@ | ||
| 32 | * App\Models\General\IPv4 |
|
| 33 | * |
|
| 34 | */ |
|
| 35 | class IPv4 extends Model |
|
| 36 | { |
|
| 37 | ||
| 38 | protected $hidden = ['ip']; |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Indicates if the model should be timestamped. |
|
| 42 | * |
|
| 43 | * @var bool |
|
| 44 | */ |
|
| 45 | public $timestamps = false; |
|
| 46 | /** |
|
| 47 | * The table associated with the model. |
|
| 48 | * |
|
| 49 | * @var string |
|
| 50 | */ |
|
| 51 | protected $table = 'ipv4_addresses'; |
|
| 52 | /** |
|
| 53 | * The primary key column name. |
|
| 54 | * |
|
| 55 | * @var string |
|
| 56 | */ |
|
| 57 | protected $primaryKey = 'ipv4_address_id'; |
|
| 58 | ||
| 59 | ||
| 60 | // ---- Accessors/Mutators ---- |
|
| 61 | ||
| 62 | ||
| 63 | // ---- Define Reletionships ---- |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Returns the port this entry belongs to. |
|
| 67 | */ |
|
| 68 | public function port() |
|
| 69 | { |
|
| 70 | return $this->belongsTo('App\Models\Port', 'port_id', 'port_id'); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Returns the device this entry belongs to. |
|
| 75 | */ |
|
| 76 | public function device() |
|
| 77 | { |
|
| 78 | return $this->belongsTo('App\Models\Device', 'device_id', 'device_id'); |
|
| 79 | } |
|
| 80 | ||
| 81 | } |
|
| 82 | ||
| @@ 35-81 (lines=47) @@ | ||
| 32 | * App\Models\General\IPv6 |
|
| 33 | * |
|
| 34 | */ |
|
| 35 | class IPv6 extends Model |
|
| 36 | { |
|
| 37 | ||
| 38 | protected $hidden = ['ip']; |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Indicates if the model should be timestamped. |
|
| 42 | * |
|
| 43 | * @var bool |
|
| 44 | */ |
|
| 45 | public $timestamps = false; |
|
| 46 | /** |
|
| 47 | * The table associated with the model. |
|
| 48 | * |
|
| 49 | * @var string |
|
| 50 | */ |
|
| 51 | protected $table = 'ipv6_addresses'; |
|
| 52 | /** |
|
| 53 | * The primary key column name. |
|
| 54 | * |
|
| 55 | * @var string |
|
| 56 | */ |
|
| 57 | protected $primaryKey = 'ipv6_address_id'; |
|
| 58 | ||
| 59 | ||
| 60 | // ---- Accessors/Mutators ---- |
|
| 61 | ||
| 62 | ||
| 63 | // ---- Define Reletionships ---- |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Returns the port this entry belongs to. |
|
| 67 | */ |
|
| 68 | public function port() |
|
| 69 | { |
|
| 70 | return $this->belongsTo('App\Models\Port', 'port_id', 'port_id'); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Returns the device this entry belongs to. |
|
| 75 | */ |
|
| 76 | public function device() |
|
| 77 | { |
|
| 78 | return $this->belongsTo('App\Models\Device', 'device_id', 'device_id'); |
|
| 79 | } |
|
| 80 | ||
| 81 | } |
|
| 82 | ||