Files
BetiX/app/Models/UserStats.php
Dolo 0280278978
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled
Initialer Laravel Commit für BetiX
2026-04-04 18:01:50 +02:00

41 lines
899 B
PHP

<?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);
}
}