1
0
fin-depo/fin_depo/data.py
2024-06-02 16:14:46 +02:00

27 lines
482 B
Python

import dataclasses
import datetime
from collections.abc import Mapping
from decimal import Decimal
import enforce_typing
from fin_defs import Asset
@enforce_typing.enforce_types
@dataclasses.dataclass
class Depo:
name: str
updated_time: datetime.datetime
@enforce_typing.enforce_types
@dataclasses.dataclass
class DepoSingle(Depo):
assets: Mapping[Asset, Decimal]
@enforce_typing.enforce_types
@dataclasses.dataclass
class DepoGroup(Depo):
nested: list[Depo]