akaunting/app/Models/Purchase/BillHistory.php

32 lines
609 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
2019-12-31 15:49:09 +03:00
namespace App\Models\Purchase;
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
use App\Abstracts\Model;
2017-09-14 22:21:00 +03:00
use App\Traits\Currencies;
class BillHistory extends Model
{
use Currencies;
protected $table = 'bill_histories';
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
protected $fillable = ['company_id', 'bill_id', 'status_code', 'notify', 'description'];
public function bill()
{
2019-12-31 15:49:09 +03:00
return $this->belongsTo('App\Models\Purchase\Bill');
2017-09-14 22:21:00 +03:00
}
public function status()
{
2019-12-31 15:49:09 +03:00
return $this->belongsTo('App\Models\Purchase\BillStatus', 'status_code', 'code');
2017-09-14 22:21:00 +03:00
}
}