• File: HistoryPayment.php
  • Full Path: /var/www/imaliapitest/app/Bank/HistoryPayment.php
  • Date Modified: 05/19/2025 4:29 PM
  • File size: 915 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace App\Bank;

use App\Imali\Transfer;
use App\User;
use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;

class HistoryPayment extends Model
{
    protected $fillable = [
        'sender_account',
        'sender_name',
        'amount_credited',
        'status_user',
        'status',
        'comissao',
        'amount',
        'sender_id',
        'user_id',
        'actual_points',
        'last_points',
        'win_points',
        'transaction_id',
        'user_id',
        'category_id'
    ];

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

    function transaction()
    {
        return $this->belongsTo(Payment::class);
    }
    function transferencia()
    {
        return $this->belongsTo(Transfer::class);
    }

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