#23 set the rank payrate to an aircraft; add some sample data

This commit is contained in:
Nabeel Shahzad 2017-06-21 22:30:32 -05:00
parent 5b920151b8
commit 0b31f492c2
3 changed files with 47 additions and 15 deletions

View File

@ -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

View File

@ -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');
}
}

View File

@ -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