phpvms/app/Models/PirepFare.php
Nabeel S cbb7d6e274
Fix pilot leave calculation #1022 (#1035)
* Fix pilot leave calculation #1022

* Remove unused imports

* Add logging where fares are being saved
2021-02-17 18:54:18 -05:00

47 lines
779 B
PHP

<?php
namespace App\Models;
use App\Contracts\Model;
/**
* @property int id
* @property string pirep_id
* @property int fare_id
* @property int count
* @property Pirep pirep
* @property Fare fare
*/
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');
}
}