feat: mark a library document for a specific purpose

This commit is contained in:
fromme committed 2026-09-24 16:35:24 +02:00
1 parent cb2d64f2cd
commit 19364df2db
8 files changed
+249 -6

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Config;
/**
* The slots in the staff-wide document library (Upload::TYPE_DOCUMENT) that code looks a file up
* by, rather than by id or name.
*
* A fixed list and not free text on purpose: something in the application has to consume a slot
* for it to mean anything, so inventing one without a release would only produce a token nothing
* reads - and a typo would look exactly the same as a document nobody has assigned yet, while
* silently dropping an attachment.
*
* A case's value is what ends up in upload.token, so renaming one orphans the assignment and the
* mail quietly loses its attachment. The column is unique: one document per slot.
*/
enum UploadToken: string
{
case APPLICATION_FORM_HANDOUT = 'application_form_handout';
/**
* What the document library offers in its dropdown.
*/
public function label(): string
{
return match ($this) {
self::APPLICATION_FORM_HANDOUT => 'Handout für die 2. Mail an Bewerber:innen',
};
}
}