phpvms/app/Models/PirepFare.php

42 lines
640 B
PHP
Raw Normal View History

<?php
namespace App\Models;
/**
* Class PirepFare
* @package App\Models
*/
class PirepFare extends BaseModel
{
public $table = 'pirep_fares';
public $timestamps = false;
public $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');
}
}