<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class IshareWallet extends Model
{
    protected $fillable = [
        'user_id',
        'balance',
        'status'
    ];

    protected $table = 'ishare_balance';

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

    /**
     * Get the topups for this wallet
     */
    public function topups()
    {
        return $this->hasMany(IshareTopup::class, 'ishare_id');
    }
}