walletservice/app/Models/User.php

85 lines
1.5 KiB
PHP
Raw Normal View History

2020-06-01 18:31:25 +00:00
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class User
*
2020-06-01 18:31:25 +00:00
* @property int $id
* @property string $uid
* @property string $firstname
* @property string $lastname
* @property string $phone
* @property string $email
* @property string $user_code
2020-06-01 18:31:25 +00:00
* @property string $adresse
* @property float $solde
* @property string $encrypted_password
* @property string $salt
* @property string $validation_code
* @property int $active
* @property Carbon $date_modified
* @property Carbon $date_created
* @property int $network_id
*
2020-06-01 18:31:25 +00:00
* @property Collection|Identification[] $identifications
* @property Collection|WalletsUser[] $wallets_users
*
* @package App\Models
*/
class User extends Model
{
protected $table = 'users';
public $timestamps = false;
protected $casts = [
'solde' => 'float',
'active' => 'int',
'network_id' => 'int'
];
protected $dates = [
'date_modified',
'date_created'
];
protected $hidden = [
'encrypted_password'
];
protected $fillable = [
'uid',
'firstname',
'lastname',
'phone',
'email',
'user_code',
2020-06-01 18:31:25 +00:00
'adresse',
'solde',
'encrypted_password',
'salt',
'validation_code',
'active',
'date_modified',
'date_created'
];
public function identifications()
{
return $this->hasMany(Identification::class, 'idUser');
}
public function wallets_users()
{
return $this->hasMany(WalletsUser::class, 'idUser');
}
}