Initialer Laravel Commit für BetiX
This commit is contained in:
42
app/Models/UserBonus.php
Normal file
42
app/Models/UserBonus.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user