cleaned up models which are no longer utilized
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Doku;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DokuGroupNames extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'wiki_groupnames';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'gname',
|
||||
'description',
|
||||
];
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Doku;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DokuMember extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'wiki_member';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'uid',
|
||||
'gid',
|
||||
'groupname',
|
||||
];
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Doku;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DokuUser extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'wiki_user';
|
||||
|
||||
// Timestamps
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'login',
|
||||
'pass',
|
||||
'name',
|
||||
'mail',
|
||||
];
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Flex;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FlexStructure extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
public $table = 'alliance_flex_structures';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'requestor_id',
|
||||
'requestor_name',
|
||||
'requestor_corp_id',
|
||||
'requestor_corp_name',
|
||||
'system_id',
|
||||
'system',
|
||||
'structure_type',
|
||||
'structure_cost',
|
||||
'paid_until',
|
||||
];
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Logistics;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AnchorStructure extends Model
|
||||
{
|
||||
//Table Name
|
||||
public $table = 'alliance_anchor_structure';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'system',
|
||||
'structure_size',
|
||||
'structure_type',
|
||||
'requested_drop_time',
|
||||
'requester_id',
|
||||
'requester',
|
||||
];
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AllianceMoon extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'alliance_moons';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* The fillable items for each entry
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Region',
|
||||
'System',
|
||||
'Planet',
|
||||
'Moon',
|
||||
'Corporation',
|
||||
'StructureName',
|
||||
'FirstOre',
|
||||
'FirstQuantity',
|
||||
'SecondOre',
|
||||
'SecondQuantity',
|
||||
'ThirdOre',
|
||||
'ThirdQuantity',
|
||||
'FourthOre',
|
||||
'FourthQuantity',
|
||||
'MoonType',
|
||||
'Availability',
|
||||
];
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AllianceMoonRequest extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'alliance_moon_requests';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The fillable items for each entry
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'region',
|
||||
'system',
|
||||
'planet',
|
||||
'moon',
|
||||
'corporation_name',
|
||||
'corporation_ticker',
|
||||
'corporation_id',
|
||||
'requestor_name',
|
||||
'requestor_id',
|
||||
'approver_name',
|
||||
'approver_id',
|
||||
'status',
|
||||
];
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CorpMoonLedger extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'corp_moon_ledgers';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'character_id',
|
||||
'character_name',
|
||||
'observer_id',
|
||||
'observer_name',
|
||||
'type_id',
|
||||
'ore',
|
||||
'quantity',
|
||||
'recorded_corporation_id',
|
||||
'recorded_corporation_name',
|
||||
'last_updated',
|
||||
];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CorpMoonObserver extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'corp_mining_observers';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* Attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'observer_id',
|
||||
'observer_name',
|
||||
'observer_type',
|
||||
'observer_owner_id',
|
||||
'solar_system_id',
|
||||
'observer_type_id',
|
||||
'last_updated',
|
||||
];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RentalMoon extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'RentalMoons';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
// Timestamps
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'Region',
|
||||
'System',
|
||||
'Planet',
|
||||
'Moon',
|
||||
'StructureId',
|
||||
'StructureName',
|
||||
'FirstOre',
|
||||
'FirstQuantity',
|
||||
'SecondOre',
|
||||
'SecondQuantity',
|
||||
'ThirdOre',
|
||||
'ThirdQuantity',
|
||||
'FourthOre',
|
||||
'FourthQuantity',
|
||||
];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RentalMoonInvoice extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_moon_rental_invoices';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* Items which are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'character_id',
|
||||
'character_name',
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'invoice_id',
|
||||
'rental_moons',
|
||||
'invoice_amount',
|
||||
'due_date',
|
||||
'paid',
|
||||
];
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RentalMoonLedger extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_rental_moon_ledgers';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'character_id',
|
||||
'character_name',
|
||||
'observer_id',
|
||||
'observer_name',
|
||||
'type_id',
|
||||
'ore',
|
||||
'quantity',
|
||||
'recorded_corporation_id',
|
||||
'recorded_corporation_name',
|
||||
'last_updated',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the observer this belongs to
|
||||
*/
|
||||
public function observer() {
|
||||
return $this->belongsTo('App\Models\Moon\RentalMoonObserver', 'observer_id', 'observer_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RentalMoonObserver extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_mining_observers';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'observer_id',
|
||||
'observer_name',
|
||||
'observer_type',
|
||||
'last_updated',
|
||||
];
|
||||
|
||||
public function ledger() {
|
||||
return $this->hasMany('App\Models\Moon\RentalMoonLedger', 'observer_id', 'observer_id');
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\MoonRentals;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class AllianceRentalMoon extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_rental_moons';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Items which are mass assignable by the model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'region',
|
||||
'system',
|
||||
'planet',
|
||||
'moon',
|
||||
'structure_id',
|
||||
'structure_name',
|
||||
'first_ore',
|
||||
'first_quantity',
|
||||
'second_ore',
|
||||
'second_quantity',
|
||||
'third_ore',
|
||||
'third_quantity',
|
||||
'fourth_ore',
|
||||
'fourth_quantity',
|
||||
'moon_worth',
|
||||
'alliance_rental_price',
|
||||
'out_of_alliance_rental_price',
|
||||
'rental_type',
|
||||
'rental_until',
|
||||
'rental_contact_id',
|
||||
'rental_contact_type',
|
||||
'paid',
|
||||
'paid_until',
|
||||
'alliance_use_until',
|
||||
'next_moon_pull',
|
||||
];
|
||||
|
||||
public function getPaidStatus() {
|
||||
return $this->paid;
|
||||
}
|
||||
|
||||
public function getNextMoonPull() {
|
||||
return $this->next_moon_pull;
|
||||
}
|
||||
|
||||
public function getRSPM() {
|
||||
return $this->region . " - " . $this->system . " - " . $this->planet . " - " . $this->moon;
|
||||
}
|
||||
|
||||
public function getOOARentalPrice() {
|
||||
return $this->out_of_alliance_rental_price;
|
||||
}
|
||||
|
||||
public function getIARentalPrice() {
|
||||
return $this->alliance_rental_price;
|
||||
}
|
||||
|
||||
public function getWorth() {
|
||||
return $this->moon_worth;
|
||||
}
|
||||
|
||||
public function getRentalType() {
|
||||
return $this->rental_type;
|
||||
}
|
||||
|
||||
public function isRented() {
|
||||
$today = Carbon::now();
|
||||
|
||||
if($today->lessThan($this->rental_until)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function isPaid() {
|
||||
$today = Carbon::now();
|
||||
|
||||
if($today->lessThan($this->paid_until)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\MoonRentals;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MoonRentalInvoice extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_moon_rental_invoices';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* These are the items which are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'invoice_id',
|
||||
'character_id',
|
||||
'character_name',
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'rental_moons',
|
||||
'invoice_amount',
|
||||
'due_date',
|
||||
'paid',
|
||||
];
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\MoonRentals;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MoonRentalPayment extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'alliance_moon_rental_payments';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* These are the items which are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'invoice_id',
|
||||
'payment_amount',
|
||||
'reference_id',
|
||||
];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\SystemRentals;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RentalSystem extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
public $table = 'alliance_rental_systems';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'contact_id',
|
||||
'contact_name',
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'system_id',
|
||||
'system_name',
|
||||
'rental_cost',
|
||||
'paid_until',
|
||||
];
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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,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);
|
||||
|
||||
@@ -6,6 +6,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserRole extends Model
|
||||
{
|
||||
/**
|
||||
* Database Table
|
||||
*/
|
||||
protected $table = 'user_roles';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
Reference in New Issue
Block a user