Post fares/expenses on PIREP to Airline journal #130

This commit is contained in:
Nabeel Shahzad
2018-03-01 16:20:13 -06:00
parent f1b9ea94dc
commit 2c52a2f7e6
22 changed files with 625 additions and 85 deletions

View File

@@ -8,6 +8,9 @@ $factory->define(App\Models\Fare::class, function (Faker $faker) {
'code' => $faker->text(5),
'name' => $faker->text(20),
'price' => $faker->randomFloat(2, 100, 1000),
'cost' => function (array $fare) {
return round($fare['price'] / 2);
},
'capacity' => $faker->randomFloat(0, 20, 500),
];
});

View File

@@ -17,7 +17,7 @@ class CreateExpensesTable extends Migration
$table->increments('id');
$table->unsignedInteger('airline_id')->nullable();
$table->string('name');
$table->unsignedDecimal('amount');
$table->unsignedInteger('amount');
$table->unsignedTinyInteger('type');
$table->boolean('multiplier')->nullable()->default(0);
$table->boolean('active')->nullable()->default(1);