engelsystem/db/factories/WorklogFactory.php

27 lines
675 B
PHP
Raw Normal View History

2021-07-10 00:59:20 +02:00
<?php
declare(strict_types=1);
2021-07-10 00:59:20 +02:00
namespace Database\Factories\Engelsystem\Models;
use Engelsystem\Models\User\User;
use Engelsystem\Models\Worklog;
use Illuminate\Database\Eloquent\Factories\Factory;
class WorklogFactory extends Factory
{
/** @var string */
protected $model = Worklog::class; // phpcs:ignore
2021-07-10 00:59:20 +02:00
public function definition(): array
2021-07-10 00:59:20 +02:00
{
return [
'user_id' => User::factory(),
'creator_id' => User::factory(),
'hours' => $this->faker->randomFloat(2, 0.01, 10),
'comment' => $this->faker->text(30),
'worked_at' => $this->faker->dateTimeThisMonth(),
];
}
}