Skip to main content

allsource_core/domain/value_objects/
mod.rs

1/// Value Objects Module
2///
3/// Value objects are immutable objects defined by their value, not their identity.
4/// They encapsulate domain concepts and enforce business rules through validation.
5///
6/// Characteristics of value objects:
7/// - Immutable
8/// - Defined by value equality (not identity)
9/// - Self-validating
10/// - No lifecycle
11/// - Can be freely copied/cloned
12///
13/// Examples: TenantId, EventType, EntityId, PartitionKey, EventId, Version, Money, etc.
14// Core event sourcing value objects
15pub mod embedding_vector;
16pub mod entity_id;
17pub mod event_id;
18pub mod event_type;
19pub mod fork_id;
20pub mod partition_key;
21pub mod projection_name;
22pub mod schema_subject;
23pub mod stream_name;
24pub mod system_stream;
25pub mod tenant_id;
26pub mod version;
27
28// Paywall domain value objects
29pub mod article_id;
30pub mod creator_id;
31pub mod money;
32pub mod transaction_id;
33pub mod wallet_address;
34
35// Core re-exports
36pub use embedding_vector::{DistanceMetric, EmbeddingVector, SimilarityScore};
37pub use entity_id::EntityId;
38pub use event_id::EventId;
39pub use event_type::EventType;
40pub use fork_id::ForkId;
41pub use partition_key::PartitionKey;
42pub use projection_name::ProjectionName;
43pub use schema_subject::SchemaSubject;
44pub use stream_name::StreamName;
45pub use system_stream::SystemDomain;
46pub use tenant_id::TenantId;
47pub use version::Version;
48
49// Paywall re-exports
50pub use article_id::ArticleId;
51pub use creator_id::CreatorId;
52pub use money::{Currency, Money};
53pub use transaction_id::TransactionId;
54pub use wallet_address::WalletAddress;