added payments

This commit is contained in:
vextrixes committed 2026-10-25 14:16:05 +01:00
1 parent b54908c906
commit bf2a18c239
3 files changed
+44 -1

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ mod error;
mod events;
mod homework;
mod marks;
mod payments;
mod stdtype;
mod subjects;
mod themes;
@@ -17,6 +18,7 @@ pub use error::Error;
pub use events::Events;
pub use homework::{Homework, HomeworkListItem};
pub use marks::{Mark, Marks, SubjectMarks};
pub use payments::{ClassfundPayments, ClassfundSummary, Payment, PaymentMonthlyData, AddBalance};
pub use stdtype::StdType;
pub use subjects::{Subject, Subjects};
pub use themes::{Theme, Themes};
+41
View File
@@ -0,0 +1,41 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassfundSummary {
pub student_name_with_class: String,
pub balance: f64,
pub spent: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassfundPayments {
pub monthly_data: Vec<PaymentMonthlyData>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentMonthlyData {
pub date: DateTime<Utc>,
pub monthly_balance: i64,
pub items: Vec<Payment>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Payment {
pub description: String,
pub date: DateTime<Utc>,
pub amount: i64,
}
pub struct AddBalance {
pub instructions: String,
pub bank_account: String,
pub variable_symbol: u32,
pub specific_symbol: u32,
pub amount: i64,
pub message: String,
}