<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CreditRequest extends Model
{
    protected $fillable = [
        'client_id',
        'request_date',
        'requested_amount',
        'purpose',
        'status',
        'disbursement_date',
        'repayment_term',
        'interest_rate',
        'guarantee_type',
        'seed_id',
        'comments',
        'created_by'
    ];

    public function client()
    {
        return $this->belongsTo(Client::class);
    }

    public function seed()
    {
        return $this->belongsTo(InputsActivitiesCostsSeed::class, 'seed_id');
    }


}
