mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
38 lines
744 B
PHP
38 lines
744 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AccountStatement extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'statement_account_id',
|
|
'date_from',
|
|
'date_to',
|
|
'total_amount',
|
|
'begin_balance',
|
|
'end_balance',
|
|
'total_rows',
|
|
'mapped_rows',
|
|
];
|
|
|
|
protected $casts = [
|
|
'date_from' => 'date',
|
|
'date_to' => 'date',
|
|
];
|
|
|
|
public function account()
|
|
{
|
|
return $this->belongsTo(StatementAccount::class, 'statement_account_id', 'id');
|
|
}
|
|
|
|
public function transactions()
|
|
{
|
|
return $this->hasMany(StatementTransaction::class);
|
|
}
|
|
}
|