add a has_bid column to the flights table
This commit is contained in:
@@ -20,50 +20,49 @@ 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',
|
'route_leg',
|
||||||
'route_leg',
|
'dpt_airport_id',
|
||||||
'dpt_airport_id',
|
'arr_airport_id',
|
||||||
'arr_airport_id',
|
'alt_airport_id',
|
||||||
'alt_airport_id',
|
'route',
|
||||||
'route',
|
'dpt_time',
|
||||||
'dpt_time',
|
'arr_time',
|
||||||
'arr_time',
|
'notes',
|
||||||
'notes',
|
'has_bid',
|
||||||
'active',
|
'active',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be casted to native types.
|
* The attributes that should be casted to native types.
|
||||||
*
|
*
|
||||||
* @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',
|
'route' => 'string',
|
||||||
'route' => 'string',
|
'dpt_time' => 'string',
|
||||||
'dpt_time' => 'string',
|
'arr_time' => 'string',
|
||||||
'arr_time' => 'string',
|
'notes' => 'string',
|
||||||
'notes' => 'string',
|
'has_bid' => 'boolean',
|
||||||
'active' => 'boolean',
|
'active' => 'boolean',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validation rules
|
* Validation rules
|
||||||
*
|
*
|
||||||
* @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',
|
];
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Relationship
|
* Relationship
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user