<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class TrixHandHistory extends Model
{
    protected $table = 'trix_hand_history';

    protected $fillable = ['game_id', 'kingdom_number', 'contract', 'hand_scores'];

    protected $casts = [
        'hand_scores' => 'array',
    ];

    public function game(): BelongsTo
    {
        return $this->belongsTo(TrixGame::class, 'game_id');
    }
}
