<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Wallet extends BaseModel
{
    protected function casts(): array
    {
        return [
            'balance_usd' => 'decimal:2', 'balance_eur' => 'decimal:2',
            'balance_gbp' => 'decimal:2', 'balance_ngn' => 'decimal:2',
        ];
    }

    public function user(): BelongsTo { return $this->belongsTo(User::class); }
    public function transactions(): HasMany { return $this->hasMany(Transaction::class); }
}