<?php

namespace App\Models;

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

class Investment extends Model
{
    use HasFactory;

    protected $fillable = [
        'investor_id',
        'car_id',      // ✅ added
        'type',
        'amount',
        'date',
        'remarks',
    ];

    public function investor()
    {
        return $this->belongsTo(Investor::class);
    }

    public function car()
    {
        return $this->belongsTo(Car::class);
    }
}
