databases and models
This commit is contained in:
1368
database/migrations/2026_03_10_013849_create_eve_tables.php
Normal file
1368
database/migrations/2026_03_10_013849_create_eve_tables.php
Normal file
File diff suppressed because it is too large
Load Diff
166
database/migrations/2026_03_10_025605_create_srp_tables.php
Normal file
166
database/migrations/2026_03_10_025605_create_srp_tables.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if(!Schema::hasTable('srp_ships')) {
|
||||
Schema::create('srp_ships', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('character_id')->default('N/A');
|
||||
$table->string('character_name');
|
||||
$table->string('fleeet_commander_id')->default('0');
|
||||
$table->string('fleet_commander_name');
|
||||
$table->string('zkillboard');
|
||||
$table->string('ship_type');
|
||||
$table->enum('fleet_type', [
|
||||
'Home Defense',
|
||||
'Fun Fleet',
|
||||
'ADM Fleet',
|
||||
'Casuals',
|
||||
'Strat Op',
|
||||
'CTA',
|
||||
'None',
|
||||
]);
|
||||
$table->decimal('loss_value', 20, 2);
|
||||
$table->enum('approval', [
|
||||
'Under Review',
|
||||
'Approved',
|
||||
'Denied',
|
||||
]);
|
||||
$table->decimal('paid_value', 20, 2);
|
||||
$table->text('notes')->nullable();
|
||||
$table->string('paid_by_id')->nullable();
|
||||
$table->string('paid_by_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('srp_ship_types')) {
|
||||
Schema::create('srp_ship_types', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code');
|
||||
$table->string('description');
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('srp_payouts')) {
|
||||
Schema::create('srp_payouts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code');
|
||||
$table->decimal('payout', 5, 2);
|
||||
});
|
||||
}
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'None',
|
||||
'description' => 'None',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T1FDC',
|
||||
'description' => 'T1 Frig / Dessie / Cruiser',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T1BC',
|
||||
'description' => 'T1 Battelcruiser',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T2F',
|
||||
'description' => 'T2 Frigate',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T3D',
|
||||
'description' => 'T3 Destroyer',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T1T2Logi',
|
||||
'description' => 'T1 & T2 Logistics',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'RI',
|
||||
'description' => 'Recons / Interdictors',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T2C',
|
||||
'description' => 'T2 Cruiser',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'T3C',
|
||||
'description' => 'T3 Cruiser',
|
||||
]);
|
||||
|
||||
DB::table('srp_ship_types')->insert([
|
||||
'code' => 'COM',
|
||||
'description' => 'Command Ship',
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T1FDC',
|
||||
'payout' => 75.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T1BC',
|
||||
'payout' => 60.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T2F',
|
||||
'payout' => 60.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T3D',
|
||||
'payout' => 60.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T1T2Logi',
|
||||
'payout' => 100.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'RI',
|
||||
'payout' => 50.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T2C',
|
||||
'payout' => 50.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'T3C',
|
||||
'payout' => 50.00,
|
||||
]);
|
||||
|
||||
DB::table('srp_payouts')->insert([
|
||||
'code' => 'COM',
|
||||
'payout' => 100.00,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('srp_payouts');
|
||||
Schema::dropIfExists('srp_ships');
|
||||
Schema::dropIfExists('srp_ship_types');
|
||||
}
|
||||
};
|
||||
50
database/migrations/2026_03_10_025618_create_black_list.php
Normal file
50
database/migrations/2026_03_10_025618_create_black_list.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if(!Schema::hasTable('blacklist')) {
|
||||
Schema::create('blacklist', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('entity_id')->unique();
|
||||
$table->string('entity_name')->default('');
|
||||
$table->enum('entity_type', [
|
||||
'character',
|
||||
'corporation',
|
||||
'alliance',
|
||||
'coalition',
|
||||
]);
|
||||
$table->text('reason');
|
||||
$table->string('lister_id');
|
||||
$table->string('lister_name');
|
||||
$table->enum('state', [
|
||||
'Added',
|
||||
'Removed',
|
||||
'N/A',
|
||||
])->default('Valid');
|
||||
$table->string('removed_by_id')->nullable();
|
||||
$table->string('removed_by_name')->nullable();
|
||||
$table->text('removed_notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('blacklist');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if(!Schema::hasTable('after_action_reports')) {
|
||||
Schema::create('after_action_reports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('fc_id');
|
||||
$table->string('fc_name');
|
||||
$table->dateTime('formup_time');
|
||||
$table->string('formup_location');
|
||||
$table->text('doctrine');
|
||||
$table->text('objective');
|
||||
$table->enum('result', [
|
||||
'Win',
|
||||
'Lose',
|
||||
'Neither',
|
||||
'Unknown',
|
||||
]);
|
||||
$table->text('summary');
|
||||
$table->text('improvements')->nullable();
|
||||
$table->text('worked_well')->nullable();
|
||||
$table->text('additional_comments')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('after_action_reports');
|
||||
}
|
||||
};
|
||||
46
database/migrations/2026_03_10_025658_create_mining_tax.php
Normal file
46
database/migrations/2026_03_10_025658_create_mining_tax.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if(!Schema::hasTable('moon_mining_tax')) {
|
||||
Schema::create('moon_mining_tax', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('moon_id');
|
||||
$table->string('name');
|
||||
$table->decimal('worth', 20, 2);
|
||||
$table->decimal('tax_bracket', 5, 2);
|
||||
$table->decimal('tax_amount', 20, 2);
|
||||
$table->dateTime('rental_end');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if(!Schema::hasTable('mining_tax')) {
|
||||
Schema::create('mining_tax', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('character_id');
|
||||
$table->string('character_name');
|
||||
$table->dateTime('month_end');
|
||||
$table->decimal('amount', 20, 2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('moon_mining_tax');
|
||||
}
|
||||
};
|
||||
139
database/migrations/2026_03_10_025710_create_lookup_tables.php
Normal file
139
database/migrations/2026_03_10_025710_create_lookup_tables.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if(!Schema::hasTable('moon_lookup')) {
|
||||
Schema::create('moon_lookup', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('moon_id');
|
||||
$table->string('moon_name');
|
||||
$table->double('position_x');
|
||||
$table->double('position_y');
|
||||
$table->double('position_z');
|
||||
$table->string('system_id');
|
||||
$table->enum('owned', [
|
||||
'Yes',
|
||||
'No',
|
||||
]);
|
||||
$table->string('sov_owner_id')->nullable();
|
||||
$table->string('sov_owner_name')->nullable();
|
||||
$table->string('system_id');
|
||||
$table->string('system_name');
|
||||
$table->enum('moon_type', [
|
||||
'Common',
|
||||
'R4',
|
||||
'R8',
|
||||
'R16',
|
||||
'R32',
|
||||
'R64',
|
||||
'None',
|
||||
])->default('None');
|
||||
$table->decimal('worth', 20, 2)->default(0.00);
|
||||
$table->enum('owned', [
|
||||
'alliance',
|
||||
'corporation',
|
||||
]);
|
||||
$table->string('owner_id');
|
||||
$table->string('owner_name');
|
||||
$table->decimal('rental_amount')->default(0.00);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('item_lookup')) {
|
||||
Schema::create('item_lookup', function (Blueprint $table) {
|
||||
$table->string('item_id')->unique();
|
||||
$table->double('capacity', 20, 2)->nullable();
|
||||
$table->text('description');
|
||||
$table->unsignedBigInteger('graphic_id')->nullable();
|
||||
$table->unsignedBigInteger('group_id');
|
||||
$table->unsignedBigInteger('icon_id')->nullable();
|
||||
$table->unsignedBigInteger('market_group_id')->nullable();
|
||||
$table->string('mass')->nullable();
|
||||
$table->string('name');
|
||||
$table->double('packaged_volume', 20, 2)->nullable();
|
||||
$table->unsignedBigInteger('portion_size')->nullable();
|
||||
$table->boolean('published');
|
||||
$table->double('radius', 20, 2)->nullable();
|
||||
$table->unsignedBigInteger('type_id')->unique();
|
||||
$table->double('volume', 20, 2)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('character_lookup')) {
|
||||
Schema::create('character_lookup', function (Blueprint $table) {
|
||||
$table->string('character_id');
|
||||
$table->string('alliance_id')->nullable();
|
||||
$table->string('ancestry_id')->nullable();
|
||||
$table->string('birthday');
|
||||
$table->string('bloodline_id');
|
||||
$table->string('corporation_id');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('faction_id')->nullable();
|
||||
$table->string('gender');
|
||||
$table->string('name');
|
||||
$table->string('race_id');
|
||||
$table->float('security_status');
|
||||
$table->string('title')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('corporation_lookup')) {
|
||||
Schema::create('corporation_lookup', function (Blueprint $table) {
|
||||
$table->string('corporation_id')->unique();
|
||||
$table->string('alliance_id')->nullable();
|
||||
$table->string('ceo_id');
|
||||
$table->string('creator_id');
|
||||
$table->string('date_founded')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('faction_id')->nullable();
|
||||
$table->string('home_station_id')->nullable();
|
||||
$table->string('member_count');
|
||||
$table->string('name');
|
||||
$table->string('shares')->nullable();
|
||||
$table->decimal('tax_rate', 20, 2);
|
||||
$table->string('ticker');
|
||||
$table->string('url')->nullable();
|
||||
$table->enum('war_eligible', [
|
||||
'Yes',
|
||||
'No',
|
||||
])->default('No');
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('alliance_lookup')) {
|
||||
Schema::create('alliance_lookup', function (Blueprint $table) {
|
||||
$table->string('alliance_id')->unique();
|
||||
$table->string('creator_corporation_id');
|
||||
$table->string('creator_id');
|
||||
$table->dateTime('date_founded');
|
||||
$table->string('executor_corporation_id')->nullable();
|
||||
$table->string('faction_id')->nullable();
|
||||
$table->string('name');
|
||||
$table->string('ticker');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('moon_lookup');
|
||||
Schema::dropIfExists('item_lookup');
|
||||
Schema::dropIfExists('character_lookup');
|
||||
Schema::dropIfExists('corporation_lookup');
|
||||
Schema::dropIfExists('alliance_lookup');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('battle_contracts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('creator_id');
|
||||
$table->string('creator_name');
|
||||
$table->string('party_id');
|
||||
$table->string('party_name');
|
||||
$table->string('length')->default('');
|
||||
$table->decimal('price', 20, 2)->default(0.00);
|
||||
$table->text('terms_conditions')->default('N/A');
|
||||
$table->text('stipulations')->default('N/A');
|
||||
$table->text('deliverables')->default('N/A');
|
||||
$table->enum('validity', [
|
||||
'Pending',
|
||||
'Started',
|
||||
'Finished, Paid',
|
||||
'Paid In Full',
|
||||
'Finished, Not Paid',
|
||||
]);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('battle_contracts');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user