<?php

namespace App\Models;

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

class LotteryAward extends BaseModel
{
    use HasFactory;

    public $fillable = ['lottery_id', 'name', 'pic', 'level', 'num', 'awards', 'each_num','is_refresh'];

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

    public function members()
    {
        return $this->hasMany(LotteryWinMember::class, 'award_id', 'id');
    }
}
