phpvms/app/Models/PirepFare.php
2018-08-26 16:40:04 +00:00

42 lines
642 B
PHP

<?php
namespace App\Models;
use App\Interfaces\Model;
/**
* Class PirepFare
*/
class PirepFare extends Model
{
public $table = 'pirep_fares';
public $timestamps = false;
protected $fillable = [
'pirep_id',
'fare_id',
'count',
];
protected $casts = [
'count' => 'integer',
];
public static $rules = [
'count' => 'required',
];
/**
* Relationships
*/
public function fare()
{
return $this->belongsTo(Fare::class, 'fare_id');
}
public function pirep()
{
return $this->belongsTo(Pirep::class, 'pirep_id');
}
}