48 lines
847 B
PHP
48 lines
847 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Created by Reliese Model.
|
||
|
*/
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
/**
|
||
|
* Class NetworksBank
|
||
|
*
|
||
|
* @property int $id
|
||
|
* @property int $id_bank_country
|
||
|
* @property int $id_network
|
||
|
*
|
||
|
* @property BanksCountry $banks_country
|
||
|
* @property Network $network
|
||
|
*
|
||
|
* @package App\Models
|
||
|
*/
|
||
|
class NetworksBank extends Model
|
||
|
{
|
||
|
protected $table = 'networks_banks';
|
||
|
public $timestamps = false;
|
||
|
|
||
|
protected $casts = [
|
||
|
'id_bank_country' => 'int',
|
||
|
'id_network' => 'int'
|
||
|
];
|
||
|
|
||
|
protected $fillable = [
|
||
|
'id_bank_country',
|
||
|
'id_network'
|
||
|
];
|
||
|
|
||
|
public function banks_country()
|
||
|
{
|
||
|
return $this->belongsTo(BanksCountry::class, 'id_bank_country');
|
||
|
}
|
||
|
|
||
|
public function network()
|
||
|
{
|
||
|
return $this->belongsTo(Network::class, 'id_network');
|
||
|
}
|
||
|
}
|