1
0
fin-depo/fin_depo/data.py

24 lines
479 B
Python
Raw Normal View History

2024-05-29 20:29:15 +00:00
import enforce_typing
import dataclasses
from decimal import Decimal
from collections.abc import Mapping
from fin_defs import Asset
import datetime
@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]