Add importers in console and admin for flights/aircraft/subfleets and airport #194
This commit is contained in:
@@ -5,8 +5,8 @@ use Faker\Generator as Faker;
|
||||
$factory->define(App\Models\Fare::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => null,
|
||||
'code' => $faker->text(5),
|
||||
'name' => $faker->text(20),
|
||||
'code' => $faker->unique()->text(50),
|
||||
'name' => $faker->text(50),
|
||||
'price' => $faker->randomFloat(2, 100, 1000),
|
||||
'cost' => function (array $fare) {
|
||||
return round($fare['price'] / 2);
|
||||
|
||||
@@ -14,7 +14,7 @@ class CreateFaresTable extends Migration
|
||||
{
|
||||
Schema::create('fares', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code', 50);
|
||||
$table->string('code', 50)->unique();
|
||||
$table->string('name', 50);
|
||||
$table->unsignedDecimal('price')->nullable()->default(0.00);
|
||||
$table->unsignedDecimal('cost')->nullable()->default(0.00);
|
||||
|
||||
@@ -13,8 +13,8 @@ class CreateSubfleetTables extends Migration
|
||||
Schema::create('subfleets', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('airline_id')->nullable();
|
||||
$table->string('type', 50)->unique();
|
||||
$table->string('name', 50);
|
||||
$table->string('type', 50);
|
||||
$table->unsignedTinyInteger('fuel_type')->nullable();
|
||||
$table->unsignedDecimal('ground_handling_multiplier')->nullable()->default(100);
|
||||
$table->unsignedDecimal('cargo_capacity')->nullable();
|
||||
|
||||
Reference in New Issue
Block a user