feat: add report and report confirmation fields to Internship model and factory

This commit is contained in:
2025-11-03 18:23:40 +01:00
parent f32ce9fc99
commit 473e4cd62e
3 changed files with 18 additions and 0 deletions

View File

@@ -24,5 +24,19 @@ class Internship extends Model
'semester',
'position_description',
'agreement',
'report',
'report_confirmed',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'report_confirmed' => 'boolean',
];
}
}

View File

@@ -28,6 +28,8 @@ class InternshipFactory extends Factory
'semester' => fake()->randomElement(["WINTER", "SUMMER"]),
'position_description' => fake()->jobTitle(),
'agreement' => null,
'report' => null,
'report_confirmed' => false,
];
}
}

View File

@@ -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();
});
}