$transactions * @property-read int|null $transactions_count * @property-read \App\Models\User $user * @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns) * @method static \Database\Factories\BankIntegrationFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration filter(\App\Filters\QueryFilters $filters) * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration newQuery() * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration query() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope() * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withTrashed() * @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withoutTrashed() * @property-read \Illuminate\Database\Eloquent\Collection $transactions * @mixin \Eloquent */ class BankIntegration extends BaseModel { use SoftDeletes; use Filterable; protected $fillable = [ 'bank_account_name', 'provider_name', 'bank_account_number', 'bank_account_status', 'bank_account_type', 'balance', 'currency', 'from_date', 'auto_sync', ]; const INTEGRATION_TYPE_YODLEE = 'YODLEE'; const INTEGRATION_TYPE_NORDIGEN = 'NORDIGEN'; 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() { return $this->belongsTo(Account::class); } public function transactions() { return $this->hasMany(BankTransaction::class)->withTrashed(); } }