Very basic implemention of frontend logic required to display backups and create a new one

This commit is contained in:
Dane Everitt 2020-04-04 10:59:25 -07:00
parent 17ec4efd3b
commit 9991989f89
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
16 changed files with 431 additions and 2 deletions

View file

@ -6,9 +6,10 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @property int $id
* @property int $server_id
* @property int $uuid
* @property string $name
* @property string $contents
* @property string $ignore
* @property string $disk
* @property string|null $sha256_hash
* @property int $bytes
@ -16,11 +17,15 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property \Carbon\CarbonImmutable $created_at
* @property \Carbon\CarbonImmutable $updated_at
* @property \Carbon\CarbonImmutable|null $deleted_at
*
* @property \Pterodactyl\Models\Server $server
*/
class Backup extends Model
{
use SoftDeletes;
const RESOURCE_NAME = 'backup';
/**
* @var string
*/
@ -56,4 +61,12 @@ class Backup extends Model
{
return $this->asImmutableDateTime($value);
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function server()
{
return $this->belongsTo(Server::class);
}
}