feat(fulfillment): 增加账号商品能力索引与生命周期事件

This commit is contained in:
yml
2026-11-18 19:30:59 +08:00
parent dc95d83b32
commit 667634a8df
35 changed files with 3076 additions and 82 deletions
+11
View File
@@ -485,6 +485,15 @@ class TestOverviewTaskTypeWiring:
.all()
)
assert len(created) == len(accs)
started_events = (
session.query(AccountEvent)
.filter(AccountEvent.event_type == "task_started")
.all()
)
assert len(started_events) == len(accs)
assert {event.account_id for event in started_events} == {
account.id for account in accs
}
finally:
session.close()
@@ -1113,6 +1122,8 @@ class TestOfficialExchangeBecomesAccountEvent:
assert event.occurred_at.year == 2026
assert event.occurred_at.month == 8 # 1788054985 → 2026-08-30 前后
assert event.amount == -1280
assert event.subject_type == "commodity"
assert event.subject_key == "C1"
assert event.detail["source"] == "official_sync"
assert event.source == "official_sync"