the browser-facing portion of osu!
at master 23 lines 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 6namespace App\Transformers; 7 8use App\Models\BeatmapDiscussionVote; 9 10class BeatmapDiscussionVoteTransformer extends TransformerAbstract 11{ 12 public function transform(BeatmapDiscussionVote $vote) 13 { 14 return [ 15 'beatmapset_discussion_id' => $vote->beatmap_discussion_id, 16 'created_at' => json_time($vote->created_at), 17 'id' => $vote->getKey(), 18 'score' => $vote->score, 19 'updated_at' => json_time($vote->updated_at), 20 'user_id' => $vote->user_id, 21 ]; 22 } 23}