<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\WorkAreas;

class WorkAreaLists extends Model
{
    use HasFactory;
    protected $table = 'work_area_lists';
    protected $fillable = [
    	'work_area_id', 'worker_id',
    	'worker_type',
    ];

    public function get_area(){
        return $this->hasOne(WorkAreas::class, 'id', 'work_area_id')->select('id', 'name');
    }
}
