<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;

class Game extends Model
{
    use LogsActivity;

    protected $fillable = [
        'main_title',
        'description',
        'background_color',
        "icon",
        'images',
        'secondary_title',
        'event_tittle',
        'max_event_count',
        'join_title',
        'button_text',
        'button_color',
        'button_background_color',
        'individual_zone_id',
    ];
    protected $casts = [
        'images' => 'array',

    ];
    public function individualZone()
    {
        return $this->belongsTo(IndividualZone::class);
    }

    public function getActivitylogOptions(): \Spatie\Activitylog\LogOptions
    {
        return \Spatie\Activitylog\LogOptions::defaults()->logAll();
    }
}
