<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Jackpot extends Model
{
    protected $fillable = [
        'name', 'type', 'amount', 'seed_amount',
        'contribution_percent', 'is_active', 'last_won_at',
    ];

    protected function casts(): array
    {
        return [
            'is_active' => 'boolean',
            'amount' => 'decimal:2',
            'seed_amount' => 'decimal:2',
            'contribution_percent' => 'decimal:2',
            'last_won_at' => 'datetime',
        ];
    }
}
