Skip to content

Database Structure (Relationships)

Zane Hooper edited this page Mar 16, 2017 · 3 revisions

Server (App\Server\Server)

Relationship Relevant Joins Type Class
serverPorts - hasMany App\Server\Port\Port
accesses - hasMany App\Client\Server\Models\ClientServer

Server Port (App\Server\Port\Port)

Relationship Relevant Joins Type Class
entities - morphMany App\Entity\Entity
primaryEntity - morphOne App\Entity\Entity
hubPort - belongsTo App\Hub\Port\Port
server scopeJoinServer belongsTo App\Server\Server
group - belongsTo App\Group\Group

IP Entity (App\Entity\Entity)

Relationship Relevant Joins Type Class
owner scopeJoinServer, scopeJoinServerPort morphTo currently, only App\Server\Port\Port. In the future, App\Hub\Hub?
group scopeJoinGroup belongsTo App\Group\Group

IP Group (App\Group\Group)

Relationship Relevant Joins Type Class
entities - hasMany App\Entity\Entity
switches - belongsToMany App\Hub\Hub
pxeServer - belongsTo App\Pxe\Server\Server