57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\User\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\User\Entities\BankDetail;
|
|
|
|
class Bank extends Model
|
|
{
|
|
/** @use HasFactory<\Modules\User\Database\Factories\BankFactory> */
|
|
use HasUuids;
|
|
|
|
protected $table = 'banks';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'code',
|
|
'swift_code',
|
|
'is_active',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for serialization.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
protected $hidden = [
|
|
];
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'name' => 'string',
|
|
'code' => 'string',
|
|
'swift_code' => 'string',
|
|
'is_active' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function bankDetails()
|
|
{
|
|
return $this->hasMany(BankDetail::class);
|
|
}
|
|
}
|