<?php

namespace App\Models;

use App\Traits\Auditable;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Model;

class UserProfileHasEspeciality extends Model
{
    use Auditable;
    protected $table = 'user_profile_has_especiality';

    protected $primaryKey = null;
    public $incrementing = false;
    public $timestamps = false;

    protected $fillable = [
        'user_profile_id',
        'especiality_id',
    ];

    /**
     * Get the user profile associated with this relation.
     */
    public function userProfile(): BelongsTo
    {
        return $this->belongsTo(UserProfile::class, 'user_profile_id', 'id');
    }

    /**
     * Get the especiality associated with this relation.
     */
    public function especiality(): BelongsTo
    {
        return $this->belongsTo(Especiality::class, 'especiality_id', 'id');
    }
}
