<?php
namespace App\Models;

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

class Department extends Model
{
    use HasFactory, SoftDeletes;
    protected $fillable=['business_id','manager_user_id','name','code','description','status'];
    public function business(){return $this->belongsTo(Business::class);}
    public function manager(){return $this->belongsTo(User::class,'manager_user_id');}
    public function employees(){return $this->hasMany(Employee::class);}
}
