testing
This commit is contained in:
@@ -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',
|
||||
];
|
||||
}
|
||||
@@ -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',
|
||||
];
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user