X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FResult.php;h=3ced393cc64b1d13ebe3d2970e399e48550a9c13;hb=beccf752aafd468c3753c6d48ae30bccd946c3b9;hp=e693fc7de5d510783d7a0ea24ecfa4d326ce9bc9;hpb=55f2d7cd6c290a0d26db177d54d20c393f890bbb;p=alttp.git diff --git a/app/Models/Result.php b/app/Models/Result.php index e693fc7..3ced393 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -17,4 +17,19 @@ class Result extends Model return $this->belongsTo(Participant::class); } + public function getHasFinishedAttribute() { + return $this->time > 0 || $this->forfeit; + } + + protected $appends = [ + 'has_finished', + ]; + + protected $fillable = [ + 'forfeit', + 'round_id', + 'time', + 'user_id', + ]; + }