feat(personal): Personal/Qualifikationen-Modul (Roadmap Phase 1)
Neues Modul für die BOS-Ressourcenplattform-Erweiterung: Einheit (Zug/Gruppe,
self-referenzierend), Qualifikationstyp (Führerschein/Lehrgang/Berechtigung),
BenutzerQualifikation (mit Gültigkeit) und ObjekttypQualifikationsanforderung
(M:N) - beantwortet "wer darf dieses Fahrzeug fahren?" über
GET /objekte/{id}/berechtigung/{benutzer_id}.
Benutzer und Objekt bekommen optionale einheit_id (additiv, analog
fahrzeug_id-Muster). Nebenbei Bugfix: PATCH /benutzer konnte einheit_id nicht
auf null setzen (Feld-vorhanden-Check via model_fields_set statt is not None).
Frontend: neuer Admin-Tab "Personal" (Einheiten, Qualifikationstypen,
Benutzer-Qualifikationszuordnung), Einheit-Auswahl im Benutzer-Formular.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KC8HYvv6UkCVYheYiTw9DD
This commit is contained in:
@@ -44,6 +44,7 @@ class Benutzer(Base):
|
||||
passwort_hash: Mapped[str] = mapped_column(String, nullable=False)
|
||||
aktiv: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
|
||||
email: Mapped[str | None] = mapped_column(String) # Sprint 6 / Karte 05 (Migration 0003)
|
||||
einheit_id: Mapped[int | None] = mapped_column(ForeignKey("einheit.id")) # Personal-Modul (Migration 0012)
|
||||
|
||||
rollen: Mapped[list["BenutzerRolle"]] = relationship(back_populates="benutzer", lazy="selectin")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user