mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 03:04:52 +02:00
feat: add scriptable housekeeper rule engine
This commit is contained in:
@@ -137,6 +137,7 @@ class Event:
|
||||
class ContributionData:
|
||||
claims: list[dict[str, Any]] = field(default_factory=list)
|
||||
payments: list[dict[str, Any]] = field(default_factory=list)
|
||||
allocations: list[dict[str, Any]] = field(default_factory=list)
|
||||
schema_version: int = 1
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
@@ -144,6 +145,7 @@ class ContributionData:
|
||||
"schema_version": self.schema_version,
|
||||
"claims": self.claims,
|
||||
"payments": self.payments,
|
||||
"allocations": self.allocations,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
@@ -152,6 +154,7 @@ class ContributionData:
|
||||
schema_version=int(data.get("schema_version", 1)),
|
||||
claims=list(data.get("claims") or []),
|
||||
payments=list(data.get("payments") or []),
|
||||
allocations=list(data.get("allocations") or []),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user