Add public building project setting
This commit is contained in:
@@ -73,9 +73,11 @@ Protected-board structure uses
|
||||
`circuit-protection.update`. A subtree restore is normally emitted only as the
|
||||
persisted inverse of a delete. The dispatcher also supports the documented
|
||||
project-device, project settings, distribution-board and project-location
|
||||
commands. The generic editor commands listed here use schema version `1`;
|
||||
the clean pre-release baseline does not accept older development formats.
|
||||
Unsupported types or schema versions are rejected. Insert commands contain the complete entity or circuit block
|
||||
commands. The generic editor commands listed here use schema version `1`.
|
||||
`project.update-settings` uses version `2` and still accepts supported baseline
|
||||
version `1` commands without changing the newer building classification.
|
||||
Pre-baseline formats remain unsupported. Unsupported types or schema versions
|
||||
are rejected. Insert commands contain the complete entity or circuit block
|
||||
with stable ids; delete commands include the expected parent identity. Circuit
|
||||
snapshots contain zero, one or multiple complete device rows. Move commands
|
||||
contain each row's expected and target circuit plus its exact expected and
|
||||
@@ -170,12 +172,12 @@ synchronizes linked circuit rows implicitly.
|
||||
|
||||
- `PUT /projects/:projectId`
|
||||
- request:
|
||||
`{ "expectedRevision": 12, "singlePhaseVoltageV": 230, "threePhaseVoltageV": 400, "enabledDistributionBoardSupplyTypes": ["AV", "MSR", "SiBe"], ...projectMetadata }`
|
||||
`{ "expectedRevision": 12, "isPublicBuilding": true, "singlePhaseVoltageV": 230, "threePhaseVoltageV": 400, "enabledDistributionBoardSupplyTypes": ["AV", "MSR", "SiBe"], ...projectMetadata }`
|
||||
- executes `project.update-settings` as one atomic revision
|
||||
- response:
|
||||
`{ "project": { ... }, "revision": { ... }, "history": { ... } }`
|
||||
- persistent Undo/Redo restores metadata, voltage values and the enabled
|
||||
distribution-board supply types together; project-device and circuit
|
||||
- persistent Undo/Redo restores metadata, the public-building flag, voltage
|
||||
values and enabled distribution-board supply types together; project-device and circuit
|
||||
voltages are recalculated from the restored project settings in the same
|
||||
transaction
|
||||
- project-device and circuit voltage are derived values and are not accepted
|
||||
|
||||
@@ -232,8 +232,10 @@ und Historienstapel teilen dieselbe Transaktion. Create, Import aus der globalen
|
||||
Gerätebibliothek und Delete laufen über dieselbe Command-Grenze; ihre Antworten
|
||||
liefern Gerät und aktualisierten Historienstand an die Projektseite zurück.
|
||||
`project.update-settings` versioniert Projektname, interne und externe
|
||||
Projektnummer, Bauherr, Beschreibung, beide Standardspannungen sowie die im
|
||||
Projekt freigeschalteten Verteiler-Netzarten als eine atomare Änderung. Der
|
||||
Projektnummer, Bauherr, Beschreibung, die Kennzeichnung als öffentliches
|
||||
Gebäude, beide Standardspannungen sowie die im Projekt freigeschalteten
|
||||
Verteiler-Netzarten als eine atomare Änderung. Die Gebäudekennzeichnung ist
|
||||
der spätere Eingang für die Auswahl halogenfreier Kabel und Leitungen. Der
|
||||
Systemkatalog besteht aus `AV`, `SV`, `EV`, `USV`, `MSR` und `SiBe`; mindestens
|
||||
eine Netzart muss aktiv bleiben und eine bereits von einer Verteilung
|
||||
verwendete Netzart kann nicht deaktiviert werden. Die Projektseite bearbeitet diese Angaben in einem
|
||||
@@ -414,12 +416,13 @@ wieder her.
|
||||
verteilerweiten Gleichzeitigkeitsfaktor gemeinsam und stellt alle Werte über
|
||||
dauerhaftes Undo/Redo wieder her. Der Faktor liegt zwischen `0` und `1` und
|
||||
ist für bestehende sowie neu angelegte Verteilungen standardmäßig `1`.
|
||||
Das aktuelle Baseline-Snapshot-Schema enthält den Gleichzeitigkeitsfaktor,
|
||||
Snapshot-Schema 2 enthält zusätzlich die Gebäudekennzeichnung sowie den Gleichzeitigkeitsfaktor,
|
||||
Gruppenkategorie und -nummer, Verteilerkomponenten sowie die getrennten
|
||||
1:1-Schutzgerätedaten. Capture,
|
||||
benannte und automatische Snapshots, Wiederherstellung, Undo/Redo und beide
|
||||
JSON-Importmodi verwenden denselben vollständigen Zustand. Vorherige
|
||||
Entwicklungsschemas werden nicht mehr eingelesen.
|
||||
JSON-Importmodi verwenden denselben vollständigen Zustand. Die unterstützte
|
||||
Baseline-Version 1 wird mit `isPublicBuilding = false` hochgestuft; Formate vor
|
||||
dieser Baseline werden nicht eingelesen.
|
||||
Persistente Insert-, Update- und Delete-Commands versionieren Anlage,
|
||||
Bearbeitung und Löschung von Geschossen und Räumen mit stabilen UUIDs und
|
||||
exakten Vorher-/Nachher-Snapshots. Ein Geschoss wird nur
|
||||
@@ -447,8 +450,8 @@ Kopieren in ein Projekt erzeugt ein eigenständiges Projektgerät.
|
||||
|
||||
- SQLite ist die aktuell unterstützte Datenbank.
|
||||
- Fremdschlüssel werden für jeden Datenbankkontext aktiviert.
|
||||
- `npm run db:migrate` richtet mit der einzelnen Migration `0000` das komplette
|
||||
aktuelle Schema einer leeren Datenbank ein.
|
||||
- `npm run db:migrate` richtet mit Baseline-Migration `0000` und den folgenden
|
||||
additiven Migrationen das aktuelle Schema ein.
|
||||
- `npm run db:verify:circuit-schema` prüft erforderliche und entfernte Spalten.
|
||||
- `npm run db:backup` erzeugt ein konsistentes und verifiziertes Online-Backup.
|
||||
- `npm run typecheck:scripts` prüft die TypeScript-Wartungsskripte, ohne Code zu
|
||||
@@ -469,8 +472,8 @@ Kopieren in ein Projekt erzeugt ein eigenständiges Projektgerät.
|
||||
flachen Stromkreis-Schutzfelder sind aus der Baseline entfernt.
|
||||
Ein triggergeführtes Register erzwingt bereits eine normalisierte,
|
||||
stromkreislistenweite BMK-Eindeutigkeit über Stromkreise und
|
||||
Verteilerkomponenten. Snapshot- und Transfer-Integration verwenden
|
||||
Snapshot-Schema 1 der Baseline. Persistente Insert/Delete/Update-Commands für
|
||||
Verteilerkomponenten. Snapshot- und Transfer-Integration verwenden aktuell
|
||||
Snapshot-Schema 2. Persistente Insert/Delete/Update-Commands für
|
||||
veränderliche Verteilerkomponenten, Gruppen einschließlich befüllter
|
||||
Unterbäume sowie vollständige Gruppensortierung sind integriert. Der Editor
|
||||
zeigt die geschützte Struktur an und bearbeitet veränderliche Gruppen- und
|
||||
|
||||
@@ -262,8 +262,9 @@ Completed foundation:
|
||||
- `project-device.insert` and `project-device.delete` preserve stable device
|
||||
ids; delete undo restores links only from complete unchanged disconnected-row
|
||||
snapshots in the same transaction
|
||||
- `project.update-settings` persists both project voltage defaults, its exact
|
||||
inverse, revision and history transition atomically; the project page and
|
||||
- `project.update-settings` persists the public-building classification and
|
||||
both project voltage defaults with their exact inverse, revision and history
|
||||
transition atomically; the project page and
|
||||
existing PUT route require the current expected revision; the same
|
||||
transaction derives every project-device and circuit voltage again, so
|
||||
Undo/Redo cannot leave mixed voltage states
|
||||
|
||||
@@ -52,7 +52,7 @@ Wichtige fachliche Grenzen:
|
||||
Für einen späteren Revit-Austausch besonders relevante Daten sind:
|
||||
|
||||
- Projekt: Name, interne/externe Projektnummer, Bauherr, Beschreibung,
|
||||
Projektspannungen.
|
||||
Kennzeichnung als öffentliches Gebäude und Projektspannungen.
|
||||
- Geschoss und Raum: interne UUID, Name beziehungsweise Raumnummer und
|
||||
Raumname.
|
||||
- Verteilung: interne UUID, Name, Etage, Netzart und Gleichzeitigkeitsfaktor.
|
||||
|
||||
@@ -14,12 +14,18 @@ Future suggestions or checks may include:
|
||||
- cable type
|
||||
- number of cores
|
||||
- cable cross-section
|
||||
- halogen-free cable or line requirement for public buildings
|
||||
- minimum cable cross-section based on current
|
||||
- maximum permissible cable length based on voltage drop
|
||||
- warning messages if cable length, cross-section or protection device do not match
|
||||
|
||||
Users must remain able to manually override suggestions.
|
||||
|
||||
The project-owned `isPublicBuilding` setting is the authoritative input for
|
||||
the later halogen-free selection rule. The setting is persisted now; this
|
||||
document does not yet define or implement the complete cable catalog or sizing
|
||||
algorithm.
|
||||
|
||||
## Initial Design Rule Examples
|
||||
|
||||
These are common planning defaults, not a replacement for full norm-compliant calculation.
|
||||
|
||||
@@ -465,9 +465,9 @@ Implemented foundation:
|
||||
- ProjectDevice synchronization and disconnect endpoints also require
|
||||
`expectedRevision`; their UI undo uses project-wide persistent history and
|
||||
the obsolete direct restore/reconnect write paths are removed
|
||||
- project voltage settings use `project.update-settings`; both values, inverse,
|
||||
revision and history transition commit atomically and the former direct
|
||||
settings write is removed
|
||||
- project settings use `project.update-settings`; metadata, public-building
|
||||
classification, voltage values, inverse, revision and history transition
|
||||
commit atomically and the former direct settings write is removed
|
||||
- distribution-board setup uses `distribution-board.insert` with a complete
|
||||
stable board/list/default-section snapshot; Undo removes only an unchanged
|
||||
empty setup and the former direct controller write is removed
|
||||
|
||||
@@ -54,7 +54,7 @@ requirements and intended sequencing, not proof of implementation.
|
||||
|
||||
The pre-release cleanup established the following compatibility boundary:
|
||||
|
||||
- [x] Pre-release databases, portable JSON exports, logical snapshots and
|
||||
- [x] Pre-baseline databases, portable JSON exports, logical snapshots and
|
||||
persisted command histories are explicitly unsupported.
|
||||
- [x] Migration `0000` builds the complete supported schema on an empty
|
||||
database.
|
||||
@@ -109,9 +109,16 @@ The pre-release cleanup established the following compatibility boundary:
|
||||
device rows with a valid phase are three-phase.
|
||||
- [x] Changing project voltage settings updates all project devices and circuits
|
||||
atomically in the same persistent Undo/Redo step.
|
||||
- [x] Baseline migration `0000` and project-state schema version `1` store only
|
||||
the canonical derived values. Pre-release imports are intentionally
|
||||
unsupported.
|
||||
- [x] Baseline migration `0000` stores only canonical derived values.
|
||||
Pre-baseline imports are intentionally unsupported.
|
||||
|
||||
## Building Classification
|
||||
|
||||
- [x] Store whether a project represents a public building.
|
||||
- [x] Edit the value in the project settings and preserve it through persistent
|
||||
Undo/Redo, snapshots and portable project transfers.
|
||||
- [x] Provide the value as an explicit future sizing input for selecting
|
||||
halogen-free cables and lines; automatic sizing remains deferred.
|
||||
|
||||
## Circuit List Power Summary
|
||||
|
||||
|
||||
@@ -467,11 +467,11 @@ The supported logical project snapshot and portable JSON transfer must include:
|
||||
- circuit protection-device state
|
||||
- all new component relationships and sort positions
|
||||
|
||||
The clean pre-release baseline uses project-state schema version `1`. It
|
||||
contains the complete supported structure above and is shared by logical
|
||||
snapshots, restore, Undo/Redo and portable JSON transfer. Payloads from earlier
|
||||
development schemas are intentionally unsupported and rejected before any
|
||||
write.
|
||||
Current project-state schema version `2` contains the complete supported
|
||||
structure above and the project building classification. It is shared by
|
||||
logical snapshots, restore, Undo/Redo and portable JSON transfer. Supported
|
||||
baseline version `1` is upgraded with the non-public default; payloads from
|
||||
before that baseline are rejected before any write.
|
||||
|
||||
Migration `0000` creates the complete relational model on an empty database.
|
||||
New defaults apply when boards, groups or circuits are created; they never
|
||||
@@ -545,7 +545,7 @@ Implemented persistence:
|
||||
one-to-one ownership boundaries
|
||||
- a trigger-maintained circuit-list registry rejects normalized BMK collisions
|
||||
across circuits and distribution-board components
|
||||
- snapshot schema version `1` includes group identity, distribution-board
|
||||
- snapshot schema version `2` includes group identity, distribution-board
|
||||
components and both one-to-one protection collections
|
||||
- capture, named and automatic snapshots, restore, Undo/Redo and portable JSON
|
||||
transfers preserve the complete new relational state
|
||||
|
||||
Reference in New Issue
Block a user