<?php

namespace App\Models;

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

class PaymentLog extends Model
{
    protected $table = 'payment_logs'; 

    protected $fillable = [
        'payment_id',
        'sponsor_name',
        'student_name',
        'method',
        'amount',
        'payment_date',
    ]; 
    public function payment()
    {
        return $this->belongsTo(Payment::class, 'payment_id');
    }
     public function sponsor()
    {
        return $this->belongsTo(Sponsor::class);
    }

   public function student() 
    {
        return $this->belongsTo(Studentdetails::class, 'student_id');
    }
}
