From 473e4cd62e1c82f674667fa79a58ff1b96fd2384 Mon Sep 17 00:00:00 2001 From: br0kenpixel <23280129+br0kenpixel@users.noreply.github.com> Date: Mon, 3 Nov 2025 18:23:40 +0100 Subject: [PATCH] feat: add report and report confirmation fields to Internship model and factory --- backend/app/Models/Internship.php | 14 ++++++++++++++ backend/database/factories/InternshipFactory.php | 2 ++ .../2025_10_20_193012_create_internships_table.php | 2 ++ 3 files changed, 18 insertions(+) diff --git a/backend/app/Models/Internship.php b/backend/app/Models/Internship.php index a549885..7161233 100644 --- a/backend/app/Models/Internship.php +++ b/backend/app/Models/Internship.php @@ -24,5 +24,19 @@ class Internship extends Model 'semester', 'position_description', 'agreement', + 'report', + 'report_confirmed', ]; + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'report_confirmed' => 'boolean', + ]; + } } diff --git a/backend/database/factories/InternshipFactory.php b/backend/database/factories/InternshipFactory.php index 33837de..4b0e117 100644 --- a/backend/database/factories/InternshipFactory.php +++ b/backend/database/factories/InternshipFactory.php @@ -28,6 +28,8 @@ class InternshipFactory extends Factory 'semester' => fake()->randomElement(["WINTER", "SUMMER"]), 'position_description' => fake()->jobTitle(), 'agreement' => null, + 'report' => null, + 'report_confirmed' => false, ]; } } diff --git a/backend/database/migrations/2025_10_20_193012_create_internships_table.php b/backend/database/migrations/2025_10_20_193012_create_internships_table.php index 1b3f750..83571d4 100644 --- a/backend/database/migrations/2025_10_20_193012_create_internships_table.php +++ b/backend/database/migrations/2025_10_20_193012_create_internships_table.php @@ -21,6 +21,8 @@ return new class extends Migration $table->enum("semester", ["WINTER", "SUMMER"])->nullable(false); $table->string("position_description")->nullable(false); $table->binary("agreement")->nullable(true); + $table->binary("report")->nullable(true); + $table->boolean("report_confirmed")->nullable(false)->default(false); $table->timestamps(); }); }