Add edit for flight type; block_on_time and block_off_time for PIREP API

This commit is contained in:
Nabeel Shahzad
2018-03-29 14:10:49 -05:00
parent be6fead812
commit 2ab4db3a2e
11 changed files with 65 additions and 27 deletions

View File

@@ -23,6 +23,7 @@ class CreatePirepTables extends Migration
$table->string('flight_number', 10)->nullable();
$table->string('route_code', 5)->nullable();
$table->string('route_leg', 5)->nullable();
$table->char('flight_type', 1)->default(FlightType::SCHED_PAX);
$table->string('dpt_airport_id', 5);
$table->string('arr_airport_id', 5);
$table->unsignedInteger('level')->nullable();
@@ -39,9 +40,10 @@ class CreatePirepTables extends Migration
$table->text('notes')->nullable();
$table->unsignedTinyInteger('source')->nullable()->default(0);
$table->string('source_name', 25)->nullable();
$table->char('flight_type', 1)->default(FlightType::SCHED_PAX);
$table->tinyInteger('state')->default(PirepState::PENDING);
$table->tinyInteger('status')->default(PirepStatus::SCHEDULED);
$table->dateTime('block_off_time')->nullable();
$table->dateTime('block_on_time')->nullable();
$table->timestamps();
$table->primary('id');

View File

@@ -68,6 +68,8 @@ class Pirep extends Model
'flight_type',
'state',
'status',
'block_off_time',
'block_on_time',
'created_at',
'updated_at',
];
@@ -87,9 +89,10 @@ class Pirep extends Model
'fuel_used' => 'float',
'landing_rate' => 'float',
'source' => 'integer',
'flight_type' => 'integer',
'state' => 'integer',
'status' => 'integer',
'block_off_time' => 'datetime',
'block_on_time' => 'datetime',
];
public static $rules = [