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 int $user_id
14 * @property User $user
15 * @property string $token
16 * @property \Carbon\Carbon $timestamp
17 */
18class LegacyIrcKey extends Model
19{
20 public $incrementing = false;
21 public $timestamps = false;
22
23 protected $casts = ['timestamp' => 'datetime'];
24 protected $primaryKey = 'user_id';
25 protected $table = 'osu_user_ircauth';
26
27 public function user(): BelongsTo
28 {
29 return $this->belongsTo(User::class, 'user_id');
30 }
31}