feat(database-hosts): allow linking of multiple nodes
This commit is contained in:
parent
72983e8385
commit
2b5cc99abd
4 changed files with 73 additions and 33 deletions
|
@ -28,6 +28,7 @@ use Illuminate\Contracts\Encryption\Encrypter;
|
|||
* @property int $daemonListen
|
||||
* @property int $daemonSFTP
|
||||
* @property string $daemonBase
|
||||
* @property int|null $database_host_id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Pterodactyl\Models\Location $location
|
||||
|
@ -239,6 +240,16 @@ class Node extends Model
|
|||
return $this->hasMany(Allocation::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the database host associated with a node.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function databaseHost()
|
||||
{
|
||||
return $this->belongsTo(DatabaseHost::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a boolean if the node is viable for an additional server to be placed on it.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue