Initial commit
This commit is contained in:
27
backend/src/websocket.rs
Executable file
27
backend/src/websocket.rs
Executable file
@@ -0,0 +1,27 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct SyncProgress {
|
||||
pub job_id: i32,
|
||||
pub job_type: String,
|
||||
pub sync_direction: String,
|
||||
pub progress_percentage: f64,
|
||||
pub records_processed: i32,
|
||||
pub records_failed: i32,
|
||||
pub current_entity: Option<String>,
|
||||
pub estimated_completion: Option<String>,
|
||||
pub status: String,
|
||||
pub message: Option<String>,
|
||||
pub timestamp: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct WsSubscribeRequest {
|
||||
pub job_id: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct WsMessage {
|
||||
pub kind: String,
|
||||
pub data: serde_json::Value,
|
||||
}
|
||||
Reference in New Issue
Block a user