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\Notification;
11use App\Models\User;
12use App\Models\UserNotification;
13
14class UserNotificationFactory extends Factory
15{
16 protected $model = UserNotification::class;
17
18 public function definition(): array
19 {
20 return [
21 'delivery' => UserNotification::deliveryMask(array_rand(UserNotification::DELIVERY_OFFSETS)),
22 'notification_id' => Notification::factory(),
23 'user_id' => User::factory(),
24 ];
25 }
26}