Feste Fächer-Liste je Objekttyp (Vorlagen-Positionen: Dropdown + Sonstiges)
CI / backend-tests (push) Successful in 1m0s
CI / frontend-build (push) Successful in 5m56s

Nutzer-Vorgabe: Rucksack-Fächer sollen aus einer festen, je Objekttyp
gepflegten Liste gewählt werden können statt jedes Mal Freitext einzutippen.
Neue Tabelle fach (Migration 0004), CRUD-Endpoints /faecher, Admin-Tab
Struktur bekommt Fach-Verwaltung, Vorlagen-Editor nutzt Dropdown mit
"Sonstiges"-Freitext-Fallback.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt
This commit is contained in:
2026-09-04 10:24:15 +02:00
co-authored by Claude Sonnet 5
parent 2f11011ed1
commit a2877f5672
11 changed files with 493 additions and 17 deletions
+13
View File
@@ -50,6 +50,19 @@ class Objekttyp(Base):
name: Mapped[str] = mapped_column(String, nullable=False)
class Fach(Base):
"""Nutzer-Vorgabe: feste Fächer-Liste je Objekttyp, damit beim Anlegen einer
Vorlagenposition nicht jedes Mal Freitext getippt werden muss. `sortierung`
steuert die Anzeigereihenfolge (z. B. von oben nach unten im Rucksack)."""
__tablename__ = "fach"
id: Mapped[int] = mapped_column(primary_key=True)
objekttyp_id: Mapped[int] = mapped_column(ForeignKey("objekttyp.id"), nullable=False)
name: Mapped[str] = mapped_column(String, nullable=False)
sortierung: Mapped[int] = mapped_column(default=0)
class Material(Base):
__tablename__ = "material"