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 Beatmap $beatmap
10 * @property int $beatmap_id
11 * @property float $diff_unified
12 * @property \Carbon\Carbon $last_update
13 * @property int $mode
14 * @property int $mods
15 */
16class BeatmapDifficulty extends Model
17{
18 public $incrementing = false;
19 public $timestamps = false;
20
21 protected $casts = ['last_update' => 'datetime'];
22 protected $primaryKey = ':composite';
23 protected $primaryKeys = ['beatmap_id', 'mode', 'mods'];
24 protected $table = 'osu_beatmap_difficulty';
25
26 public function beatmap()
27 {
28 return $this->belongsTo(Beatmap::class, 'beatmap_id');
29 }
30}