From 00f5bd495c8b477a7f611b3fd759e9ece0cad806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronika=20Feh=C3=A9rv=C3=ADziov=C3=A1?= <128744051+VeronikaFeherviziova@users.noreply.github.com> Date: Fri, 31 Oct 2025 20:08:26 +0100 Subject: [PATCH] fix: incorrect start and end date range --- backend/database/factories/InternshipFactory.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/database/factories/InternshipFactory.php b/backend/database/factories/InternshipFactory.php index d1d9015..8981b71 100644 --- a/backend/database/factories/InternshipFactory.php +++ b/backend/database/factories/InternshipFactory.php @@ -16,11 +16,14 @@ class InternshipFactory extends Factory */ public function definition(): array { + $start = fake()->dateTime(); + $end = (clone $start)->modify('+' . fake()->numberBetween(150, 160) . ' hours'); + return [ 'user_id' => 0, 'company_id' => 0, - 'start' => fake()->dateTime(), - 'end' => fake()->dateTime("+30 days"), + 'start' => $start, + 'end' => $end, 'year_of_study' => fake()->randomElement([1, 2, 3, 4, 5]), 'semester' => fake()->randomElement(["WINTER", "SUMMER"]), 'position_description' => fake()->jobTitle(),