<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Group extends Model
{
    protected $fillable = ['competition_id', 'name'];

    public function competition()
    {
        return $this->belongsTo(Competition::class);
    }

    public function competitionAthletes()
    {
        return $this->hasMany(CompetitionAthlete::class, 'group_id');
    }
}
