phpvms/app/Models/Acars.php

49 lines
883 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Models\Traits\HashId;
class Acars extends BaseModel
{
use HashId;
public $incrementing = false;
public $table = 'acars';
public $fillable = [
'pirep_id',
2017-12-26 08:22:46 +08:00
'log',
'lat',
'lon',
2017-12-26 08:22:46 +08:00
'heading',
'altitude',
'vs',
'gs',
'transponder',
'autopilot',
'fuel_flow',
'sim_time',
];
2017-12-26 08:10:24 +08:00
public $casts = [
2017-12-26 08:22:46 +08:00
'lat' => 'float',
'lon' => 'float',
'heading' => 'integer',
'altitude' => 'integer',
'vs' => 'float',
'gs' => 'float',
'transponder' => 'integer',
'fuel_flow' => 'float',
2017-12-26 08:10:24 +08:00
];
/**
* FKs
*/
public function pirep()
{
return $this->belongsTo('App\Models\Pirep', 'pirep_id');
}
}