<?php

namespace App\Models;

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

class CompanyUser extends Model
{
    use HasFactory;
    protected $table = 'company_user';
    
    protected $fillable = [
        'company_id',
        'user_id',
    ];

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

    // Relasi ke UserProfile
    public function user()
    {
        return $this->belongsTo(UserProfile::class);
    }
}
