<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ApplicationParty extends Model
{
    protected $fillable = [
        'application_id',
        'party_type',
        'customer_id',
        'company_id',
        'corporate_employee_id',
        'family_member_id',
    ];

    public function customer()
    {
        return $this->belongsTo(Customer::class);
    }

    public function company()
    {
        return $this->belongsTo(CorporateCompany::class);
    }

    public function corporateEmployee()
    {
        return $this->belongsTo(CorporateEmployee::class);
    }

    public function familyMember()
    {
        return $this->belongsTo(FamilyMember::class);
    }
}
