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