the browser-facing portion of osu!
at master 34 lines 928 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 6declare(strict_types=1); 7 8namespace Database\Factories; 9 10use App\Models\BeatmapMirror; 11 12class BeatmapMirrorFactory extends Factory 13{ 14 protected $model = BeatmapMirror::class; 15 16 public function default(): static 17 { 18 return $this->state([ 19 'mirror_id' => $GLOBALS['cfg']['osu']['beatmap_processor']['mirrors_to_use'][0], 20 ]); 21 } 22 23 public function definition(): array 24 { 25 return [ 26 'base_url' => 'http://beatmap-download.test/', 27 'traffic_used' => rand(0, pow(2, 32)), 28 'secret_key' => fn() => $this->faker->password(), 29 'provider_user_id' => 2, 30 'enabled' => 1, 31 'version' => BeatmapMirror::MIN_VERSION_TO_USE, 32 ]; 33 } 34}