<?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');
}
}