<?php

namespace App\Models;

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

class SectorOperario extends Model
{
    use HasFactory;

    protected $table = 'sector_operarios';
    protected $fillable = ['user_id', 'sector_id'];

    public function operario()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function sector()
    {
        return $this->belongsTo(Sector::class, 'sector_id');
    }
}
