Add basic listing of server schedules

This commit is contained in:
Dane Everitt 2020-02-08 15:23:08 -08:00
parent f9ec96c70a
commit 32e9fb0346
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 508 additions and 79 deletions

View file

@ -2,8 +2,26 @@
namespace Pterodactyl\Models;
use Illuminate\Container\Container;
use Znck\Eloquent\Traits\BelongsToThrough;
use Pterodactyl\Contracts\Extensions\HashidsInterface;
/**
* @property int $id
* @property int $schedule_id
* @property int $sequence_id
* @property string $action
* @property string $payload
* @property int $time_offset
* @property bool $is_queued
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*
* @property string $hashid
*
* @property \Pterodactyl\Models\Schedule $schedule
* @property \Pterodactyl\Models\Server $server
*/
class Task extends Validable
{
use BelongsToThrough;
@ -83,7 +101,7 @@ class Task extends Validable
*/
public function getHashidAttribute()
{
return app()->make('hashids')->encode($this->id);
return Container::getInstance()->make(HashidsInterface::class)->encode($this->id);
}
/**