Change fuel_used to block_fuel
This commit is contained in:
@@ -525,7 +525,7 @@ class Importer
|
|||||||
'flight_number' => $row->flightnum ?: '',
|
'flight_number' => $row->flightnum ?: '',
|
||||||
'dpt_airport_id' => $row->depicao,
|
'dpt_airport_id' => $row->depicao,
|
||||||
'arr_airport_id' => $row->arricao,
|
'arr_airport_id' => $row->arricao,
|
||||||
'fuel_used' => $row->fuelused,
|
'block_fuel' => $row->fuelused,
|
||||||
'route' => $row->route ?: '',
|
'route' => $row->route ?: '',
|
||||||
'source_name' => $row->source,
|
'source_name' => $row->source,
|
||||||
'created_at' => $this->parseDate($row->submitdate),
|
'created_at' => $this->parseDate($row->submitdate),
|
||||||
|
|||||||
@@ -30,12 +30,11 @@ class CreatePirepTables extends Migration
|
|||||||
$table->string('arr_airport_id', 5);
|
$table->string('arr_airport_id', 5);
|
||||||
$table->unsignedInteger('distance')->nullable();
|
$table->unsignedInteger('distance')->nullable();
|
||||||
$table->unsignedInteger('planned_distance')->nullable();
|
$table->unsignedInteger('planned_distance')->nullable();
|
||||||
$table->unsignedInteger('altitude')->nullable();
|
|
||||||
$table->unsignedInteger('level')->nullable();
|
$table->unsignedInteger('level')->nullable();
|
||||||
$table->unsignedDecimal('flight_time', 19)->nullable();
|
$table->unsignedDecimal('flight_time', 19)->nullable();
|
||||||
$table->unsignedDecimal('planned_flight_time', 19)->nullable();
|
$table->unsignedDecimal('planned_flight_time', 19)->nullable();
|
||||||
$table->unsignedDecimal('gross_weight', 19)->nullable();
|
$table->unsignedDecimal('zfw', 19)->nullable();
|
||||||
$table->unsignedDecimal('fuel_used', 19)->nullable();
|
$table->unsignedDecimal('block_fuel', 19)->nullable();
|
||||||
$table->decimal('landing_rate', 19)->nullable();
|
$table->decimal('landing_rate', 19)->nullable();
|
||||||
$table->text('route')->nullable();
|
$table->text('route')->nullable();
|
||||||
$table->text('notes')->nullable();
|
$table->text('notes')->nullable();
|
||||||
|
|||||||
@@ -21,26 +21,28 @@ class FileRequest extends FormRequest
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'flight_time' => 'required|integer',
|
'flight_time' => 'required|integer',
|
||||||
'distance' => 'required|numeric',
|
|
||||||
|
|
||||||
'airline_id' => 'nullable|exists:airlines,id',
|
'airline_id' => 'nullable|exists:airlines,id',
|
||||||
'aircraft_id' => 'nullable|exists:aircraft,id',
|
'aircraft_id' => 'nullable|exists:aircraft,id',
|
||||||
'flight_id' => 'nullable|exists:flights,id',
|
'flight_id' => 'nullable|exists:flights,id',
|
||||||
'flight_number' => 'nullable',
|
'flight_number' => 'nullable',
|
||||||
'dpt_airport_id' => 'nullable',
|
'dpt_airport_id' => 'nullable',
|
||||||
'arr_airport_id' => 'nullable',
|
'arr_airport_id' => 'nullable',
|
||||||
'route_code' => 'nullable',
|
'route_code' => 'nullable',
|
||||||
'route_leg' => 'nullable',
|
'route_leg' => 'nullable',
|
||||||
'planned_distance' => 'nullable|numeric',
|
'distance' => 'nullable|numeric',
|
||||||
'planned_flight_time' => 'nullable|integer',
|
'planned_distance' => 'nullable|numeric',
|
||||||
'level' => 'nullable|numeric',
|
'planned_flight_time' => 'nullable|integer',
|
||||||
'route' => 'nullable',
|
'level' => 'nullable|numeric',
|
||||||
'notes' => 'nullable',
|
'zfw' => 'nullable|numeric',
|
||||||
'source_name' => 'nullable|max:20',
|
'block_fuel' => 'nullable|numeric',
|
||||||
'landing_rate' => 'nullable|numeric',
|
'route' => 'nullable',
|
||||||
'flight_type' => 'nullable|integer',
|
'notes' => 'nullable',
|
||||||
'created_at' => 'nullable|date',
|
'source_name' => 'nullable|max:25',
|
||||||
|
'landing_rate' => 'nullable|numeric',
|
||||||
|
'flight_type' => 'nullable|integer',
|
||||||
|
'created_at' => 'nullable|date',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
|
|||||||
@@ -18,25 +18,26 @@ class PrefileRequest extends FormRequest
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'airline_id' => 'required|exists:airlines,id',
|
'airline_id' => 'required|exists:airlines,id',
|
||||||
'aircraft_id' => 'required|exists:aircraft,id',
|
'aircraft_id' => 'required|exists:aircraft,id',
|
||||||
'flight_number' => 'required',
|
'flight_number' => 'required',
|
||||||
'level' => 'required|numeric',
|
'level' => 'required|numeric',
|
||||||
'dpt_airport_id' => 'required',
|
'dpt_airport_id' => 'required',
|
||||||
'arr_airport_id' => 'required',
|
'arr_airport_id' => 'required',
|
||||||
'planned_distance' => 'required|numeric',
|
'planned_distance' => 'required|numeric',
|
||||||
'source_name' => 'required',
|
'source_name' => 'required|max:25',
|
||||||
|
|
||||||
'flight_id' => 'nullable',
|
'route_code' => 'nullable',
|
||||||
'route_code' => 'nullable',
|
'route_leg' => 'nullable',
|
||||||
'route_leg' => 'nullable',
|
'distance' => 'nullable|numeric',
|
||||||
'distance' => 'nullable|numeric',
|
'flight_time' => 'nullable|integer',
|
||||||
'flight_time' => 'nullable|integer',
|
'planned_flight_time' => 'nullable|integer',
|
||||||
'planned_flight_time' => 'nullable|integer',
|
'zfw' => 'nullable|numeric',
|
||||||
'route' => 'nullable',
|
'block_fuel' => 'nullable|numeric',
|
||||||
'notes' => 'nullable',
|
'route' => 'nullable',
|
||||||
'flight_type' => 'nullable|integer',
|
'notes' => 'nullable',
|
||||||
'created_at' => 'nullable|date',
|
'flight_type' => 'nullable|integer',
|
||||||
|
'created_at' => 'nullable|date',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
|
|||||||
@@ -31,22 +31,21 @@ class Pirep extends BaseModel
|
|||||||
'route_leg',
|
'route_leg',
|
||||||
'airline_id',
|
'airline_id',
|
||||||
'aircraft_id',
|
'aircraft_id',
|
||||||
'altitude',
|
|
||||||
'distance',
|
'distance',
|
||||||
'planned_distance',
|
'planned_distance',
|
||||||
'flight_time',
|
'flight_time',
|
||||||
'planned_flight_time',
|
'planned_flight_time',
|
||||||
'dpt_airport_id',
|
'dpt_airport_id',
|
||||||
'arr_airport_id',
|
'arr_airport_id',
|
||||||
'fuel_used',
|
'block_fuel',
|
||||||
'landing_rate',
|
'landing_rate',
|
||||||
'source',
|
|
||||||
'level',
|
'level',
|
||||||
'route',
|
'route',
|
||||||
'notes',
|
'notes',
|
||||||
'flight_type',
|
'flight_type',
|
||||||
'state',
|
'state',
|
||||||
'status',
|
'status',
|
||||||
|
'source',
|
||||||
'source_name',
|
'source_name',
|
||||||
'raw_data',
|
'raw_data',
|
||||||
'created_at',
|
'created_at',
|
||||||
@@ -61,7 +60,7 @@ class Pirep extends BaseModel
|
|||||||
'planned_flight_time' => 'integer',
|
'planned_flight_time' => 'integer',
|
||||||
'level' => 'integer',
|
'level' => 'integer',
|
||||||
'altitude' => 'integer',
|
'altitude' => 'integer',
|
||||||
'fuel_used' => 'float',
|
'block_fuel' => 'float',
|
||||||
'gross_weight' => 'float',
|
'gross_weight' => 'float',
|
||||||
'landing_rate' => 'float',
|
'landing_rate' => 'float',
|
||||||
'flight_type' => 'integer',
|
'flight_type' => 'integer',
|
||||||
|
|||||||
Reference in New Issue
Block a user