完善 server-rs DDD 重构计划与骨架

This commit is contained in:
Codex
2026-04-29 11:51:30 +08:00
parent 39200ea9cc
commit aa2e9b36d7
98 changed files with 1261 additions and 11 deletions

View File

@@ -0,0 +1,3 @@
//! 背包应用编排过渡落位。
//!
//! 这里只返回背包变更结果和领域事件,不直接访问持久化。

View File

@@ -0,0 +1,3 @@
//! 背包写入命令过渡落位。
//!
//! 用于表达授予物品、装备、卸下、消耗和整理等输入。

View File

@@ -0,0 +1,4 @@
//! 背包领域模型过渡落位。
//!
//! 后续迁移背包槽、装备槽、堆叠和消耗规则时,只保留物品状态变化;
//! SpacetimeDB 表查询写回由 adapter 处理。

View File

@@ -0,0 +1,3 @@
//! 背包领域错误过渡落位。
//!
//! 错误保持可测试的业务语义,例如数量不足、槽位冲突和物品不存在。

View File

@@ -0,0 +1,3 @@
//! 背包领域事件过渡落位。
//!
//! 用于表达物品获得、物品消耗、装备变化和槽位投影变化等事实。

View File

@@ -1,3 +1,9 @@
mod application;
mod commands;
mod domain;
mod errors;
mod events;
use std::{error::Error, fmt};
use serde::{Deserialize, Serialize};