2022-08-05 06:25:06 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2022-11-11 00:13:11 +01:00
|
|
|
use App\Models\Filterable;
|
2023-01-25 00:43:18 +01:00
|
|
|
use App\Models\Traits\Excludable;
|
2022-08-11 06:19:35 +02:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
2022-08-05 06:25:06 +02:00
|
|
|
class BankIntegration extends BaseModel
|
|
|
|
{
|
2022-08-11 06:19:35 +02:00
|
|
|
use SoftDeletes;
|
2022-11-11 00:13:11 +01:00
|
|
|
use Filterable;
|
2023-01-25 00:43:18 +01:00
|
|
|
use Excludable;
|
|
|
|
|
2022-08-05 06:25:06 +02:00
|
|
|
protected $fillable = [
|
2022-09-29 11:43:59 +02:00
|
|
|
'bank_account_name',
|
|
|
|
'provider_name',
|
|
|
|
'bank_account_number',
|
|
|
|
'bank_account_status',
|
|
|
|
'bank_account_type',
|
|
|
|
'balance',
|
|
|
|
'currency',
|
|
|
|
'from_date',
|
2022-11-08 11:48:29 +01:00
|
|
|
'auto_sync',
|
2022-08-05 06:25:06 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
protected $dates = [
|
|
|
|
];
|
|
|
|
|
|
|
|
public function getEntityType()
|
|
|
|
{
|
|
|
|
return self::class;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function company()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Company::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function account()
|
|
|
|
{
|
2022-09-14 10:52:17 +02:00
|
|
|
return $this->belongsTo(Account::class);
|
2022-08-05 06:25:06 +02:00
|
|
|
}
|
|
|
|
|
2022-08-12 03:40:35 +02:00
|
|
|
public function transactions()
|
|
|
|
{
|
|
|
|
return $this->hasMany(BankTransaction::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2022-08-05 06:25:06 +02:00
|
|
|
}
|