Rust Build / Check (pull_request) Successful in 43s
Rust Build / Test Suite (pull_request) Successful in 34s
Rust Build / Rustfmt (pull_request) Successful in 27s
Rust Build / Clippy (pull_request) Successful in 35s
Rust Build / build (pull_request) Successful in 34s
Release Tagging / release (pull_request) Successful in 35s
28 lines
851 B
Rust
28 lines
851 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, utoipa::ToSchema)]
|
|
pub struct ScheduledMessageEvent {
|
|
id: uuid::Uuid,
|
|
contact_id: uuid::Uuid,
|
|
message_id: uuid::Uuid,
|
|
scheduled_message_id: uuid::Uuid,
|
|
#[serde(with = "time::serde::rfc3339::option")]
|
|
created: Option<time::OffsetDateTime>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
|
pub struct ScheduledMessage {
|
|
id: uuid::Uuid,
|
|
#[serde(with = "time::serde::rfc3339::option")]
|
|
scheduled: Option<time::OffsetDateTime>,
|
|
#[serde(with = "time::serde::rfc3339::option")]
|
|
created: Option<time::OffsetDateTime>,
|
|
status: String,
|
|
user_id: uuid::Uuid,
|
|
}
|
|
|
|
pub const READY: &str = "READY";
|
|
pub const PENDING: &str = "PENDING";
|
|
pub const PROCESSING: &str = "PROCESSING";
|
|
pub const DONE: &str = "DONE";
|