完善 server-rs DDD 重构计划与骨架
This commit is contained in:
3
server-rs/crates/module-runtime/src/application.rs
Normal file
3
server-rs/crates/module-runtime/src/application.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! 运行时应用编排过渡落位。
|
||||
//!
|
||||
//! 这里只返回运行时快照、个人页投影和领域事件,不直接访问外部 adapter。
|
||||
3
server-rs/crates/module-runtime/src/commands.rs
Normal file
3
server-rs/crates/module-runtime/src/commands.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! 运行时写入命令过渡落位。
|
||||
//!
|
||||
//! 用于表达保存快照、更新设置、写入浏览历史、调整钱包和保存存档等输入。
|
||||
4
server-rs/crates/module-runtime/src/domain.rs
Normal file
4
server-rs/crates/module-runtime/src/domain.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
//! 运行时领域模型过渡落位。
|
||||
//!
|
||||
//! 后续迁移设置、快照、个人页状态、钱包流水、存档和浏览历史规则时,
|
||||
//! 只保留纯运行时数据变化;SpacetimeDB client 与 HTTP response 不进入本文件。
|
||||
3
server-rs/crates/module-runtime/src/errors.rs
Normal file
3
server-rs/crates/module-runtime/src/errors.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! 运行时领域错误过渡落位。
|
||||
//!
|
||||
//! 错误保持运行时业务语义,例如快照版本非法、兑换码不可用或钱包余额不足。
|
||||
3
server-rs/crates/module-runtime/src/events.rs
Normal file
3
server-rs/crates/module-runtime/src/events.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! 运行时领域事件过渡落位。
|
||||
//!
|
||||
//! 用于表达快照已保存、设置已更新、钱包已记账和存档已变化等事实。
|
||||
@@ -1,3 +1,9 @@
|
||||
mod application;
|
||||
mod commands;
|
||||
mod domain;
|
||||
mod errors;
|
||||
mod events;
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
Reference in New Issue
Block a user