walletservice/app/Models/Network.php

60 lines
1.1 KiB
PHP
Raw Normal View History

2020-06-11 13:42:35 +00:00
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Network
*
* @property int $id
* @property int $country_id
* @property string $name
* @property int $id_networkAgent
* @property int $status
*
* @property Collection|ConfigWallet[] $config_wallets
* @property Collection|Identification[] $identifications
* @property WalletsPassword $wallets_password
*
* @package App\Models
*/
class Network extends Model
{
protected $table = 'networks';
public $timestamps = false;
protected $casts = [
'country_id' => 'int',
'id_networkAgent' => 'int',
'status' => 'int'
];
protected $fillable = [
'country_id',
'name',
'id_networkAgent',
'status'
];
public function config_wallets()
{
return $this->hasMany(ConfigWallet::class, 'id_network');
}
public function identifications()
{
return $this->hasMany(Identification::class, 'idNetwork');
}
public function wallets_password()
{
return $this->hasOne(WalletsPassword::class);
}
}