19 lines
633 B
Python
19 lines
633 B
Python
"""内存表 2 / 表 4。只给单测用。"""
|
|
from __future__ import annotations
|
|
|
|
|
|
class MemoryCartSettlementRepo:
|
|
def __init__(self, rows: list[dict] | None = None):
|
|
self._rows = [dict(row) for row in (rows or [])]
|
|
|
|
def list_unpushed(self) -> list[dict]:
|
|
return [dict(row) for row in self._rows if row.get("push_status", 0) == 0]
|
|
|
|
|
|
class MemoryContractAgreementRepo:
|
|
def __init__(self, rows: list[dict] | None = None):
|
|
self._rows = [dict(row) for row in (rows or [])]
|
|
|
|
def list_unpushed(self) -> list[dict]:
|
|
return [dict(row) for row in self._rows if row.get("push_status", 0) == 0]
|