diff --git a/app/Console/Commands/Moons/FetchMoonLedgerCommand.php b/app/Console/Commands/Moons/FetchMoonLedgerCommand.php new file mode 100644 index 000000000..a8a49e5a2 --- /dev/null +++ b/app/Console/Commands/Moons/FetchMoonLedgerCommand.php @@ -0,0 +1,42 @@ + $groupId])->count(); - if($count > 0) { + if(DokuMember::where(['gid' => $groupId])->count() > 0) { //If the count is greater than zero then we don't need to do anything, //just return false to indicate nothing was changed return false; diff --git a/app/Models/Moon/CorpMoonLedger.php b/app/Models/Moon/CorpMoonLedger.php new file mode 100644 index 000000000..d154580b7 --- /dev/null +++ b/app/Models/Moon/CorpMoonLedger.php @@ -0,0 +1,32 @@ +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'); + } +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index e456e73e4..5d664564e 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -8,6 +8,8 @@ $baseDir = dirname($vendorDir); return array( '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\\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\\GetAssetsCommand' => $baseDir . '/app/Console/Commands/Assets/GetAssets.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\\SovBillExpenses' => $baseDir . '/app/Library/Finances/SovBillExpenses.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\\Lookups\\LookupHelper' => $baseDir . '/app/Library/Lookups/LookupHelper.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\\SovBillJournal' => $baseDir . '/app/Models/Finances/SovBillJournal.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\\Jobs\\JobProcessAsset' => $baseDir . '/app/Models/Jobs/JobProcessAsset.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\\ItemComposition' => $baseDir . '/app/Models/Moon/ItemComposition.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\\RentalMoon' => $baseDir . '/app/Models/Moon/RentalMoon.php', 'App\\Models\\SRP\\SRPShip' => $baseDir . '/app/Models/SRP/SRPShip.php', 'App\\Models\\SRP\\SrpFleetType' => $baseDir . '/app/Models/SRP/SrpFleetType.php', 'App\\Models\\SRP\\SrpPayout' => $baseDir . '/app/Models/SRP/SrpPayout.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 8ac765e99..112418f23 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -472,6 +472,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9 public static $classMap = array ( '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\\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\\GetAssetsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Assets/GetAssets.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\\SovBillExpenses' => __DIR__ . '/../..' . '/app/Library/Finances/SovBillExpenses.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\\Lookups\\LookupHelper' => __DIR__ . '/../..' . '/app/Library/Lookups/LookupHelper.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\\SovBillJournal' => __DIR__ . '/../..' . '/app/Models/Finances/SovBillJournal.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\\Jobs\\JobProcessAsset' => __DIR__ . '/../..' . '/app/Models/Jobs/JobProcessAsset.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\\ItemComposition' => __DIR__ . '/../..' . '/app/Models/Moon/ItemComposition.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\\RentalMoon' => __DIR__ . '/../..' . '/app/Models/Moon/RentalMoon.php', 'App\\Models\\SRP\\SRPShip' => __DIR__ . '/../..' . '/app/Models/SRP/SRPShip.php', 'App\\Models\\SRP\\SrpFleetType' => __DIR__ . '/../..' . '/app/Models/SRP/SrpFleetType.php', 'App\\Models\\SRP\\SrpPayout' => __DIR__ . '/../..' . '/app/Models/SRP/SrpPayout.php',