<?php

namespace App\Models;

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

class UserPsychotechnicsTest extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id',
        'company_id',
        'type_psychotechnics_test_id',
        'observations',
        'document_upload',
    ];

    public function typePsychotechnicsTest()
    {
        return $this->belongsTo('App\Models\TypePsychotechnicsTest');
    }

    public function getTypePsychotechnicsTestNameAttribute()
    {
        return $this->typePsychotechnicsTest->name;
    }
}
