📯 tRaNsFeR lOgS 📯
This commit is contained in:
parent
e6c4a68e4a
commit
5c5e2e24f1
12 changed files with 149 additions and 65 deletions
|
@ -16,6 +16,8 @@ namespace Pterodactyl\Models;
|
|||
* @property \Carbon\Carbon $updated_at
|
||||
*
|
||||
* @property \Pterodactyl\Models\Server $server
|
||||
* @property \Pterodactyl\Models\Node $oldNode
|
||||
* @property \Pterodactyl\Models\Node $newNode
|
||||
*/
|
||||
class ServerTransfer extends Model
|
||||
{
|
||||
|
@ -78,4 +80,24 @@ class ServerTransfer extends Model
|
|||
{
|
||||
return $this->belongsTo(Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the source node associated with a server transfer.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function oldNode()
|
||||
{
|
||||
return $this->hasOne(Node::class, 'id', 'old_node');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the target node associated with a server transfer.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function newNode()
|
||||
{
|
||||
return $this->hasOne(Node::class, 'id', 'new_node');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue