<?php

namespace Bixo\Employee\Policies;

use Bixo\Employee\Models\Employee;
use Illuminate\Foundation\Auth\User as Authenticatable;

trait EmployeeAction
{

    /**
     * Determine if the given user can copy the given employee.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function copy(Authenticatable $user, Employee $employee)
    {

        if ($authUser->canDo('employee.employee.action.copy')) {
            return true;
        }

        $this->model->is_owner;
    }

    /**
     * Determine if the given user can empty the given employee.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    function empty(Authenticatable $user, Employee $employee) {

        if ($authUser->canDo('employee.employee.action.empty')) {
            return true;
        }

        $this->model->is_owner;
    }

    /**
     * Determine if the given user can transfer the given employee.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function transfer(Authenticatable $user, Employee $employee)
    {

        if ($authUser->canDo('employee.employee.action.transfer')) {
            return true;
        }

        $this->model->is_owner;
    }

}