Skip to content

Commit

Permalink
added examples to some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDaniel committed Mar 4, 2024
1 parent f977e95 commit 76cd270
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
13 changes: 12 additions & 1 deletion src/migmose/mig/nachrichtenstrukturzeile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@

class NachrichtenstrukturZeile(BaseModel):
"""
class for lines in mig tables
class for lines in mig tables, e.g. (ORDCHG):
{
"zaehler": "0010",
"nr": "1",
"bezeichnung": "UNH",
"standard_status": "M",
"bdew_status": "M",
"standard_maximale_wiederholungen": 1,
"bdew_maximale_wiederholungen": 1,
"ebene": 0,
"inhalt": "Nachrichten-Kopfsegment"
}
"""

zaehler: str
Expand Down
49 changes: 47 additions & 2 deletions src/migmose/mig/segmentgruppe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,53 @@

class SegmentGruppe(NachrichtenstrukturZeile):
"""
class for structured segmentgroups in mig tables. builds table recursively. inherits from NachrichtenstrukturZeile
class for structured segmentgroups in mig tables. Builds table recursively. Inherits from NachrichtenstrukturZeile
e.g.(ORDCHG):
{
"segmente": [
{
"zaehler": "0160",
"nr": "7",
"bezeichnung": "NAD",
"standard_status": "M",
"bdew_status": "M",
"standard_maximale_wiederholungen": 1,
"bdew_maximale_wiederholungen": 1,
"ebene": 1,
"inhalt": "MP-ID Absender"
}
],
"segmentgruppen": [
{
"segmente": [
{
"zaehler": "0260",
"nr": "8",
"bezeichnung": "CTA",
"standard_status": "M",
"bdew_status": "M",
"standard_maximale_wiederholungen": 1,
"bdew_maximale_wiederholungen": 1,
"ebene": 2,
"inhalt": "Ansprechpartner"
},
{
"zaehler": "0270",
"nr": "9",
"bezeichnung": "COM",
"standard_status": "C",
"bdew_status": "R",
"standard_maximale_wiederholungen": 5,
"bdew_maximale_wiederholungen": 5,
"ebene": 3,
"inhalt": "Kommunikationsverbindung"
}
],
"segmentgruppen": []
}
]
}
"""

segmente: list[NachrichtenstrukturZeile]
segmentgruppe: list["SegmentGruppe"]
segmentgruppen: list["SegmentGruppe"]

0 comments on commit 76cd270

Please sign in to comment.