<?php

namespace App\Models;

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

class Employee extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $guarded = [];

    public function monyExports()
    {
        return $this->hasMany(MonyExport::class);
    }

    public function attendances()
    {
        return $this->belongsToMany(Attendance::class);
    }

    public function attendances_gamaeya()
    {
        return $this->belongsToMany(Attendance::class, 'attendance_employee_gamaeya');
    }

    public function attendances_half_day()
    {
        return $this->belongsToMany(Employee::class, 'attendance_employee_half_day');
    }

}
