diff --git a/.editorconfig b/.editorconfig index 690d7bed..03f445d5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,6 +3,10 @@ root = true [*.{js,py}] charset = utf-8 +[*.yml] +indent_style = space +indent_size = 2 + # Tab indentation (no size specified) [Makefile] indent_style = tab diff --git a/database/migrations/2017_06_21_165410_create_ranks_table.php b/database/migrations/2017_06_21_165410_create_ranks_table.php index f99c40fc..d44a2fc4 100644 --- a/database/migrations/2017_06_21_165410_create_ranks_table.php +++ b/database/migrations/2017_06_21_165410_create_ranks_table.php @@ -25,12 +25,12 @@ class CreateRanksTable extends Migration $table->unique('name'); }); - Schema::create('flight_rank', function(Blueprint $table) { - $table->increments('id'); - $table->integer('flight_id')->unsigned(); - $table->integer('rank_id')->unsigned(); - $table->double('manual_pay', 19, 2)->default(0.0)->unsigned(); - $table->double('acars_pay', 19, 2)->default(0.0)->unsigned(); + Schema::create('aircraft_rank', function(Blueprint $table) { + $table->increments('id'); + $table->integer('aircraft_id')->unsigned(); + $table->integer('rank_id')->unsigned(); + $table->double('acars_pay', 19, 2)->default(0.0)->unsigned(); + $table->double('manual_pay', 19, 2)->default(0.0)->unsigned(); }); } @@ -42,6 +42,6 @@ class CreateRanksTable extends Migration public function down() { Schema::drop('ranks'); - Schema::drop('flight_rank'); + Schema::drop('aircraft_rank'); } } diff --git a/database/seeds/dev.yml b/database/seeds/dev.yml index 78d22db5..720209e3 100644 --- a/database/seeds/dev.yml +++ b/database/seeds/dev.yml @@ -12,6 +12,7 @@ users: name: Admin User email: admin@phpvms.net password: admin + rank_id: 1 created_at: now updated_at: now @@ -21,6 +22,25 @@ role_user: - user_id: 1 role_id: 2 +# ranks +ranks: + - id: 1 + name: New Pilot + hours: 0 + - id: 2 + name: Junior First Officer + hours: 10 + - id: 3 + name: First Officer + hours: 15 + auto_approve_acars: 1 + auto_approve_manual: 1 + - id: 4 + hours: 20 + auto_approve_acars: 1 + auto_approve_manual: 1 + auto_promote: 0 + airlines: - id: 1 code: VMS @@ -76,6 +96,14 @@ aircraft: registration: NC20 tail_number: 20 +aircraft_rank: + - aircraft_id: 1 + rank_id: 1 + - aircraft_id: 1 + rank_id: 2 + acars_pay: 100 + manual_pay: 50 + # fares: - id: 1 @@ -97,7 +125,7 @@ fares: # add a few mods to aircraft and fares aircraft_fare: - # Fare classes on the 747 + # Fare classes on the 747 - aircraft_id: 1 fare_id: 1 price: 200 @@ -118,12 +146,12 @@ aircraft_fare: capacity: 10 flights: - - airline_id: 1 - flight_number: 100 - dpt_airport_id: 1 - arr_airport_id: 2 - route: KAUS KJFK + - airline_id: 1 + flight_number: 100 + dpt_airport_id: 1 + arr_airport_id: 2 + route: KAUS KJFK flight_aircraft: - - flight_id: 1 - aircraft_id: 1 + - flight_id: 1 + aircraft_id: 1