add a has_bid column to the flights table

This commit is contained in:
Nabeel Shahzad
2017-12-12 13:59:05 -06:00
parent e75e2a0ebc
commit a5cf130176
2 changed files with 32 additions and 32 deletions
+5 -6
View File
@@ -20,8 +20,7 @@ class Flight extends Model
protected $dates = ['deleted_at']; protected $dates = ['deleted_at'];
public $fillable public $fillable = [
= [
'airline_id', 'airline_id',
'flight_number', 'flight_number',
'route_code', 'route_code',
@@ -33,6 +32,7 @@ class Flight extends Model
'dpt_time', 'dpt_time',
'arr_time', 'arr_time',
'notes', 'notes',
'has_bid',
'active', 'active',
]; ];
@@ -41,8 +41,7 @@ class Flight extends Model
* *
* @var array * @var array
*/ */
protected $casts protected $casts = [
= [
'flight_number' => 'integer', 'flight_number' => 'integer',
'route_code' => 'string', 'route_code' => 'string',
'route_leg' => 'string', 'route_leg' => 'string',
@@ -50,6 +49,7 @@ class Flight extends Model
'dpt_time' => 'string', 'dpt_time' => 'string',
'arr_time' => 'string', 'arr_time' => 'string',
'notes' => 'string', 'notes' => 'string',
'has_bid' => 'boolean',
'active' => 'boolean', 'active' => 'boolean',
]; ];
@@ -58,8 +58,7 @@ class Flight extends Model
* *
* @var array * @var array
*/ */
public static $rules public static $rules = [
= [
'flight_number' => 'required', 'flight_number' => 'required',
'dpt_airport_id' => 'required', 'dpt_airport_id' => 'required',
'arr_airport_id' => 'required', 'arr_airport_id' => 'required',
@@ -27,6 +27,7 @@ class CreateFlightTables extends Migration
$table->string('arr_time', 10)->nullable(); $table->string('arr_time', 10)->nullable();
$table->unsignedDecimal('flight_time', 19)->nullable(); $table->unsignedDecimal('flight_time', 19)->nullable();
$table->text('notes')->nullable(); $table->text('notes')->nullable();
$table->boolean('has_bid')->default(false);
$table->boolean('active')->default(true); $table->boolean('active')->default(true);
$table->timestamps(); $table->timestamps();