<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Wallet extends Model
{
    use HasFactory;

    protected $guarded = ['id'];

    public function payments()
    {
        return $this->hasMany(Payment::class, 'wallet_id', 'id');
    }

    public function santri()
    {
        return $this->belongsTo(Santri::class, 'santri_id', 'id');
    }

    public function walletTransactions()
    {
        return $this->hasMany(WalletTransaction::class, 'wallet_id', 'id');
    }
}
