Initialer Laravel Commit für BetiX
This commit is contained in:
40
app/Models/UserStats.php
Normal file
40
app/Models/UserStats.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserStats extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'total_logins',
|
||||
'total_wagered',
|
||||
'total_won',
|
||||
'total_lost',
|
||||
'biggest_win',
|
||||
'biggest_win_game',
|
||||
'total_wins',
|
||||
'vip_level',
|
||||
'vip_points',
|
||||
'last_activity',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'total_wagered' => 'encrypted',
|
||||
'total_won' => 'encrypted',
|
||||
'total_lost' => 'encrypted',
|
||||
'biggest_win' => 'encrypted',
|
||||
'total_wins' => 'integer',
|
||||
'vip_points' => 'integer', // not encrypted in migration
|
||||
'last_activity' => 'datetime',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user