added mining observers table

added corp observers table
added alliance rental moon ledgers
added corp moon ledgers table
modified wiki stuff groups
This commit is contained in:
2020-05-07 01:13:18 -05:00
parent d796512f6a
commit 9561a076d7
10 changed files with 311 additions and 4 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class FetchMoonLedgerCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class FetchRentalMoonLedgerCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Declare variables
$structures = array();
$miningLedgers = array();
$tempMiningLedger = array();
$esiHelper = new Esi;
$lookup = new LookupHelper;
$response = null;
$structureInfo = null;
}
}

View File

@@ -63,8 +63,7 @@ class WikiHelper {
$groups = DokuGroupNames::all(); $groups = DokuGroupNames::all();
//Check if the user already belongs to the group //Check if the user already belongs to the group
$userGroups = DokuMember::where(['gid' => $groupId])->count(); if(DokuMember::where(['gid' => $groupId])->count() > 0) {
if($count > 0) {
//If the count is greater than zero then we don't need to do anything, //If the count is greater than zero then we don't need to do anything,
//just return false to indicate nothing was changed //just return false to indicate nothing was changed
return false; return false;

View File

@@ -0,0 +1,32 @@
<?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',
];
}

View File

@@ -0,0 +1,26 @@
<?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;
protected $fillable = [
'corporation_id',
'corporation_name',
'observer_id',
'observer_name',
'observer_type',
'last_updated',
];
}

View File

@@ -0,0 +1,32 @@
<?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',
];
}

View File

@@ -0,0 +1,26 @@
<?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',
];
}

View File

