2021-06-05 09:26:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\DiscordUser;
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
class DiscordUserFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = DiscordUser::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2023-01-05 17:01:42 +00:00
|
|
|
'id' => $this->faker->numberBetween(186902438396035072, 986902438396035072),
|
2021-06-05 09:26:32 +00:00
|
|
|
'user_id' => function () {
|
|
|
|
return User::factory()->create()->id;
|
|
|
|
},
|
2023-01-05 17:02:35 +00:00
|
|
|
'username' => $this->faker->userName(),
|
|
|
|
'avatar' => $this->faker->uuid(),
|
2021-06-05 09:26:32 +00:00
|
|
|
'discriminator' => $this->faker->randomNumber(4),
|
2023-01-05 17:02:35 +00:00
|
|
|
'email' => $this->faker->safeEmail(),
|
|
|
|
'verified' => $this->faker->boolean(),
|
2021-06-05 09:26:32 +00:00
|
|
|
'public_flags' => $this->faker->randomNumber(1),
|
|
|
|
'locale' => Str::random(2),
|
2023-01-05 17:02:35 +00:00
|
|
|
'mfa_enabled' => $this->faker->boolean(),
|
2021-06-05 09:26:32 +00:00
|
|
|
'premium_type' => $this->faker->randomNumber(1),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|