Initialer Laravel Commit für BetiX
This commit is contained in:
48
app/Models/Promo.php
Normal file
48
app/Models/Promo.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Promo extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'description',
|
||||
'bonus_amount',
|
||||
'wager_multiplier',
|
||||
'per_user_limit',
|
||||
'global_limit',
|
||||
'starts_at',
|
||||
'ends_at',
|
||||
'min_deposit',
|
||||
'bonus_expires_days',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'bonus_amount' => 'decimal:4',
|
||||
'min_deposit' => 'decimal:4',
|
||||
'starts_at' => 'datetime',
|
||||
'ends_at' => 'datetime',
|
||||
'is_active' => 'boolean',
|
||||
'bonus_expires_days' => 'integer',
|
||||
'wager_multiplier' => 'integer',
|
||||
'per_user_limit' => 'integer',
|
||||
'global_limit' => 'integer',
|
||||
];
|
||||
|
||||
public function usages(): HasMany
|
||||
{
|
||||
return $this->hasMany(PromoUsage::class);
|
||||
}
|
||||
|
||||
public function userBonuses(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserBonus::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user