This commit is contained in:
2026-03-07 21:17:53 -06:00
parent 11ca220a84
commit 1906ca329c
15 changed files with 135 additions and 17 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class AvailableUserPermission extends Model
{
/**
* Database Table
*
*/
protected $table = 'available_user_permissions';
/**
* Primary Key
*/
public $primaryKey = 'id';
/**
* Timestamps enabled for the rows
*/
public $timestamps = false;
/**
* The attributes that are mass assignable
*/
protected $fillable = [
'permission',
];
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class AvailableUserRole extends Model
{
//Table Name
protected $table = 'available_user_roles';
//Primary Key
public $primaryKey = 'id';
//Timestamps
public $timestamps = false;
/**
* The attribute that are mass assignable
*/
protected $fillable = [
'role',
'rank',
'description',
];
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class UserPermission extends Model
{
/**
* Database Table
*/
protected $table = 'user_permissions';
//Primary Key
public $primaryKey = 'id';
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'character_id',
'permission',
];
public function user() {
return $this->belongsTo(User::class);
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class UserRole extends Model
{
/**
* Database Table
*/
protected $table = 'user_roles';
//Primary Key
public $primaryKey = 'id';
/**
* Attributes which are mass assignable
*
* @var array
*/
protected $fillable = [
'character_id',
'role',
];
public function user() {
return $this->belongsTo(User::class);
}
}
+1 -1
View File
@@ -26,6 +26,6 @@ class EsiScope extends Model
];
public function user() {
return $this->belongsTo(App\Models\User\User::class, 'character_id', 'character_id');
return $this->belongsTo(App\Models\Auth\User::class, 'character_id', 'character_id');
}
}
+1 -1
View File
@@ -29,7 +29,7 @@ class EsiToken extends Model
];
public function user() {
return $this->belongsTo(App\Models\User\User::class, 'character_id', 'character_id');
return $this->belongsTo(App\Models\Auth\User::class, 'character_id', 'character_id');
}
public function esiscopes() {