KUJUNTI.ID MINISH3LL
Path : /var/www/html/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/moneyexchange/app/Models/MoneyExchangeList.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 MoneyExchangeList extends Model
{
    use HasFactory, Notifiable, SoftDeletes;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'exchange_from_currency_id',
        'exchange_to_currency_id',
        'calculation',
        'current_rate',
        'user_id',
        'is_active',
        'last_updated_rate',
        'order'
    ];
    public function user()
    {
        return $this->belongsTo(User::class);
    }
    public function exchangeFromCurrency()
    {
        return $this->belongsTo(Currency::class,'exchange_from_currency_id', 'id');
    }
    public function exchangeToCurrency()
    {
        return $this->belongsTo(Currency::class,'exchange_to_currency_id', 'id');
    }
    public function moneyExchangeRates()
    {
        return $this->hasMany(MoneyExchangeRate::class,'money_exchange_list_id','id');
    }
    public function transactions()
    {
        return $this->hasMany(Transaction::class);
    }
    public function lastUpdatedRateDate()
    {
        return $this->last_updated_rate;
    }
}

© KUJUNTI.ID