From d44d374218ac420dc9ce649e1eef7dd21e7122fc Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Wed, 5 Jul 2017 13:25:40 -0500 Subject: [PATCH] #41 add fuel prices to the airports table --- app/Models/Airline.php | 10 ++++++++-- .../2017_06_11_135707_create_airports_table.php | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Models/Airline.php b/app/Models/Airline.php index 8da94ee6..c8e1f653 100644 --- a/app/Models/Airline.php +++ b/app/Models/Airline.php @@ -17,7 +17,10 @@ class Airline extends Model public $fillable = [ 'code', 'name', - 'active' + 'fuel_100ll_cost', + 'fuel_jeta_cost', + 'fuel_mogas_cost', + 'active', ]; /** @@ -28,7 +31,10 @@ class Airline extends Model protected $casts = [ 'code' => 'string', 'name' => 'string', - 'active' => 'boolean' + 'fuel_100ll_cost' => 'double', + 'fuel_jeta_cost' => 'double', + 'fuel_mogas_cost' => 'double', + 'active' => 'boolean', ]; /** diff --git a/database/migrations/2017_06_11_135707_create_airports_table.php b/database/migrations/2017_06_11_135707_create_airports_table.php index 60281c7d..8c65f933 100644 --- a/database/migrations/2017_06_11_135707_create_airports_table.php +++ b/database/migrations/2017_06_11_135707_create_airports_table.php @@ -19,6 +19,9 @@ class CreateAirportsTable extends Migration $table->string('name'); $table->string('location')->nullable(); $table->string('country')->nullable(); + $table->double('fuel_100ll_cost', 19, 2)->nullable(); + $table->double('fuel_jeta_cost', 19, 2)->nullable(); + $table->double('fuel_mogas_cost', 19, 2)->nullable(); $table->float('lat', 7, 4)->default(0.0); $table->float('lon', 7, 4)->default(0.0); $table->timestamps();