<?php

namespace App\Models;

use App\Classes\General\Interfaces\DataTransferObject;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\MorphTo;


use Illuminate\Database\Eloquent\Relations\HasOne;

class BankAccount extends AbstractModel implements DataTransferObject
{
    use SoftDeletes;

    protected $table = 'bank_accounts';

    public function country(): HasOne
    {
        return $this->hasOne(Country::class, 'country_id', 'id');
    }

    public function owner(): morphTo
    {
        return $this->morphTo();
    }
}
