Merge branch 'develop' into feature/server-transfers-actually

This commit is contained in:
Matthew Penner 2020-04-04 16:28:02 -06:00 committed by GitHub
commit fd4de9168a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 1000 additions and 37 deletions

View file

@ -52,10 +52,13 @@ use Znck\Eloquent\Traits\BelongsToThrough;
* @property \Pterodactyl\Models\DaemonKey $key
* @property \Pterodactyl\Models\DaemonKey[]|\Illuminate\Database\Eloquent\Collection $keys
* @property \Pterodactyl\Models\ServerTransfer $transfer
* @property \Pterodactyl\Models\Backup[]|\Illuminate\Database\Eloquent\Collection $backups
*/
class Server extends Validable
class Server extends Model
{
use BelongsToThrough, Notifiable, Searchable;
use BelongsToThrough;
use Notifiable;
use Searchable;
/**
* The resource name for this model when it is transformed into an
@ -340,7 +343,7 @@ class Server extends Validable
}
/**
* Returns all of the daemon keys belonging to this server.
* Returns the associated server transfer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
@ -348,4 +351,12 @@ class Server extends Validable
{
return $this->hasOne(ServerTransfer::class)->orderByDesc('id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function backups()
{
return $this->hasMany(Backup::class);
}
}