diff --git a/src/campaign.rs b/src/campaign.rs new file mode 100644 index 0000000..9664e51 --- /dev/null +++ b/src/campaign.rs @@ -0,0 +1,14 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "PascalCase")] +pub struct Campaign { + pub message_id: i64, + pub priority: i64, + pub authorized: bool, + pub consent_required: bool, + pub delayed_show: i64, + pub image_url: String, + pub link_url: Option, + pub salt: Option, +} diff --git a/src/lib.rs b/src/lib.rs index aeb4bba..7662e2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ mod absence; mod api_info; mod attachment; //campaign +mod campaign; mod error; mod events; mod gdpr; @@ -23,6 +24,7 @@ mod user; //TODOS pub use absence::{AbsenceDay, StudentAbsenceOverviewResponse, SubjectAbsence}; pub use api_info::ApiInfo; pub use attachment::AttachmentInfo; +pub use campaign::Campaign; pub use error::{Error, ModelState, StringArray}; pub use events::{Event, EventTime, EventType, Events}; pub use gdpr::{ diff --git a/src/user/mod.rs b/src/user/mod.rs index 49b3c9b..fd87e59 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -1,7 +1,7 @@ mod modules; mod setting_modules; -mod user; +mod user_info; pub use modules::*; pub use setting_modules::*; -pub use user::*; +pub use user_info::*; diff --git a/src/user/user.rs b/src/user/user_info.rs similarity index 100% rename from src/user/user.rs rename to src/user/user_info.rs diff --git a/tracker.md b/tracker.md index 8e9305e..a9fb0fe 100644 --- a/tracker.md +++ b/tracker.md @@ -1,9 +1,11 @@ # implementations - [ ] absence -- [ ] campaign +- [x] campaign +- [ ] campaign error - [ ] class book - [x] events +- [ ] error - [x] gdpr - [x] homeworks - [ ] komens