walletserviceExterne/app/Models/NetworksAgent.php

63 lines
1.1 KiB
PHP
Executable File

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class NetworksAgent
*
* @property int $id
* @property int $network_id
* @property int $agent_id
* @property float $solde
* @property int $etat
* @property int $codeGenerer_id
* @property string $phone
* @property string $transactionNumber
* @property string $validation_code
*
* @property Collection|Wallet[] $wallets
*
* @package App\Models
*/
class NetworksAgent extends Model
{
protected $table = 'networks_agents';
public $timestamps = false;
protected $casts = [
'network_id' => 'int',
'agent_id' => 'int',
'solde' => 'float',
'etat' => 'int',
'codeGenerer_id' => 'int'
];
protected $fillable = [
'network_id',
'agent_id',
'solde',
'etat',
'codeGenerer_id',
'phone',
'transactionNumber',
'validation_code'
];
public function wallets()
{
return $this->hasMany(Wallet::class, 'id_networkAgent');
}
public function network()
{
return $this->belongsTo(Network::class, 'network_id');
}
}