Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e126e4bc06
|
||
|
|
d99aa2587a
|
@@ -1,18 +1,16 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_INSTANT: &str = "INSTANT";
|
|
||||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_SCHEDULED: &str = "SCHEDULED";
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
|
||||||
pub struct MessageEventResponse {
|
pub struct MessageEventResponse {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub scheduled_message_event_id: uuid::Uuid,
|
pub scheduledMessageEventId: uuid::Uuid,
|
||||||
// Json field
|
// Json field
|
||||||
pub response: String,
|
pub response: String,
|
||||||
pub user_id: uuid::Uuid,
|
pub userId: uuid::Uuid,
|
||||||
pub contact_id: uuid::Uuid,
|
pub contact_id: uuid::Uuid,
|
||||||
pub message_id: uuid::Uuid,
|
pub message_id: uuid::Uuid,
|
||||||
pub status: String,
|
pub status: string,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
pub sent: Option<time::OffsetDateTime>,
|
pub sent: Option<time::OffsetDateTime>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
pub mod event;
|
pub mod event;
|
||||||
pub mod scheduling;
|
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
|
||||||
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";
|
|
||||||
Reference in New Issue
Block a user