File transfer
This commit is contained in:
33
app/Addons/AdvancedAdmin/Models/ServerRoleAssignment.php
Normal file
33
app/Addons/AdvancedAdmin/Models/ServerRoleAssignment.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Ball Studios <https://git.balls.studio>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Addons\AdvancedAdmin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ServerRoleAssignment extends Model
|
||||
{
|
||||
protected $table = 'addon_server_role_assignments';
|
||||
|
||||
protected $fillable = ['server_id', 'user_id', 'role_id', 'assigned_by'];
|
||||
|
||||
public function role(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Role::class, 'role_id');
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(\Pterodactyl\Models\User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function server(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(\Pterodactyl\Models\Server::class, 'server_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user