akaunting/app/Models/Banking/Reconciliation.php

42 lines
908 B
PHP
Raw Normal View History

2018-10-27 17:57:40 +03:00
<?php
namespace App\Models\Banking;
2019-11-16 10:21:14 +03:00
use App\Abstracts\Model;
2018-10-27 17:57:40 +03:00
class Reconciliation extends Model
{
protected $table = 'reconciliations';
protected $dates = ['deleted_at', 'started_at', 'ended_at'];
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
2021-06-17 10:59:07 +03:00
protected $fillable = ['company_id', 'account_id', 'started_at', 'ended_at', 'closing_balance', 'reconciled', 'created_by'];
2018-10-27 17:57:40 +03:00
2020-11-13 15:15:27 +03:00
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'closing_balance' => 'double',
'reconciled' => 'boolean',
];
2018-10-27 17:57:40 +03:00
/**
* Sortable columns.
*
* @var array
*/
public $sortable = ['created_at', 'account_id', 'started_at', 'ended_at', 'closing_balance', 'reconciled'];
public function account()
{
return $this->belongsTo('App\Models\Banking\Account');
}
}