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
6namespace App\Models;
7
8/**
9 * @property Contest $contest
10 * @property int $contest_entry_id
11 * @property int $contest_id
12 * @property \Carbon\Carbon|null $created_at
13 * @property ContestEntry $entry
14 * @property int $id
15 * @property \Carbon\Carbon|null $updated_at
16 * @property User $user
17 * @property int $user_id
18 * @property float $weight
19 */
20class ContestVote extends Model
21{
22 public function entry()
23 {
24 return $this->belongsTo(ContestEntry::class);
25 }
26
27 public function contest()
28 {
29 return $this->belongsTo(Contest::class);
30 }
31
32 public function user()
33 {
34 return $this->belongsTo(User::class, 'user_id');
35 }
36}