<?php

namespace App\Models;

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

class Investor extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'father_name',
        'cnic',
        'address',
    ];

    public function investments()
    {
        return $this->hasMany(Investment::class);
    }

    public function cars()
{
    return $this->hasMany(Car::class, 'investor_id');
}

}
