1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/BankIntegration.php

64 lines
1.3 KiB
PHP
Raw Normal View History

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;
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;
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',
'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
}