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');