added payments
This commit is contained in:
3 files changed
+44
-1
No files matched your search
@@ -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};
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
- [ ] lesson
|
||||
- [x] marks
|
||||
- [ ] measures
|
||||
- [ ] payments
|
||||
- [x] payments
|
||||
- [x] subjects
|
||||
- [ ] substitutions
|
||||
- [x] themes
|
||||
|
||||
Reference in new issue
Block a user