mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
7ca23edb9b
2. BankStatementController (for importing data from csv files from bank to insert into the database)
36 lines
699 B
PHP
36 lines
699 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',
|
|
];
|
|
|
|
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);
|
|
}
|
|
}
|