<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ChestOpening extends Model
{
    protected $fillable = [
        'user_id',
        'raffle_id',
        'chest_prize_id',
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function raffle()
    {
        return $this->belongsTo(Raffle::class);
    }

    public function chestPrize()
    {
        return $this->belongsTo(ChestPrize::class, 'chest_prize_id');
    }
}
