Adding sqlx::FromRow trait
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_INSTANT: &str = "INSTANT";
|
||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_SCHEDULED: &str = "SCHEDULED";
|
||||
|
||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||
)]
|
||||
pub struct MessageEventResponse {
|
||||
pub id: uuid::Uuid,
|
||||
pub scheduled_message_event_id: uuid::Uuid,
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
pub mod event;
|
||||
pub mod scheduling;
|
||||
|
||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||
)]
|
||||
pub struct Message {
|
||||
#[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
||||
pub id: Option<uuid::Uuid>,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||
)]
|
||||
pub struct ScheduledMessageEvent {
|
||||
pub id: uuid::Uuid,
|
||||
pub contact_id: uuid::Uuid,
|
||||
@@ -8,7 +10,9 @@ pub struct ScheduledMessageEvent {
|
||||
pub created: Option<time::OffsetDateTime>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||
)]
|
||||
pub struct ScheduledMessage {
|
||||
pub id: uuid::Uuid,
|
||||
#[serde(with = "time::serde::rfc3339::option")]
|
||||
|
||||
Reference in New Issue
Block a user