feat(personal): PERS-001/002 Person fachlich von Benutzer getrennt
CI / backend-tests (push) Successful in 2m29s
CI / frontend-build (push) Successful in 28s

Neue Tabelle person (Migration 0034, Backfill bestehender Benutzer 1:1
per Zeilennummer, keine Datenverluste). Benutzer.person_id optional -
Login kann bestehende Person verknüpfen oder legt automatisch eine neue
an (Rückwärtskompatibilität zum bisherigen Anlegen-Flow). /personen-CRUD
(admin-only), neue PersonSection.tsx im Personal-Tab, BenutzerSection
um Personen-Auswahl erweitert.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
This commit is contained in:
2026-09-08 22:31:46 +02:00
co-authored by Claude Sonnet 5
parent 847c303a97
commit 7dc6446a56
16 changed files with 552 additions and 7 deletions
+5
View File
@@ -47,6 +47,11 @@ class Benutzer(Base):
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"))
# PERS-002: Verknüpfung zum fachlichen Person-Datensatz. Bestehende Benutzer
# wurden per Migration 0034 rückwirkend mit einer Person verknüpft, bleibt
# aber nullable - ein Login ohne fachliche Person(Übergang) wäre sonst nicht
# anlegbar, wenn die Migration künftig übersprungen wird.
person_id: Mapped[int | None] = mapped_column(ForeignKey("person.id"))
rollen: Mapped[list["BenutzerRolle"]] = relationship(back_populates="benutzer", lazy="selectin")