Add missing columns from subfleet export #926 (#941)

This commit is contained in:
Nabeel S 2020-11-26 13:34:04 -05:00 committed by GitHub
parent a7981c0a87
commit 2ecf366670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 8 deletions

View File

@ -31,7 +31,6 @@ class Subfleet extends Model
'airline_id', 'airline_id',
'type', 'type',
'name', 'name',
'turn_time',
'fuel_type', 'fuel_type',
'cost_block_hour', 'cost_block_hour',
'cost_delay_minute', 'cost_delay_minute',

View File

@ -19,10 +19,17 @@ class SubfleetImporter extends ImportExport
* Should match the database fields, for the most part * Should match the database fields, for the most part
*/ */
public static $columns = [ public static $columns = [
'airline' => 'required', 'airline' => 'required',
'type' => 'required', 'type' => 'required',
'name' => 'required', 'name' => 'required',
'fares' => 'nullable', 'fuel_type' => 'nullable',
'cost_block_hour' => 'nullable',
'cost_delay_minute' => 'nullable',
'ground_handling_multiplier' => 'nullable',
'cargo_capacity' => 'nullable',
'fuel_capacity' => 'nullable',
'gross_weight' => 'nullable',
'fares' => 'nullable',
]; ];
private $fareSvc; private $fareSvc;

View File

@ -1,3 +1,3 @@
airline,type,name,fares airline,type,name,fuel_type,cost_block_hour,cost_delay_minute,ground_handling_multiplier,cargo_capacity,fuel_capacity,gross_weight,fares
VMS,A32X,Airbus A320,Y;B?capacity=100&price=500% VMS,A32X,"Airbus A320",,1000,0,200,,,,Y;B?capacity=100&price=500%
VMS, ,Boeing 747-400,Y;B?capacity=100&price=500% VMS, ,"Boeing 747-400",,1000,0,200,,,,Y;B?capacity=100&price=500%

1 airline type name fuel_type cost_block_hour cost_delay_minute ground_handling_multiplier cargo_capacity fuel_capacity gross_weight fares
2 VMS A32X Airbus A320 1000 0 200 Y;B?capacity=100&price=500%
3 VMS Boeing 747-400 1000 0 200 Y;B?capacity=100&price=500%