]> git.localhorst.tv Git - alttp.git/blob - app/Models/Round.php
autonumber rounds
[alttp.git] / app / Models / Round.php
1 <?php
2
3 namespace App\Models;
4
5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model;
7
8 class Round extends Model
9 {
10         use HasFactory;
11
12         public function results() {
13                 return $this->hasMany(Result::class);
14         }
15
16         public function tournament() {
17                 return $this->belongsTo(Tournament::class);
18         }
19
20         protected $casts = [
21                 'code' => 'array',
22         ];
23
24         protected $fillable = [
25                 'number',
26                 'tournament_id',
27         ];
28
29 }