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
15// Core event sourcing value objects
16pub mod embedding_vector;
17pub mod entity_id;
18pub mod event_id;
19pub mod event_type;
20pub mod fork_id;
21pub mod partition_key;
22pub mod projection_name;
23pub mod schema_subject;
24pub mod stream_name;
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 tenant_id::TenantId;
46pub use version::Version;
47
48// Paywall re-exports
49pub use article_id::ArticleId;
50pub use creator_id::CreatorId;
51pub use money::{Currency, Money};
52pub use transaction_id::TransactionId;
53pub use wallet_address::WalletAddress;