<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Staff extends Model
{
    protected $guarded = [];
    protected $table = 'staff';

    public function company() { return $this->belongsTo(Company::class); }
    public function department() { return $this->belongsTo(Department::class); }
    public function unit() { return $this->belongsTo(Unit::class); }
    public function education() { return $this->hasMany(Education::class); }
    public function banking() { return $this->hasMany(Banking::class); }
    public function spouses() { return $this->hasMany(Spouse::class); }
    public function children() { return $this->hasMany(Child::class); }
    public function files() { return $this->hasMany(StaffFile::class); }
    public function employmentHistory() { return $this->hasMany(EmploymentHistory::class); }
    public function training() { return $this->hasMany(StaffTraining::class); }
    public function medicalHistory() { return $this->hasMany(MedicalHistory::class); }
    public function medicalDeclarations() { return $this->hasMany(MedicalDeclaration::class); }
    public function addresses() { return $this->hasMany(StaffAddress::class); }
    public function phones() { return $this->hasMany(StaffPhone::class); }
    public function leaveAllocations() { return $this->hasMany(StaffLeaveAllocation::class); }
    public function separations() { return $this->hasMany(StaffSeparation::class); }
    public function workSchedules() { return $this->hasMany(StaffWorkSchedule::class); }
}
