2024-05-29 20:29:15 +00:00
|
|
|
import dataclasses
|
2024-06-02 14:14:46 +00:00
|
|
|
import datetime
|
2024-05-29 20:29:15 +00:00
|
|
|
from collections.abc import Mapping
|
2024-06-02 14:14:46 +00:00
|
|
|
from decimal import Decimal
|
|
|
|
|
|
|
|
import enforce_typing
|
2024-05-29 20:29:15 +00:00
|
|
|
from fin_defs import Asset
|
2024-06-02 14:14:46 +00:00
|
|
|
|
2024-05-29 20:29:15 +00:00
|
|
|
|
|
|
|
@enforce_typing.enforce_types
|
|
|
|
@dataclasses.dataclass
|
|
|
|
class Depo:
|
|
|
|
name: str
|
|
|
|
updated_time: datetime.datetime
|
|
|
|
|
2024-06-02 14:14:46 +00:00
|
|
|
|
2024-05-29 20:29:15 +00:00
|
|
|
@enforce_typing.enforce_types
|
|
|
|
@dataclasses.dataclass
|
|
|
|
class DepoSingle(Depo):
|
|
|
|
assets: Mapping[Asset, Decimal]
|
|
|
|
|
2024-06-02 14:14:46 +00:00
|
|
|
|
2024-05-29 20:29:15 +00:00
|
|
|
@enforce_typing.enforce_types
|
|
|
|
@dataclasses.dataclass
|
|
|
|
class DepoGroup(Depo):
|
|
|
|
nested: list[Depo]
|