the browser-facing portion of osu!
at master 729 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 6namespace App\Models; 7 8/** 9 * @property Beatmap $beatmap 10 * @property int $beatmap_id 11 * @property User $user 12 * @property int $user_id 13 */ 14class BeatmapOwner extends Model 15{ 16 public $incrementing = false; 17 public $timestamps = false; 18 19 protected $primaryKey = ':composite'; 20 protected $primaryKeys = ['beatmap_id', 'user_id']; 21 22 public function beatmap() 23 { 24 return $this->belongsTo(Beatmap::class, 'beatmap_id'); 25 } 26 27 public function user() 28 { 29 return $this->belongsTo(User::class, 'user_id'); 30 } 31}