<?php

namespace App\Models;

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

class InvestorDetails extends Model
{
    use HasFactory;
    protected $table = 'investor_details';
    public $timestamps = true;

    protected $fillable = [
        'user_id',
        'foto',
        'category',
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function personalDetails()
    {
        return $this->hasOne(InvestorPersonalDetails::class);
    }

    public function perusahaanDetails()
    {
        return $this->hasOne(InvestorPerusahaanDetails::class);
    }
}
