<?php

namespace App\Models;

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

class ResourceContract extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $fillable = [
        'resource_id',
        'contract_type_id',
        'contract_date',
        'contract_number',
        'position',
        'role',
        'start_date',
        'end_date',
        'notes',
        'enabled',
    ];

    public function resource()
    {
        return $this->belongsTo(\App\Models\Resource::class);
    }

    public function contract_type()
    {
        return $this->belongsTo(\App\Models\ContractType::class);
    }
}
