<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Donation extends Model
{
    protected $fillable = [
        'donor_id',
        'cause_id',
        'fund_collection_id',
        'project_id',
        'amount',
        'currency',
        'transaction_id',
        'payment_gateway',
        'status',
        'is_anonymous',
        'source',
    ];

    public function donor(): BelongsTo
    {
        return $this->belongsTo(Donor::class);
    }

    public function cause(): BelongsTo
    {
        return $this->belongsTo(Cause::class);
    }

    public function fundCollection(): BelongsTo
    {
        return $this->belongsTo(FundCollection::class);
    }

    public function project(): BelongsTo
    {
        return $this->belongsTo(Project::class);
    }
}
