mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-14 19:42:14 +03:00
Updated uses of user ID to nullify on delete. Added testing to cover deletion of user relations. Added model factories to support changes and potential other tests. Cleans existing ID references in the DB via migration.
29 lines
627 B
PHP
29 lines
627 B
PHP
<?php
|
|
|
|
namespace Database\Factories\Access\Mfa;
|
|
|
|
use BookStack\Users\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Access\Mfa\MfaValue>
|
|
*/
|
|
class MfaValueFactory extends Factory
|
|
{
|
|
protected $model = \BookStack\Access\Mfa\MfaValue::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'user_id' => User::factory(),
|
|
'method' => 'totp',
|
|
'value' => '123456',
|
|
];
|
|
}
|
|
}
|