Add AcarsType column and enum; save flight updates as FLIGHT_PATH #102
This commit is contained in:
@@ -13,6 +13,7 @@ class Acars extends BaseModel
|
||||
|
||||
public $fillable = [
|
||||
'pirep_id',
|
||||
'type',
|
||||
'log',
|
||||
'lat',
|
||||
'lon',
|
||||
@@ -27,6 +28,7 @@ class Acars extends BaseModel
|
||||
];
|
||||
|
||||
public $casts = [
|
||||
'type' => 'integer',
|
||||
'lat' => 'float',
|
||||
'lon' => 'float',
|
||||
'heading' => 'integer',
|
||||
|
||||
13
app/Models/Enums/AcarsType.php
Normal file
13
app/Models/Enums/AcarsType.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Enums;
|
||||
|
||||
/**
|
||||
* Class AcarsType
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class AcarsType extends EnumBase
|
||||
{
|
||||
const FLIGHT_PATH = 0;
|
||||
const ROUTE = 1;
|
||||
}
|
||||
@@ -1,14 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: nshahzad
|
||||
* Date: 12/19/17
|
||||
* Time: 8:04 PM
|
||||
*/
|
||||
|
||||
namespace App\Models\Enums;
|
||||
|
||||
|
||||
/**
|
||||
* Class EnumBase
|
||||
* @package App\Models\Enums
|
||||
@@ -16,7 +9,6 @@ namespace App\Models\Enums;
|
||||
class EnumBase
|
||||
{
|
||||
protected static $labels = [];
|
||||
protected static $adverbs = [];
|
||||
|
||||
/**
|
||||
* Return the label, try to return the translated version as well
|
||||
|
||||
Reference in New Issue
Block a user