mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-22 12:22:54 +02:00
38 lines
627 B
Python
38 lines
627 B
Python
from abc import ABC
|
|
from dataclasses import dataclass
|
|
from enum import Enum
|
|
|
|
|
|
class RelationshipRoleEnum(Enum):
|
|
STAKEHOLDER = ""
|
|
ORGANISATION = "ORGANISATION"
|
|
|
|
|
|
@dataclass
|
|
class CompayID:
|
|
district_court: str
|
|
hr_number: str
|
|
|
|
|
|
@dataclass
|
|
class Location:
|
|
city: str
|
|
street: str | None = None
|
|
house_number: str | None = None
|
|
zip_code: str | None = None
|
|
|
|
|
|
@dataclass
|
|
class CompanyRelationship(ABC):
|
|
role: RelationshipRoleEnum
|
|
location: Location
|
|
|
|
|
|
@dataclass
|
|
class Company:
|
|
id: CompayID
|
|
location: Location
|
|
name: str
|
|
last_update: str
|
|
relationships: list[CompanyRelationship]
|