<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Department extends Model
{
    use HasFactory;

    //Define Deparment Child relationships
    public function organisation() : BelongsTo {
        return $this->belongsTo(Organisation::class);
    }

    public function user() : BelongsTo {
        return $this->belongsTo(User::class,'manager_id');
    }
}
