phpvms/app/Models/PirepFare.php

44 lines
666 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Interfaces\Model;
/**
* Class PirepFare
* @package App\Models
*/
class PirepFare extends Model
{
public $table = 'pirep_fares';
public $timestamps = false;
2018-03-21 08:40:19 +08:00
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');
}
}