<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CommissionWallet extends Model
{
    protected $table = 'commission_wallet';

    protected $fillable = [
        'user_id',
        'balance',
        'status',
    ];

    /**
     * Get the user that owns this wallet
     */
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    /**
     * Get the transactions for this wallet
     */
    public function transactions()
    {
        return $this->hasMany(CommissionTransactions::class, 'wallet_id');
    }

    public function fees()
    {
        return $this->hasMany(CommissionFee::class, 'wallet_id');
    }
}
