the browser-facing portion of osu!
at master 725 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6declare(strict_types=1); 7 8namespace App\Models; 9 10use Illuminate\Database\Eloquent\Relations\BelongsTo; 11 12/** 13 * @property-read Contest $contest 14 * @property int $contest_id 15 * @property-read User $user 16 * @property int $user_id 17 */ 18class ContestJudge extends Model 19{ 20 public $timestamps = false; 21 public $incrementing = false; 22 23 protected $primaryKey = ':composite'; 24 protected $primaryKeys = ['user_id', 'contest_id']; 25 26 public function user(): BelongsTo 27 { 28 return $this->belongsTo(User::class, 'user_id'); 29 } 30}