Giant Update
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TopologyCustomerConnection extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'connected_at' => 'datetime',
|
||||
'disconnected_at' => 'datetime',
|
||||
'metadata' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function odpNode()
|
||||
{
|
||||
return $this->belongsTo(TopologyNode::class, 'odp_node_id');
|
||||
}
|
||||
|
||||
public function odpPort()
|
||||
{
|
||||
return $this->belongsTo(TopologyPort::class, 'odp_port_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user