alliance fleet tables and models
This commit is contained in:
21
app/Library/Fleets/FleetHelper.php
Normal file
21
app/Library/Fleets/FleetHelper.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Library\Fleets;
|
||||||
|
|
||||||
|
//Internal Libraries
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
//Seat Stuff
|
||||||
|
use Seat\Eseye\Cache\NullCache;
|
||||||
|
use Seat\Eseye\Configuration;
|
||||||
|
use Seat\Eseye\Containers\EsiAuthentication;
|
||||||
|
use Seat\Eseye\Eseye;
|
||||||
|
use Seat\Eseye\Exceptions\RequestFailedException;
|
||||||
|
|
||||||
|
//Libraries
|
||||||
|
use App\library\Esi\Esi;
|
||||||
|
|
||||||
|
//Models
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
32
app/Models/Fleets/AllianceFleet.php
Normal file
32
app/Models/Fleets/AllianceFleet.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Fleets;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class AllianceFleet extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*/
|
||||||
|
protected $table = 'alliance_fleets';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timestamps
|
||||||
|
*/
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'fleet_id',
|
||||||
|
'fleet_commander_id',
|
||||||
|
'fleet_commander_name',
|
||||||
|
'member_count',
|
||||||
|
'fleet_opened_time',
|
||||||
|
'fleet_closed_time',
|
||||||
|
];
|
||||||
|
}
|
||||||
31
app/Models/Fleets/AllianceFleetMember.php
Normal file
31
app/Models/Fleets/AllianceFleetMember.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Fleets;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class AllianceFleetMember extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*/
|
||||||
|
protected $table = 'alliance_fleet_members';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timestamps
|
||||||
|
*/
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'fleet_id',
|
||||||
|
'character_id',
|
||||||
|
'character_name',
|
||||||
|
'fleet_joined_time',
|
||||||
|
'fleet_leaved_time',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateFleetTables extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
if(!Schema::hasTable('alliance_fleets')) {
|
||||||
|
Schema::create('alliance_fleets', function(Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
$table->bigUnsignedInteger('fleet_id');
|
||||||
|
$table->bigUnsignedInteger('fleet_commander_id');
|
||||||
|
$table->string('fleet_commander_name')->nullable();
|
||||||
|
$table->unsignedInteger('member_count');
|
||||||
|
$table->dateTime('fleet_opened_time');
|
||||||
|
$table->dateTime('fleet_closed_time')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Schema::hasTable('alliance_fleet_members')) {
|
||||||
|
Schema::create('alliance_fleet_members', function(Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
$table->bigUnsignedInteger('fleet_id');
|
||||||
|
$table->bigUnsignedInteger('character_id');
|
||||||
|
$table->string('character_name');
|
||||||
|
$table->dateTime('fleet_joined_time');
|
||||||
|
$table->dateTime('fleet_leaved_time');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('alliance_fleets');
|
||||||
|
Schema::dropIfExists('alliance_fleet_members');
|
||||||
|
}
|
||||||
|
}
|
||||||
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
@@ -17,6 +17,7 @@ return array(
|
|||||||
'App\\Console\\Commands\\MoonMailerCommand' => $baseDir . '/app/Console/Commands/Moons/MoonMailer.php',
|
'App\\Console\\Commands\\MoonMailerCommand' => $baseDir . '/app/Console/Commands/Moons/MoonMailer.php',
|
||||||
'App\\Console\\Commands\\PurgeUsers' => $baseDir . '/app/Console/Commands/Users/PurgeUsers.php',
|
'App\\Console\\Commands\\PurgeUsers' => $baseDir . '/app/Console/Commands/Users/PurgeUsers.php',
|
||||||
'App\\Console\\Commands\\PurgeWormholes' => $baseDir . '/app/Console/Commands/Wormholes/PurgeWormholes.php',
|
'App\\Console\\Commands\\PurgeWormholes' => $baseDir . '/app/Console/Commands/Wormholes/PurgeWormholes.php',
|
||||||
|
'App\\Console\\Commands\\SovBillsCommand' => $baseDir . '/app/Console/Commands/Finances/SovBills.php',
|
||||||
'App\\Console\\Commands\\UpdateMoonPriceCommand' => $baseDir . '/app/Console/Commands/Moons/UpdateMoonPricing.php',
|
'App\\Console\\Commands\\UpdateMoonPriceCommand' => $baseDir . '/app/Console/Commands/Moons/UpdateMoonPricing.php',
|
||||||
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
|
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
|
||||||
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
|
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
|
||||||
|
|||||||
1
vendor/composer/autoload_static.php
vendored
1
vendor/composer/autoload_static.php
vendored
@@ -481,6 +481,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
|||||||
'App\\Console\\Commands\\MoonMailerCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/MoonMailer.php',
|
'App\\Console\\Commands\\MoonMailerCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/MoonMailer.php',
|
||||||
'App\\Console\\Commands\\PurgeUsers' => __DIR__ . '/../..' . '/app/Console/Commands/Users/PurgeUsers.php',
|
'App\\Console\\Commands\\PurgeUsers' => __DIR__ . '/../..' . '/app/Console/Commands/Users/PurgeUsers.php',
|
||||||
'App\\Console\\Commands\\PurgeWormholes' => __DIR__ . '/../..' . '/app/Console/Commands/Wormholes/PurgeWormholes.php',
|
'App\\Console\\Commands\\PurgeWormholes' => __DIR__ . '/../..' . '/app/Console/Commands/Wormholes/PurgeWormholes.php',
|
||||||
|
'App\\Console\\Commands\\SovBillsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Finances/SovBills.php',
|
||||||
'App\\Console\\Commands\\UpdateMoonPriceCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/UpdateMoonPricing.php',
|
'App\\Console\\Commands\\UpdateMoonPriceCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/UpdateMoonPricing.php',
|
||||||
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
|
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
|
||||||
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
|
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
|
||||||
|
|||||||
Reference in New Issue
Block a user