<?php

namespace App\Models;

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

class Dinas extends Model
{
    use HasFactory;

    protected $table = 'md_dinas';

    protected $fillable = [
        'nama',
    ];

    public function users()
    {
        return $this->hasMany(User::class, 'dinas_id');
    }

    public function pembimbingMagangs()
    {
        return $this->hasMany(PembimbingMagang::class, 'dinas_id');
    }

    public function projects()
    {
        return $this->hasMany(Project::class, 'dinas_id');
    }
}
