<?php

namespace Bixo\Account\Policies;

use Bixo\Account\Models\Bank;
use Illuminate\Foundation\Auth\User as Authenticatable;

trait BankAction
{

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

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

        $this->model->is_owner;
    }

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

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

        $this->model->is_owner;
    }

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

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

        $this->model->is_owner;
    }

}