walletservice/app/Models/UserBankAccount.php

63 lines
1.2 KiB
PHP
Raw Normal View History

2025-11-13 15:48:14 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\User;
use App\Models\Operator;
2026-01-30 14:59:41 +00:00
use App\Models\CustomerAccountType;
2025-11-13 15:48:14 +00:00
class UserBankAccount extends Model
{
protected $table = 'user_bank_accounts';
public $timestamps = false;
protected $fillable = [
'id_user',
'id_operator',
'account_number',
'iban',
'identification_number',
2026-01-30 14:59:41 +00:00
'customer_account_type_id',
'customer_number',
2025-11-13 15:48:14 +00:00
'balance',
'status',
'reason',
'lastname',
'firstname',
'phone_number',
2025-11-13 15:48:14 +00:00
'nationality',
'birth_date',
'birth_country',
'birth_city',
'spouse_name',
'niu',
2025-11-13 15:48:14 +00:00
'marital_status',
'profession',
'position',
'employer_name',
'employer_address',
'employer_city',
2025-11-13 15:48:14 +00:00
'created_at',
'updated_at'
];
public function user()
{
return $this->belongsTo(User::class, 'id_user');
2025-11-13 15:48:14 +00:00
}
public function bank()
{
return $this->belongsTo(Operator::class);
}
2026-01-30 14:59:41 +00:00
public function customerAccountType()
{
return $this->belongsTo(CustomerAccountType::class, 'id');
}
2025-11-13 15:48:14 +00:00
}