Files
BetiX/app/Models/UserBonus.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

43 lines
898 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserBonus extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'promo_id',
'amount',
'wager_required',
'wager_progress',
'expires_at',
'is_active',
'completed_at',
];
protected $casts = [
'amount' => 'decimal:4',
'wager_required' => 'decimal:4',
'wager_progress' => 'decimal:4',
'expires_at' => 'datetime',
'is_active' => 'boolean',
'completed_at' => 'datetime',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function promo(): BelongsTo
{
return $this->belongsTo(Promo::class);
}
}