<?php

namespace App\Models;

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

class Santri extends Model
{
    use HasFactory;

    protected $guarded = ['id'];
    protected $table = 'santris';

    public function user()
    {
        return $this->hasOne(User::class, 'santri_id', 'id');
    }

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

    public function wallet()
    {
        return $this->hasOne(Wallet::class, 'santri_id', 'id');
    }
}
