Files
nj/crates/erp-diary/src/state.rs
iven c539e6fd83 feat: initialize Nuanji (Warm Notes) project
- Base platform from base.git (ERP base: auth, core, config, message, workflow, plugin)
- Created erp-diary module skeleton (lib.rs, dto.rs, error.rs, event.rs, state.rs)
- Integrated erp-diary into workspace and erp-server
- Added DiaryModule registration in main.rs
- Added DiaryState FromRef in state.rs
- Diary routes mounted (empty routes, ready for implementation)
- Product design spec v1.2 preserved in docs/
- Implementation plan preserved in plans/

Cargo check: OK
Cargo test: OK (78+ base tests passing)
2026-05-31 20:52:19 +08:00

14 lines
307 B
Rust

// erp-diary State 定义
use sea_orm::DatabaseConnection;
use erp_core::crypto::PiiCrypto;
use erp_core::events::EventBus;
/// 暖记模块状态,通过 Axum State 提取
#[derive(Clone)]
pub struct DiaryState {
pub db: DatabaseConnection,
pub event_bus: EventBus,
pub crypto: PiiCrypto,
}