Skip to content

Commit

Permalink
init datamodell
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDaniel committed Feb 27, 2024
1 parent 93696df commit 8babf02
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
Empty file added src/migmose/mig/__init__.py
Empty file.
12 changes: 12 additions & 0 deletions src/migmose/mig/baumdiagramm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
contains class for trees consisting of segments of mig tables
"""

from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile


class BaumSegmentGruppe(NachrichtenstrukturZeile):
"""will contain the tree structure of nachrichtenstruktur tables"""

segmente: list[NachrichtenstrukturZeile]
segmentgruppe: list["BaumSegmentGruppe"]
15 changes: 15 additions & 0 deletions src/migmose/mig/nachrichtenstruktur.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
contains class mig tables
"""

from pydantic import BaseModel

from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile


class NachrichtenstrukturTabelle(BaseModel):
"""
class for mig tables
"""

lines: list[NachrichtenstrukturZeile]
21 changes: 21 additions & 0 deletions src/migmose/mig/nachrichtenstrukturzeile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
contains class for lines in mig tables
"""

from pydantic import BaseModel


class NachrichtenstrukturZeile(BaseModel):
"""
class for lines in mig tables
"""

zaehler: str
nr: str
bezeichnung: str
standard_status: str
bdew_status: str
standard_maximale_wiederholungen: int
bdew_maximale_wiederholungen: int
ebene: int
inhalt: str
14 changes: 14 additions & 0 deletions src/migmose/mig/segmentgruppe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
contains class for structured segmentgroups in mig tables. builds table recursively.
"""

from migmose.mig.zeile import NachrichtenStrukturZeile


class SegmentGruppe(NachrichtenStrukturZeile):
"""
class for structured segmentgroups in mig tables. builds table recursively. inherits from NachrichtenstrukturZeile
"""

segmente: list[NachrichtenStrukturZeile]
segmentgruppe: list["SegmentGruppe"]

0 comments on commit 8babf02

Please sign in to comment.