37 lines
890 B
Rust
37 lines
890 B
Rust
use core_domain::Timestamp;
|
|||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub enum EventStatus {
|
||
|
|
Pending,
|
||
|
|
Committed,
|
||
|
|
Rejected,
|
||
|
|
Failed,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct DomainEventRecord {
|
||
|
|
pub event_id: String,
|
||
|
|
pub workspace_id: String,
|
||
|
|
pub aggregate_type: String,
|
||
|
|
pub aggregate_id: String,
|
||
|
|
pub event_type: String,
|
||
|
|
pub event_version: u32,
|
||
|
|
pub payload_json: String,
|
||
|
|
pub command_log_id: String,
|
||
|
|
pub actor_type: String,
|
||
|
|
pub created_at: Timestamp,
|
||
|
|
pub status: EventStatus,
|
||
|
|
pub trace_id: String,
|
||
|
|
pub request_id: String,
|
||
|
|
pub command_id: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct EventGenerationOutcome {
|
||
|
|
pub command_log_id: String,
|
||
|
|
pub emitted_event_ids: Vec<String>,
|
||
|
|
pub generated_for_replay: bool,
|
||
|
|
pub generated_for_audit: bool,
|
||
|
|
pub generated_for_index_catchup: bool,
|
||
|
|
}
|