KUJUNTI.ID MINISH3LL
Path : /var/www/html/mini-moneyexchange/app/Models/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/mini-moneyexchange/app/Models/BankAccount.php


<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
class BankAccount extends Model
{
    use HasFactory, Notifiable, SoftDeletes;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'bank_id',
        'currency_id',
        'bank_username',
        'bank_number',
        'user_id',
        'credit',
        'is_bank',
        'responsible_by_user_id',
        'is_active'
    ];
    public function user()
    {
        return $this->belongsTo(User::class);
    }
    public function bank()
    {
        return $this->belongsTo(Bank::class);
    }
    public function currency()
    {
        return $this->belongsTo(Currency::class);
    }
    public function transactions()
    {
        return $this->hasMany(Transaction::class);
    }
    public function responsibleByUser()
    {
        return $this->belongsTo(User::class,'responsible_by_user_id','id');
    }
    public function bankAccountTransaction()
    {
        return $this->hasMany(BankAccountTransaction::class);
    }
    public function transferFromBankAccount()
    {
        return $this->hasMany(Transfer::class,'from_bank_account_id');
    }
    public function TransferToBankAccounts()
    {
        return $this->hasMany(Transfer::class,'to_bank_account_id');
    }
}

© KUJUNTI.ID