feat: rework BO Vertrag (draft for AG)#1087
Draft
lord-haffi wants to merge 4 commits into
Draft
Conversation
…schluss_datum, add kuendigungsgrund and produkt
…uce Vertragsstatus to 4 states
…ertragskonditionen (drop vertragslaufzeit, anzahl_abschlaege -> int)
… drop migration note from schema description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — second of two PRs for the new Vertrag/Produkt model (AG HackMD spec). Stacked on #1086 (
feat/bo-produkt-tarif-com); review/merge that first. The diff here is only the Vertrag rework.Changes
BO Vertrag: renamedvertragspartner1/vertragspartner2→vertragsaussteller/vertragsempfaenger; removed theUnterschriftlists (unterzeichnervp1/unterzeichnervp2); addedvertragsabschluss_datum,kuendigungsgrund, andprodukt(references the newBO Produkt).BO BuendelvertragandCOM Unterschrift(source + tests + discriminatorsBoTyp.BUENDELVERTRAG,ComTyp.UNTERSCHRIFT). A bundle is now modelled as aVertragwithVertragsart.BUENDELVERTRAG+ multiplevertragsteile.ENUM Vertragsstatusreduced from 9 to 4 (AKTIV,GEKUENDIGT,STORNIERT,WIDERRUFEN). The Angebot-phase states drop (they belong toAngebot);BEENDETdrops (an active contract withvertragsendeexpresses the same).COM Vertragsteil:lokation: str→lokationszuordnung: Optional[Lokationszuordnung](embedded BO).COM Vertragskonditionen: removedvertragslaufzeit;anzahl_abschlaegeDecimal→int.Verification
pytest: 109 passedpylint src/bo4e: 10.00/10 ·mypy: clean (282 files)generate+validate: both exit 0Open questions for the AG
BoTyp.BUENDELVERTRAG,ComTyp.UNTERSCHRIFT,Vertragsstatus9→4.STORNIERT/WIDERRUFENdocstrings attribute the action (durch den Vertragsaussteller / Vertragsempfänger) — please confirm.AKTIV("Beendigung wird über das Vertragsende modelliert"): confirm end-of-contract is modelled viavertragsende(noBEENDET), coexisting withGEKUENDIGT+ the newkuendigungsgrund.Vertragsteilnow embeds a fullLokationszuordnung(heavier payload) — acceptable vs. an id reference?kuendigungsgrundas a freestrvs. a future enum.Incidental / discovered
tests/test_adresse.pyis a pre-existing mis-named file that actually contains aTestVertragclass (not Adresse tests). It was updated to mirror the Vertrag rename so the suite stays green. Renaming it — and whetherCOM Adressehas real test coverage — is left as a separate cleanup.Out of scope
BO Produktand theTarif→COMdegradation are in #1086.