<?php

namespace App\Models;

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

class Bank extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'enabled',
    ];

    public function canDelete()
    {
        return \App\Models\PaymentMethod::where('bank_id', $this->id)->count() == 0;
    }

}
