mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Cleanup models, fix test using old factory
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $node_id
|
||||
@@ -23,8 +21,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Allocation extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -19,8 +18,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class ApiKey extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -25,7 +24,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Backup extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
const RESOURCE_NAME = 'backup';
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $server_id
|
||||
@@ -21,8 +19,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Database extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class DatabaseHost extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $uuid
|
||||
@@ -48,8 +46,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Egg extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $egg_id
|
||||
@@ -27,8 +25,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class EggVariable extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $short
|
||||
@@ -16,8 +14,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Location extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -6,11 +6,14 @@ use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Contracts\Validation\Factory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model as IlluminateModel;
|
||||
use Pterodactyl\Exceptions\Model\DataValidationException;
|
||||
|
||||
abstract class Model extends IlluminateModel
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Set to true to return immutable Carbon date instances from the model.
|
||||
*
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $uuid
|
||||
@@ -18,8 +16,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Nest extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -6,7 +6,6 @@ use Symfony\Component\Yaml\Yaml;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -39,7 +38,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Node extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,6 @@ use Cron\CronExpression;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Container\Container;
|
||||
use Pterodactyl\Contracts\Extensions\HashidsInterface;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -31,8 +30,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Schedule extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Pterodactyl\Models;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -55,7 +54,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
class Server extends Model
|
||||
{
|
||||
use BelongsToThrough;
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -18,7 +17,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
*/
|
||||
class Subuser extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Pterodactyl\Models;
|
||||
use Illuminate\Container\Container;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
use Pterodactyl\Contracts\Extensions\HashidsInterface;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -26,7 +25,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
class Task extends Model
|
||||
{
|
||||
use BelongsToThrough;
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
|
||||
@@ -11,7 +11,6 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Pterodactyl\Traits\Helpers\AvailableLanguages;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
@@ -50,7 +49,6 @@ class User extends Model implements
|
||||
use Authorizable;
|
||||
use AvailableLanguages;
|
||||
use CanResetPassword;
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
|
||||
const USER_LEVEL_USER = 0;
|
||||
|
||||
Reference in New Issue
Block a user