This commit is contained in:
2026-03-20 21:17:26 +01:00
parent 1a62fcb81d
commit 29c3ff8572
229 changed files with 13147 additions and 2577 deletions

39
app/Models/UserXpLog.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserXpLog extends Model
{
use HasFactory;
public $timestamps = false;
protected $fillable = [
'user_id',
'action',
'xp',
'reference_id',
'created_at',
];
protected function casts(): array
{
return [
'user_id' => 'integer',
'xp' => 'integer',
'reference_id' => 'integer',
'created_at' => 'datetime',
];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}