24 lines
479 B
Python
24 lines
479 B
Python
|
|
||
|
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]
|