<?php

namespace Bixo\Shop\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait SparePartExim
{

    /**
     * Determine if the given user can approve the given spare_part.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function import(Authenticatable $user)
    {
        if ($user->canDo('shop.spare_part.import')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given spare_part.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function export(Authenticatable $user)
    {
        if ($user->canDo('shop.spare_part.export')) {
            return true;
        }

        return false;
    }
}