Change fuel_used to block_fuel

This commit is contained in:
Nabeel Shahzad 2018-01-30 11:05:14 -06:00
parent 6498ba1d16
commit 4f59e466a2
5 changed files with 46 additions and 45 deletions

View File

@ -525,7 +525,7 @@ class Importer
'flight_number' => $row->flightnum ?: '',
'dpt_airport_id' => $row->depicao,
'arr_airport_id' => $row->arricao,
'fuel_used' => $row->fuelused,
'block_fuel' => $row->fuelused,
'route' => $row->route ?: '',
'source_name' => $row->source,
'created_at' => $this->parseDate($row->submitdate),

View File

@ -30,12 +30,11 @@ class CreatePirepTables extends Migration
$table->string('arr_airport_id', 5);
$table->unsignedInteger('distance')->nullable();
$table->unsignedInteger('planned_distance')->nullable();
$table->unsignedInteger('altitude')->nullable();
$table->unsignedInteger('level')->nullable();
$table->unsignedDecimal('flight_time', 19)->nullable();
$table->unsignedDecimal('planned_flight_time', 19)->nullable();
$table->unsignedDecimal('gross_weight', 19)->nullable();
$table->unsignedDecimal('fuel_used', 19)->nullable();
$table->unsignedDecimal('zfw', 19)->nullable();
$table->unsignedDecimal('block_fuel', 19)->nullable();
$table->decimal('landing_rate', 19)->nullable();
$table->text('route')->nullable();
$table->text('notes')->nullable();

View File

@ -21,26 +21,28 @@ class FileRequest extends FormRequest
public function rules()
{
$rules = [
'flight_time' => 'required|integer',
'distance' => 'required|numeric',
'flight_time' => 'required|integer',
'airline_id' => 'nullable|exists:airlines,id',
'aircraft_id' => 'nullable|exists:aircraft,id',
'flight_id' => 'nullable|exists:flights,id',
'flight_number' => 'nullable',
'dpt_airport_id' => 'nullable',
'arr_airport_id' => 'nullable',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'planned_distance' => 'nullable|numeric',
'planned_flight_time' => 'nullable|integer',
'level' => 'nullable|numeric',
'route' => 'nullable',
'notes' => 'nullable',
'source_name' => 'nullable|max:20',
'landing_rate' => 'nullable|numeric',
'flight_type' => 'nullable|integer',
'created_at' => 'nullable|date',
'airline_id' => 'nullable|exists:airlines,id',
'aircraft_id' => 'nullable|exists:aircraft,id',
'flight_id' => 'nullable|exists:flights,id',
'flight_number' => 'nullable',
'dpt_airport_id' => 'nullable',
'arr_airport_id' => 'nullable',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'distance' => 'nullable|numeric',
'planned_distance' => 'nullable|numeric',
'planned_flight_time' => 'nullable|integer',
'level' => 'nullable|numeric',
'zfw' => 'nullable|numeric',
'block_fuel' => 'nullable|numeric',
'route' => 'nullable',
'notes' => 'nullable',
'source_name' => 'nullable|max:25',
'landing_rate' => 'nullable|numeric',
'flight_type' => 'nullable|integer',
'created_at' => 'nullable|date',
];
return $rules;

View File

@ -18,25 +18,26 @@ class PrefileRequest extends FormRequest
public function rules()
{
$rules = [
'airline_id' => 'required|exists:airlines,id',
'aircraft_id' => 'required|exists:aircraft,id',
'flight_number' => 'required',
'level' => 'required|numeric',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
'planned_distance' => 'required|numeric',
'source_name' => 'required',
'airline_id' => 'required|exists:airlines,id',
'aircraft_id' => 'required|exists:aircraft,id',
'flight_number' => 'required',
'level' => 'required|numeric',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
'planned_distance' => 'required|numeric',
'source_name' => 'required|max:25',
'flight_id' => 'nullable',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'distance' => 'nullable|numeric',
'flight_time' => 'nullable|integer',
'planned_flight_time' => 'nullable|integer',
'route' => 'nullable',
'notes' => 'nullable',
'flight_type' => 'nullable|integer',
'created_at' => 'nullable|date',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'distance' => 'nullable|numeric',
'flight_time' => 'nullable|integer',
'planned_flight_time' => 'nullable|integer',
'zfw' => 'nullable|numeric',
'block_fuel' => 'nullable|numeric',
'route' => 'nullable',
'notes' => 'nullable',
'flight_type' => 'nullable|integer',
'created_at' => 'nullable|date',
];
return $rules;

View File

@ -31,22 +31,21 @@ class Pirep extends BaseModel
'route_leg',
'airline_id',
'aircraft_id',
'altitude',
'distance',
'planned_distance',
'flight_time',
'planned_flight_time',
'dpt_airport_id',
'arr_airport_id',
'fuel_used',
'block_fuel',
'landing_rate',
'source',
'level',
'route',
'notes',
'flight_type',
'state',
'status',
'source',
'source_name',
'raw_data',
'created_at',
@ -61,7 +60,7 @@ class Pirep extends BaseModel
'planned_flight_time' => 'integer',
'level' => 'integer',
'altitude' => 'integer',
'fuel_used' => 'float',
'block_fuel' => 'float',
'gross_weight' => 'float',
'landing_rate' => 'float',
'flight_type' => 'integer',