Add AcarsType column and enum; save flight updates as FLIGHT_PATH #102

This commit is contained in:
Nabeel Shahzad
2018-01-01 10:30:31 -06:00
parent c65da0a0af
commit 078e26df57
5 changed files with 23 additions and 11 deletions

View File

@@ -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',

View 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;
}

View File

@@ -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