<?php

namespace App\Models;

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

class JoinTeamSubmission extends Model
{
    use LogsActivity;

    protected $fillable = [
        'name',
        'surname',
        'grade',
        'section',
        'phone_number',
        'email',
        'message',
        'game_id',
    ];

    public function game()
    {
        return $this->belongsTo(Game::class);
    }

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