<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Transaction extends Model
{
    protected $fillable = [
        'user_id', 'type', 'amount',
        'reference', 'status', 'details', 'api_response'
    ];

    protected $casts = [
        'details' => 'array',
        'api_response' => 'array',
    ];

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