Convert aircraft active to more detailed status #134
This commit is contained in:
@@ -15,7 +15,8 @@ $factory->define(App\Models\Aircraft::class, function (Faker $faker) {
|
||||
'name' => $faker->unique()->text(50),
|
||||
'registration' => $faker->unique()->text(10),
|
||||
'hex_code' => \App\Support\ICAO::createHexCode(),
|
||||
'active' => true,
|
||||
'status' => \App\Models\Enums\AircraftStatus::ACTIVE,
|
||||
'state' => \App\Models\Enums\AircraftState::PARKED,
|
||||
'created_at' => $faker->dateTimeBetween('-1 week', 'now'),
|
||||
'updated_at' => function (array $pirep) {
|
||||
return $pirep['created_at'];
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Enums\AircraftState;
|
||||
use App\Models\Enums\AircraftStatus;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
@@ -19,7 +20,7 @@ class CreateAircraftsTable extends Migration
|
||||
$table->string('hex_code', 10)->nullable();
|
||||
$table->unsignedDecimal('zfw')->nullable()->default(0);
|
||||
$table->unsignedBigInteger('flight_time')->nullable()->default(0);
|
||||
$table->boolean('active')->default(true);
|
||||
$table->unsignedTinyInteger('status')->default(AircraftStatus::ACTIVE);
|
||||
$table->unsignedTinyInteger('state')->default(AircraftState::PARKED);
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
@@ -150,16 +150,28 @@ airports:
|
||||
aircraft:
|
||||
- id: 1
|
||||
subfleet_id: 1
|
||||
name: Boeing 747-400
|
||||
airport_id: KJFK
|
||||
name: Boeing 747-438
|
||||
registration: 001Z
|
||||
status: 1
|
||||
- id: 2
|
||||
subfleet_id: 2
|
||||
airport_id: LGRP
|
||||
name: Boeing 777-200
|
||||
registration: C202
|
||||
status: 1
|
||||
- id: 3
|
||||
subfleet_id: 1
|
||||
airport_id: KAUS
|
||||
name: Boeing 747-412
|
||||
registration: S2333
|
||||
status: 1
|
||||
- id: 4
|
||||
subfleet_id: 1
|
||||
airport_id: KAUS
|
||||
name: Boeing 747-436 RETIRED
|
||||
registration:
|
||||
status: 2
|
||||
|
||||
fares:
|
||||
- id: 1
|
||||
@@ -181,13 +193,18 @@ fares:
|
||||
subfleets:
|
||||
- id: 1
|
||||
airline_id: 1
|
||||
name: 747-400 Winglets
|
||||
type: 744W
|
||||
name: 747-43X RB211-524G
|
||||
type: 744-3X-RB211
|
||||
ground_handling_multiplier: 200
|
||||
- id: 2
|
||||
airline_id: 1
|
||||
name: 777-200 LR
|
||||
type: 772-LR
|
||||
name: 777-222ER GE90-76B
|
||||
type: 772-22ER-GE90-76B
|
||||
ground_handling_multiplier: 150
|
||||
- id: 3
|
||||
airline_id: 1
|
||||
name: 777-367 ER GE90-115B
|
||||
type: 772-36ER-GE90-115B
|
||||
ground_handling_multiplier: 150
|
||||
|
||||
# add a few mods to aircraft and fares
|
||||
@@ -296,7 +313,7 @@ pireps:
|
||||
airline_id: 1
|
||||
flight_id: flightid_2
|
||||
flight_number: 101
|
||||
aircraft_id: 1
|
||||
aircraft_id: 2
|
||||
dpt_airport_id: LGRP
|
||||
arr_airport_id: LGRP
|
||||
flight_time: 180 # 6 hours
|
||||
@@ -312,7 +329,7 @@ pireps:
|
||||
airline_id: 1
|
||||
flight_id: flightid_2
|
||||
flight_number: 101
|
||||
aircraft_id: 1
|
||||
aircraft_id: 3
|
||||
dpt_airport_id: KJFK
|
||||
arr_airport_id: KAUS
|
||||
flight_time: 180 # 6 hours
|
||||
|
||||
Reference in New Issue
Block a user