walletservice/app/Models/UserBankAccount.php

63 lines
1.2 KiB
PHP
Executable File

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