0.6 rust重构01
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
pub mod audit;
|
||||
pub mod entities;
|
||||
pub mod ids;
|
||||
pub mod time;
|
||||
pub mod types;
|
||||
|
||||
pub use audit::{ActorRef, AuditInfo, ChangeReason, RefLink, SourceKind};
|
||||
pub use entities::{
|
||||
AgentSession, Asset, AssetKind, AssetStatus, AssetVersion, Block, BlockType, CommandLog,
|
||||
CommandStatus, DomainEvent, EventType, Page, PageStatus, PageType, Reference, ReferenceKind,
|
||||
Task, TaskPriority, TaskStatus, TaskType, Workspace,
|
||||
};
|
||||
pub use ids::{
|
||||
AgentSessionId, AssetId, AssetVersionId, BlockId, CommandLogId, EventId, PageId, ReferenceId,
|
||||
TaskId, WorkspaceId,
|
||||
};
|
||||
pub use time::Timestamp;
|
||||
pub use types::{Locale, Revision};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn revision_initial_is_one() {
|
||||
assert_eq!(Revision::initial().0, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn workspace_id_keeps_original_value() {
|
||||
let workspace_id = WorkspaceId::new("ws_demo");
|
||||
assert_eq!(workspace_id.as_str(), "ws_demo");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user