• File: Transfer.php
  • Full Path: /var/www/imaliapitest/app/Imali/Transfer.php
  • Date Modified: 05/19/2025 4:29 PM
  • File size: 1.16 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace App\Imali;

use App\Bank\HistoryPayment;
use App\Bank\Profit;
use App\User;
use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;

class Transfer extends Model
{
    protected $fillable = [
        'transaction_id',
        'amount',
        'description',
        'comissao',
	'commission',
        'amount_debited',
        'sender_id',
        'reciever_id',
        'estado',
	'status',
        'imali_transac_type',
        'estado_color',
        'reciever_name',
        'reciever_account',
	'old_balance',
        'new_balance',

	'imali_fee',
        'stamp_tax',
        'total_amount',
        'sender_name',
        'sender_account',
        'sender_account_type',
        'partner_error_message',
        'operators_id',
        'wallets_id',
        'imali_cost'
    ];

    function user()
    {
        return $this->belongsTo(User::class);
    }
    function profit()
    {
        return $this->belongsTo(Profit::class);
    }

    function paymentHistoric()
    {
        return $this->hasMany(HistoryPayment::class);
    }

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('d-m-Y H:i:s');
    }
}