abschlussprojekt-device-man.../device-app/database/factories/DeviceFactory.php

32 lines
934 B
PHP
Raw Normal View History

2023-03-23 21:50:31 +01:00
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Device>
*/
class DeviceFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
2023-04-03 11:54:41 +02:00
$device_type = $this->faker->randomElement(['projektor','computer','laptop','mikrofon','whiteboard','unbekannt']);
2023-03-23 21:50:31 +01:00
return [
'device_id' => $this->faker->uuid(),
2023-03-24 14:11:09 +01:00
'title' => $this->faker->word(),
2023-04-03 11:54:41 +02:00
'device_type' => $device_type,
2023-03-24 14:11:09 +01:00
'description' => $this->faker->sentence(),
'accessories' => $this->faker->word(),
'rz_username_buyer' => $this->faker->name(),
'serial_number' => $this->faker->creditCardNumber(),
'image_url' => $this->faker->url()
2023-03-23 21:50:31 +01:00
];
}
}