<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Employee extends Model
{
    protected $table = "employees";
    protected $fillable = [
        'company_id','client_id','name','job','civil_registry','address','phone_number','salary','work_status','work_start_date','balance','balance_start'
    ];
    public function company(){
        return $this->belongsTo('\App\Models\Company','company_id','id');
    }
    public function client(){
        return $this->belongsTo('\App\Models\Client','client_id','id');
    }
    public function employees_cashs(){
        return $this->hasMany('\App\Models\EmployeeCash','employee_id','id');
    }
}
