39 lines
649 B
PHP
39 lines
649 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
/**
|
||
|
* Class Expense
|
||
|
* @package App\Models
|
||
|
*/
|
||
|
class Expense extends BaseModel
|
||
|
{
|
||
|
public $table = 'expenses';
|
||
|
|
||
|
public $fillable = [
|
||
|
'airline_id',
|
||
|
'name',
|
||
|
'amount',
|
||
|
'type',
|
||
|
'multiplier',
|
||
|
'active',
|
||
|
];
|
||
|
|
||
|
public static $rules = [
|
||
|
'active' => 'boolean',
|
||
|
'airline_id' => 'integer',
|
||
|
'amount' => 'float',
|
||
|
'multiplier' => 'integer',
|
||
|
'type' => 'integer',
|
||
|
];
|
||
|
|
||
|
/**
|
||
|
* Foreign Keys
|
||
|
*/
|
||
|
|
||
|
public function airline()
|
||
|
{
|
||
|
return $this->belongsTo(Airline::class, 'airline_id');
|
||
|
}
|
||
|
}
|