From b2de6fa5cd8069b740f3238b9df0f3a6733f1c79 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 26 Apr 2020 05:40:30 -0500 Subject: [PATCH] changed table of Moons to RentalMoons --- app/Models/Moon/{Moon.php => RentalMoon.php} | 3 ++- app/Models/MoonRentals/MoonRental.php | 1 + database/migrations/2018_10_06_220248_create_moons_table.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) rename app/Models/Moon/{Moon.php => RentalMoon.php} (89%) diff --git a/app/Models/Moon/Moon.php b/app/Models/Moon/RentalMoon.php similarity index 89% rename from app/Models/Moon/Moon.php rename to app/Models/Moon/RentalMoon.php index b46962aae..c08ba3948 100644 --- a/app/Models/Moon/Moon.php +++ b/app/Models/Moon/RentalMoon.php @@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Moon extends Model { // Table Name - protected $table = 'Moons'; + protected $table = 'RentalMoons'; //Primary Key public $primaryKey = 'id'; @@ -20,6 +20,7 @@ class Moon extends Model 'System', 'Planet', 'Moon', + 'StructureId', 'StructureName', 'FirstOre', 'FirstQuantity', diff --git a/app/Models/MoonRentals/MoonRental.php b/app/Models/MoonRentals/MoonRental.php index 14b9eefd7..19ad4a733 100644 --- a/app/Models/MoonRentals/MoonRental.php +++ b/app/Models/MoonRentals/MoonRental.php @@ -20,6 +20,7 @@ class MoonRental extends Model 'System', 'Planet', 'Moon', + 'StructureId', 'RentalCorp', 'RentalEnd', 'Contact', diff --git a/database/migrations/2018_10_06_220248_create_moons_table.php b/database/migrations/2018_10_06_220248_create_moons_table.php index 451b970d6..a4b25014c 100644 --- a/database/migrations/2018_10_06_220248_create_moons_table.php +++ b/database/migrations/2018_10_06_220248_create_moons_table.php @@ -20,6 +20,7 @@ class CreateMoonsTable extends Migration $table->string('System'); $table->string('Planet'); $table->string('Moon'); + $table->unsignedBigInteger('StructureId')->nullable(); $table->string('StructureName')->default('No Name'); $table->string('FirstOre')->default('None'); $table->integer('FirstQuantity')->default('0'); @@ -41,6 +42,7 @@ class CreateMoonsTable extends Migration $table->string('System'); $table->string('Planet'); $table->string('Moon'); + $table->unsignedBigInteger('StructureId')->nullable(); $table->string('RentalCorp'); $table->dateTime('RentalEnd'); $table->string('Contact');