<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class NextGameId extends Model
{
    use HasFactory;
    protected $table = "next_game_id";
    protected $fillable = [
        'game_id',
        'type',
        'one_minute_code',
        'three_minute_code',
        'five_minute_code',
        'two_minute_code',
        'status'
    ];

    public function betting()
    {
        return $this->hasMany(Betting::class, 'game_id', 'game_id');
    }

    public function gamePoint()
    {
        return $this->hasOne(GamePoints::class, 'game_code', 'one_minute_code');
    }
}
