<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;


class JackpotResult extends Model
{
    use Notifiable, SoftDeletes;

    # define table
    protected $table = 'jackpot_results';

    # define fillable fields
    protected $fillable = [
        'period_id',
        'number',
        'status',
    ];

    /**
     * The attributes that should be cast.
     *
     * @var array
     */
    protected $casts = [
        'status'  => 'boolean',
    ];
    public function period()
    {
        return $this->hasOne(new Period(), 'id', 'period_id');
    }
}
