feat(personal): PERS-004 Einsatzfunktionen (Gruppenführer/Melder/...)
Neue Stammdaten-Tabelle einsatzfunktion (Migration 0031), benutzer bekommt optionales einsatzfunktion_id-Feld - analog zu einheit_id modelliert, eine Person hat im Regelfall genau eine primäre Einsatzfunktion. Bewusst getrennt von den technischen App-Rollen (RolleTyp), die nur steuern, was jemand in MABEA tun darf, nicht welche Funktion er im Einsatz hat. CRUD-Endpunkt /einsatzfunktionen nach Kategorie-Muster, Duplikat-Prüfung vorab (Projekt-Konvention). Admin-UI: Auswahl + Inline-Neuanlage in der Benutzerverwaltung (BenutzerSection). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
This commit is contained in:
@@ -45,6 +45,8 @@ class Benutzer(Base):
|
||||
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)
|
||||
# PERS-004: primäre Funktion im Einsatzkontext, optional.
|
||||
einsatzfunktion_id: Mapped[int | None] = mapped_column(ForeignKey("einsatzfunktion.id"))
|
||||
|
||||
rollen: Mapped[list["BenutzerRolle"]] = relationship(back_populates="benutzer", lazy="selectin")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user