cleanup aircraft table/repo

This commit is contained in:
Nabeel Shahzad
2017-06-24 14:00:56 -05:00
parent fe1100e57f
commit 5dce55b4f3
11 changed files with 23 additions and 61 deletions

View File

@@ -10,15 +10,11 @@ class CreateAircraftsTable extends Migration
Schema::create('aircraft', function (Blueprint $table) {
$table->increments('id');
$table->integer('subfleet_id')->unsigned();
$table->integer('airport_id')->unsigned()->nullable();
$table->string('hex_code')->nullable();
$table->string('icao');
$table->string('name');
$table->string('registration')->nullable();
$table->string('tail_number')->nullable();
$table->double('cargo_capacity', 19, 2)->nullable();
$table->double('fuel_capacity', 19, 2)->nullable();
$table->double('gross_weight', 19, 2)->nullable();
$table->tinyInteger('fuel_type')->unsigned()->nullable();
$table->boolean('active')->default(true);
$table->timestamps();

View File

@@ -18,6 +18,10 @@ class CreateSubfleetsTable extends Migration
$table->integer('airline_id')->unsigned()->nullable();
$table->string('name');
$table->text('type');
$table->double('cargo_capacity', 19, 2)->nullable();
$table->double('fuel_capacity', 19, 2)->nullable();
$table->double('gross_weight', 19, 2)->nullable();
$table->tinyInteger('fuel_type')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});

View File

@@ -74,13 +74,11 @@ airports:
aircraft:
- id: 1
subfleet_id: 1
icao: B744
name: Boeing 747-400
registration: NC17
tail_number: 17
- id: 2
subfleet_id: 2
icao: B772
name: Boeing 777-200
registration: NC20
tail_number: 20