34 lines
781 B
PHP
34 lines
781 B
PHP
<?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');
|
|
}
|
|
}
|