@@ -0,0 +1,91 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRentalMoonLedgerTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('alliance_mining_observers')) {
Schema::create('alliance_mining_observers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->string('observer_type');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('alliance_rental_moon_ledgers')) {
Schema::create('alliance_rental_moon_ledgers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('character_id');
$table->string('character_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->unsignedBigInteger('type_id');
$table->string('ore');
$table->unsignedBigInteger('quantity');
$table->unsignedBigInteger('recorded_corporation_id');
$table->string('record_corporation_name');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('corp_mining_observers')) {
Schema::create('corp_mining_observers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->string('observer_type');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('corp_moon_ledgers')) {
Schema::create('corp_moon_ledgers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('character_id');
$table->string('character_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->unsignedBigInteger('type_id');
$table->string('ore');
$table->unsignedBigInteger('quantity');
$table->unsignedBigInteger('recorded_corporation_id');
$table->string('record_corporation_name');
$table->dateTime('last_updated');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('alliance_rental_moon_ledgers');
Schema::dropIfExists('corp_moon_ledgers');
}
}

View File

@@ -8,6 +8,8 @@ $baseDir = dirname($vendorDir);
return array( return array(
'App\\Console\\Commands\\CleanStaleDataCommand' => $baseDir . '/app/Console/Commands/Data/CleanStaleDataCommand.php', 'App\\Console\\Commands\\CleanStaleDataCommand' => $baseDir . '/app/Console/Commands/Data/CleanStaleDataCommand.php',
'App\\Console\\Commands\\EmptyJumpBridges' => $baseDir . '/app/Console/Commands/Data/EmptyJumpBridges.php', 'App\\Console\\Commands\\EmptyJumpBridges' => $baseDir . '/app/Console/Commands/Data/EmptyJumpBridges.php',
'App\\Console\\Commands\\FetchMoonLedgerCommand' => $baseDir . '/app/Console/Commands/Moons/FetchMoonLedgerCommand.php',
'App\\Console\\Commands\\FetchRentalMoonLedgerCommand' => $baseDir . '/app/Console/Commands/Moons/FetchRentalMoonLedgerCommand.php',
'App\\Console\\Commands\\FlexStructureCommand' => $baseDir . '/app/Console/Commands/Flex/FlexStructureCommand.php', 'App\\Console\\Commands\\FlexStructureCommand' => $baseDir . '/app/Console/Commands/Flex/FlexStructureCommand.php',
'App\\Console\\Commands\\GetAssetsCommand' => $baseDir . '/app/Console/Commands/Assets/GetAssets.php', 'App\\Console\\Commands\\GetAssetsCommand' => $baseDir . '/app/Console/Commands/Assets/GetAssets.php',
'App\\Console\\Commands\\GetCorpsCommand' => $baseDir . '/app/Console/Commands/Corps/GetCorps.php', 'App\\Console\\Commands\\GetCorpsCommand' => $baseDir . '/app/Console/Commands/Corps/GetCorps.php',
@@ -71,6 +73,7 @@ return array(
'App\\Library\\Finances\\ReprocessingTax' => $baseDir . '/app/Library/Finances/ReprocessingTax.php', 'App\\Library\\Finances\\ReprocessingTax' => $baseDir . '/app/Library/Finances/ReprocessingTax.php',
'App\\Library\\Finances\\SovBillExpenses' => $baseDir . '/app/Library/Finances/SovBillExpenses.php', 'App\\Library\\Finances\\SovBillExpenses' => $baseDir . '/app/Library/Finances/SovBillExpenses.php',
'App\\Library\\Finances\\StructureIndustryTax' => $baseDir . '/app/Library/Finances/StructureIndustryTax.php', 'App\\Library\\Finances\\StructureIndustryTax' => $baseDir . '/app/Library/Finances/StructureIndustryTax.php',
'App\\Library\\Fleets\\FleetHelper' => $baseDir . '/app/Library/Fleets/FleetHelper.php',
'App\\Library\\JumpBridges\\JumpBridgeHelper' => $baseDir . '/app/Library/JumpBridges/JumpBridgeHelper.php', 'App\\Library\\JumpBridges\\JumpBridgeHelper' => $baseDir . '/app/Library/JumpBridges/JumpBridgeHelper.php',
'App\\Library\\Lookups\\LookupHelper' => $baseDir . '/app/Library/Lookups/LookupHelper.php', 'App\\Library\\Lookups\\LookupHelper' => $baseDir . '/app/Library/Lookups/LookupHelper.php',
'App\\Library\\Mail\\Helper\\EveMailHelper' => $baseDir . '/app/Library/Mail/Helper/EveMailHelper.php', 'App\\Library\\Mail\\Helper\\EveMailHelper' => $baseDir . '/app/Library/Mail/Helper/EveMailHelper.php',
@@ -101,6 +104,8 @@ return array(
'App\\Models\\Finances\\ReprocessingTaxJournal' => $baseDir . '/app/Models/Finances/ReprocessingTaxJournal.php', 'App\\Models\\Finances\\ReprocessingTaxJournal' => $baseDir . '/app/Models/Finances/ReprocessingTaxJournal.php',
'App\\Models\\Finances\\SovBillJournal' => $baseDir . '/app/Models/Finances/SovBillJournal.php', 'App\\Models\\Finances\\SovBillJournal' => $baseDir . '/app/Models/Finances/SovBillJournal.php',
'App\\Models\\Finances\\StructureIndustryTaxJournal' => $baseDir . '/app/Models/Finances/StructureIndustryTaxJournal.php', 'App\\Models\\Finances\\StructureIndustryTaxJournal' => $baseDir . '/app/Models/Finances/StructureIndustryTaxJournal.php',
'App\\Models\\Fleets\\AllianceFleet' => $baseDir . '/app/Models/Fleets/AllianceFleet.php',
'App\\Models\\Fleets\\AllianceFleetMember' => $baseDir . '/app/Models/Fleets/AllianceFleetMember.php',
'App\\Models\\Flex\\FlexStructure' => $baseDir . '/app/Models/Flex/FlexStructure.php', 'App\\Models\\Flex\\FlexStructure' => $baseDir . '/app/Models/Flex/FlexStructure.php',
'App\\Models\\Jobs\\JobProcessAsset' => $baseDir . '/app/Models/Jobs/JobProcessAsset.php', 'App\\Models\\Jobs\\JobProcessAsset' => $baseDir . '/app/Models/Jobs/JobProcessAsset.php',
'App\\Models\\Jobs\\JobProcessStructure' => $baseDir . '/app/Models/Jobs/JobProcessStructure.php', 'App\\Models\\Jobs\\JobProcessStructure' => $baseDir . '/app/Models/Jobs/JobProcessStructure.php',
@@ -121,8 +126,8 @@ return array(
'App\\Models\\Moon\\Config' => $baseDir . '/app/Models/Moon/Config.php', 'App\\Models\\Moon\\Config' => $baseDir . '/app/Models/Moon/Config.php',
'App\\Models\\Moon\\ItemComposition' => $baseDir . '/app/Models/Moon/ItemComposition.php', 'App\\Models\\Moon\\ItemComposition' => $baseDir . '/app/Models/Moon/ItemComposition.php',
'App\\Models\\Moon\\MineralPrice' => $baseDir . '/app/Models/Moon/MineralPrice.php', 'App\\Models\\Moon\\MineralPrice' => $baseDir . '/app/Models/Moon/MineralPrice.php',
'App\\Models\\Moon\\Moon' => $baseDir . '/app/Models/Moon/Moon.php',
'App\\Models\\Moon\\OrePrice' => $baseDir . '/app/Models/Moon/OrePrice.php', 'App\\Models\\Moon\\OrePrice' => $baseDir . '/app/Models/Moon/OrePrice.php',
'App\\Models\\Moon\\RentalMoon' => $baseDir . '/app/Models/Moon/RentalMoon.php',
'App\\Models\\SRP\\SRPShip' => $baseDir . '/app/Models/SRP/SRPShip.php', 'App\\Models\\SRP\\SRPShip' => $baseDir . '/app/Models/SRP/SRPShip.php',
'App\\Models\\SRP\\SrpFleetType' => $baseDir . '/app/Models/SRP/SrpFleetType.php', 'App\\Models\\SRP\\SrpFleetType' => $baseDir . '/app/Models/SRP/SrpFleetType.php',
'App\\Models\\SRP\\SrpPayout' => $baseDir . '/app/Models/SRP/SrpPayout.php', 'App\\Models\\SRP\\SrpPayout' => $baseDir . '/app/Models/SRP/SrpPayout.php',

View File

@@ -472,6 +472,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
public static $classMap = array ( public static $classMap = array (
'App\\Console\\Commands\\CleanStaleDataCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Data/CleanStaleDataCommand.php', 'App\\Console\\Commands\\CleanStaleDataCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Data/CleanStaleDataCommand.php',
'App\\Console\\Commands\\EmptyJumpBridges' => __DIR__ . '/../..' . '/app/Console/Commands/Data/EmptyJumpBridges.php', 'App\\Console\\Commands\\EmptyJumpBridges' => __DIR__ . '/../..' . '/app/Console/Commands/Data/EmptyJumpBridges.php',
'App\\Console\\Commands\\FetchMoonLedgerCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/FetchMoonLedgerCommand.php',
'App\\Console\\Commands\\FetchRentalMoonLedgerCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/FetchRentalMoonLedgerCommand.php',
'App\\Console\\Commands\\FlexStructureCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Flex/FlexStructureCommand.php', 'App\\Console\\Commands\\FlexStructureCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Flex/FlexStructureCommand.php',
'App\\Console\\Commands\\GetAssetsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Assets/GetAssets.php', 'App\\Console\\Commands\\GetAssetsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Assets/GetAssets.php',
'App\\Console\\Commands\\GetCorpsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Corps/GetCorps.php', 'App\\Console\\Commands\\GetCorpsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Corps/GetCorps.php',
@@ -535,6 +537,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Library\\Finances\\ReprocessingTax' => __DIR__ . '/../..' . '/app/Library/Finances/ReprocessingTax.php', 'App\\Library\\Finances\\ReprocessingTax' => __DIR__ . '/../..' . '/app/Library/Finances/ReprocessingTax.php',
'App\\Library\\Finances\\SovBillExpenses' => __DIR__ . '/../..' . '/app/Library/Finances/SovBillExpenses.php', 'App\\Library\\Finances\\SovBillExpenses' => __DIR__ . '/../..' . '/app/Library/Finances/SovBillExpenses.php',
'App\\Library\\Finances\\StructureIndustryTax' => __DIR__ . '/../..' . '/app/Library/Finances/StructureIndustryTax.php', 'App\\Library\\Finances\\StructureIndustryTax' => __DIR__ . '/../..' . '/app/Library/Finances/StructureIndustryTax.php',
'App\\Library\\Fleets\\FleetHelper' => __DIR__ . '/../..' . '/app/Library/Fleets/FleetHelper.php',
'App\\Library\\JumpBridges\\JumpBridgeHelper' => __DIR__ . '/../..' . '/app/Library/JumpBridges/JumpBridgeHelper.php', 'App\\Library\\JumpBridges\\JumpBridgeHelper' => __DIR__ . '/../..' . '/app/Library/JumpBridges/JumpBridgeHelper.php',
'App\\Library\\Lookups\\LookupHelper' => __DIR__ . '/../..' . '/app/Library/Lookups/LookupHelper.php', 'App\\Library\\Lookups\\LookupHelper' => __DIR__ . '/../..' . '/app/Library/Lookups/LookupHelper.php',
'App\\Library\\Mail\\Helper\\EveMailHelper' => __DIR__ . '/../..' . '/app/Library/Mail/Helper/EveMailHelper.php', 'App\\Library\\Mail\\Helper\\EveMailHelper' => __DIR__ . '/../..' . '/app/Library/Mail/Helper/EveMailHelper.php',
@@ -565,6 +568,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Models\\Finances\\ReprocessingTaxJournal' => __DIR__ . '/../..' . '/app/Models/Finances/ReprocessingTaxJournal.php', 'App\\Models\\Finances\\ReprocessingTaxJournal' => __DIR__ . '/../..' . '/app/Models/Finances/ReprocessingTaxJournal.php',
'App\\Models\\Finances\\SovBillJournal' => __DIR__ . '/../..' . '/app/Models/Finances/SovBillJournal.php', 'App\\Models\\Finances\\SovBillJournal' => __DIR__ . '/../..' . '/app/Models/Finances/SovBillJournal.php',
'App\\Models\\Finances\\StructureIndustryTaxJournal' => __DIR__ . '/../..' . '/app/Models/Finances/StructureIndustryTaxJournal.php', 'App\\Models\\Finances\\StructureIndustryTaxJournal' => __DIR__ . '/../..' . '/app/Models/Finances/StructureIndustryTaxJournal.php',
'App\\Models\\Fleets\\AllianceFleet' => __DIR__ . '/../..' . '/app/Models/Fleets/AllianceFleet.php',
'App\\Models\\Fleets\\AllianceFleetMember' => __DIR__ . '/../..' . '/app/Models/Fleets/AllianceFleetMember.php',
'App\\Models\\Flex\\FlexStructure' => __DIR__ . '/../..' . '/app/Models/Flex/FlexStructure.php', 'App\\Models\\Flex\\FlexStructure' => __DIR__ . '/../..' . '/app/Models/Flex/FlexStructure.php',
'App\\Models\\Jobs\\JobProcessAsset' => __DIR__ . '/../..' . '/app/Models/Jobs/JobProcessAsset.php', 'App\\Models\\Jobs\\JobProcessAsset' => __DIR__ . '/../..' . '/app/Models/Jobs/JobProcessAsset.php',
'App\\Models\\Jobs\\JobProcessStructure' => __DIR__ . '/../..' . '/app/Models/Jobs/JobProcessStructure.php', 'App\\Models\\Jobs\\JobProcessStructure' => __DIR__ . '/../..' . '/app/Models/Jobs/JobProcessStructure.php',
@@ -585,8 +590,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Models\\Moon\\Config' => __DIR__ . '/../..' . '/app/Models/Moon/Config.php', 'App\\Models\\Moon\\Config' => __DIR__ . '/../..' . '/app/Models/Moon/Config.php',
'App\\Models\\Moon\\ItemComposition' => __DIR__ . '/../..' . '/app/Models/Moon/ItemComposition.php', 'App\\Models\\Moon\\ItemComposition' => __DIR__ . '/../..' . '/app/Models/Moon/ItemComposition.php',
'App\\Models\\Moon\\MineralPrice' => __DIR__ . '/../..' . '/app/Models/Moon/MineralPrice.php', 'App\\Models\\Moon\\MineralPrice' => __DIR__ . '/../..' . '/app/Models/Moon/MineralPrice.php',
'App\\Models\\Moon\\Moon' => __DIR__ . '/../..' . '/app/Models/Moon/Moon.php',
'App\\Models\\Moon\\OrePrice' => __DIR__ . '/../..' . '/app/Models/Moon/OrePrice.php', 'App\\Models\\Moon\\OrePrice' => __DIR__ . '/../..' . '/app/Models/Moon/OrePrice.php',
'App\\Models\\Moon\\RentalMoon' => __DIR__ . '/../..' . '/app/Models/Moon/RentalMoon.php',
'App\\Models\\SRP\\SRPShip' => __DIR__ . '/../..' . '/app/Models/SRP/SRPShip.php', 'App\\Models\\SRP\\SRPShip' => __DIR__ . '/../..' . '/app/Models/SRP/SRPShip.php',
'App\\Models\\SRP\\SrpFleetType' => __DIR__ . '/../..' . '/app/Models/SRP/SrpFleetType.php', 'App\\Models\\SRP\\SrpFleetType' => __DIR__ . '/../..' . '/app/Models/SRP/SrpFleetType.php',
'App\\Models\\SRP\\SrpPayout' => __DIR__ . '/../..' . '/app/Models/SRP/SrpPayout.php', 'App\\Models\\SRP\\SrpPayout' => __DIR__ . '/../..' . '/app/Models/SRP/SrpPayout.php',