Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5ab4aa426
|
||
|
|
ad632fca16
|
||
|
|
86febdab0d
|
||
|
|
7534e8652f
|
@@ -5,6 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check
|
name: Check
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check
|
name: Check
|
||||||
|
|||||||
Generated
+1
-1
@@ -521,7 +521,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "textsender_models"
|
name = "textsender_models"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const_format",
|
"const_format",
|
||||||
"dotenvy",
|
"dotenvy",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "textsender_models"
|
name = "textsender_models"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.96"
|
rust-version = "1.96"
|
||||||
description = "Models used for the textsender project"
|
description = "Models used for the textsender project"
|
||||||
|
|||||||
+3
-1
@@ -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 Contact {
|
pub struct Contact {
|
||||||
#[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
#[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
||||||
pub id: Option<uuid::Uuid>,
|
pub id: Option<uuid::Uuid>,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_INSTANT: &str = "INSTANT";
|
pub const MESSAGE_EVENT_RESPONSE_STATUS_INSTANT: &str = "INSTANT";
|
||||||
pub const MESSAGE_EVENT_RESPONSE_STATUS_SCHEDULED: &str = "SCHEDULED";
|
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 struct MessageEventResponse {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub scheduled_message_event_id: uuid::Uuid,
|
pub scheduled_message_event_id: uuid::Uuid,
|
||||||
|
|||||||
+3
-1
@@ -1,7 +1,9 @@
|
|||||||
pub mod event;
|
pub mod event;
|
||||||
pub mod scheduling;
|
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 {
|
pub struct Message {
|
||||||
#[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
#[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
||||||
pub id: Option<uuid::Uuid>,
|
pub id: Option<uuid::Uuid>,
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
#[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 struct ScheduledMessageEvent {
|
||||||
id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
contact_id: uuid::Uuid,
|
pub contact_id: uuid::Uuid,
|
||||||
message_id: uuid::Uuid,
|
pub message_id: uuid::Uuid,
|
||||||
scheduled_message_id: uuid::Uuid,
|
pub scheduled_message_id: uuid::Uuid,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
created: Option<time::OffsetDateTime>,
|
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 struct ScheduledMessage {
|
||||||
id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
scheduled: Option<time::OffsetDateTime>,
|
pub scheduled: Option<time::OffsetDateTime>,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
created: Option<time::OffsetDateTime>,
|
pub created: Option<time::OffsetDateTime>,
|
||||||
status: String,
|
pub status: String,
|
||||||
user_id: uuid::Uuid,
|
pub user_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const READY: &str = "READY";
|
pub const READY: &str = "READY";
|
||||||
|
|||||||
+19
-7
@@ -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 User {
|
pub struct User {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub phone_number: String,
|
pub phone_number: String,
|
||||||
@@ -16,7 +18,9 @@ pub struct User {
|
|||||||
pub salt_id: uuid::Uuid,
|
pub salt_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
#[derive(
|
||||||
|
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||||
|
)]
|
||||||
pub struct ServiceUser {
|
pub struct ServiceUser {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
@@ -30,7 +34,9 @@ pub struct ServiceUser {
|
|||||||
pub salt_id: uuid::Uuid,
|
pub salt_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
#[derive(
|
||||||
|
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||||
|
)]
|
||||||
pub struct Organization {
|
pub struct Organization {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@@ -38,7 +44,9 @@ pub struct Organization {
|
|||||||
pub created: Option<time::OffsetDateTime>,
|
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 UserLoginHistory {
|
pub struct UserLoginHistory {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
@@ -46,7 +54,9 @@ pub struct UserLoginHistory {
|
|||||||
pub user_id: uuid::Uuid,
|
pub user_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
#[derive(
|
||||||
|
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||||
|
)]
|
||||||
pub struct ServiceUserLoginHistory {
|
pub struct ServiceUserLoginHistory {
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
@@ -54,7 +64,9 @@ pub struct ServiceUserLoginHistory {
|
|||||||
pub service_user_id: uuid::Uuid,
|
pub service_user_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
|
#[derive(
|
||||||
|
Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||||
|
)]
|
||||||
pub struct UserProfile {
|
pub struct UserProfile {
|
||||||
pub user_id: uuid::Uuid,
|
pub user_id: uuid::Uuid,
|
||||||
pub phone_number: String,
|
pub phone_number: String,
|
||||||
@@ -67,7 +79,7 @@ pub struct UserProfile {
|
|||||||
pub last_login: Option<time::OffsetDateTime>,
|
pub last_login: Option<time::OffsetDateTime>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize)]
|
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow)]
|
||||||
pub struct Salt {
|
pub struct Salt {
|
||||||
// #[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
// #[serde(skip_serializing_if = "crate::init::is_uuid_nil")]
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
|
|||||||
Reference in New Issue
Block a user