cleaned up models which are no longer utilized

This commit is contained in:
2021-02-12 14:35:57 +09:00
parent dd5c1f4c2d
commit a818452857
21 changed files with 27 additions and 620 deletions
+11 -3
View File
@@ -6,6 +6,16 @@ use Illuminate\Database\Eloquent\Model;
class AvailableUserPermission extends Model
{
/**
* Database Table
*/
protected $table = 'available_user_permissions';
/**
* Timestamps enabled for the rows
*/
public $timestamps = false;
/**
* The attributes that are mass assignable
*/
@@ -13,7 +23,5 @@ class AvailableUserPermission extends Model
'permission',
];
protected $table = 'available_user_permissions';
public $timestamps = false;
}
+7 -15
View File
@@ -17,6 +17,11 @@ class User extends Authenticatable
{
use Notifiable;
/**
* Database Table
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
@@ -29,12 +34,11 @@ class User extends Authenticatable
'owner_hash',
'character_id',
'inserted_at',
'expires_in',
'access_token',
'expires_in',
'user_type',
];
protected $table = 'users';
public function role() {
return $this->hasOne('\App\Models\User\UserRole', 'character_id', 'character_id');
@@ -120,18 +124,6 @@ class User extends Authenticatable
return $role->role;
}
public function isMoonRenter() {
$moonRental = AllianceRentalMoon::where([
'rental_contact_id' => $this->character_id,
])->first();
if($moonRental != null) {
return true;
} else {
return false;
}
}
public function srpOpen() {
return SRPShip::where([
'character_id' => $this->character_id,
+6 -1
View File
@@ -6,6 +6,11 @@ use Illuminate\Database\Eloquent\Model;
class UserPermission extends Model
{
/**
* Database Table
*/
protected $table = 'user_permissions';
/**
* The attributes that are mass assignable
*
@@ -16,7 +21,7 @@ class UserPermission extends Model
'permission',
];
protected $table = 'user_permissions';
public function user() {
return $this->belongsTo(User::class);
+3
View File
@@ -6,6 +6,9 @@ use Illuminate\Database\Eloquent\Model;
class UserRole extends Model
{
/**
* Database Table
*/
protected $table = 'user_roles';
protected $fillable = [