use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WriteChannel {
pub id: i64,
pub name: String,
pub write_cap: Vec<u8>,
pub next_index: Vec<u8>,
pub created_at: i64,
pub updated_at: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReadChannel {
pub id: i64,
pub name: String,
pub read_cap: Vec<u8>,
pub next_index: Vec<u8>,
pub created_at: i64,
pub updated_at: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PendingMessage {
pub id: i64,
pub write_channel_id: i64,
pub plaintext: Vec<u8>,
pub message_ciphertext: Vec<u8>,
pub envelope_descriptor: Vec<u8>,
pub envelope_hash: Vec<u8>,
pub box_index: Vec<u8>,
pub attempts: i32,
pub status: String,
pub created_at: i64,
pub last_attempt_at: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReceivedMessage {
pub id: i64,
pub read_channel_id: i64,
pub plaintext: Vec<u8>,
pub box_index: Vec<u8>,
pub received_at: i64,
pub is_read: bool,
}