add zfw field to aircraft
This commit is contained in:
@@ -19,6 +19,7 @@ class CreateAircraftsTable extends Migration
|
|||||||
$table->string('name', 50);
|
$table->string('name', 50);
|
||||||
$table->string('registration', 10)->nullable();
|
$table->string('registration', 10)->nullable();
|
||||||
$table->string('tail_number', 10)->nullable();
|
$table->string('tail_number', 10)->nullable();
|
||||||
|
$table->unsignedDecimal('zfw', 12)->nullable()->default(0);
|
||||||
$table->unsignedBigInteger('flight_time')->nullable()->default(0);
|
$table->unsignedBigInteger('flight_time')->nullable()->default(0);
|
||||||
$table->boolean('active')->default(true);
|
$table->boolean('active')->default(true);
|
||||||
$table->unsignedTinyInteger('state')->default(AircraftState::PARKED);
|
$table->unsignedTinyInteger('state')->default(AircraftState::PARKED);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class Aircraft extends BaseModel
|
|||||||
'icao',
|
'icao',
|
||||||
'registration',
|
'registration',
|
||||||
'tail_number',
|
'tail_number',
|
||||||
|
'zfw',
|
||||||
'active',
|
'active',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -22,7 +23,8 @@ class Aircraft extends BaseModel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'active' => 'boolean',
|
'zfw' => 'float',
|
||||||
|
'active' => 'boolean',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,22 +12,27 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-3">
|
||||||
{!! Form::label('icao', 'ICAO:') !!}
|
{!! Form::label('icao', 'ICAO:') !!}
|
||||||
{!! Form::text('icao', null, ['class' => 'form-control']) !!}
|
{!! Form::text('icao', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Registration Field -->
|
<!-- Registration Field -->
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-3">
|
||||||
{!! Form::label('registration', 'Registration:') !!}
|
{!! Form::label('registration', 'Registration:') !!}
|
||||||
{!! Form::text('registration', null, ['class' => 'form-control']) !!}
|
{!! Form::text('registration', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tail Number Field -->
|
<!-- Tail Number Field -->
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-3">
|
||||||
{!! Form::label('tail_number', 'Tail Number:') !!}
|
{!! Form::label('tail_number', 'Tail Number:') !!}
|
||||||
{!! Form::text('tail_number', null, ['class' => 'form-control']) !!}
|
{!! Form::text('tail_number', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
{!! Form::label('zfw', 'Zero Fuel Weight:') !!}
|
||||||
|
{!! Form::text('zfw', null, ['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Active Field -->
|
<!-- Active Field -->
|
||||||
|
|||||||
Reference in New Issue
Block a user