This commit is contained in:
vextrixes committed 2026-10-27 20:07:41 +01:00
1 parent 263568baa4
commit 092fd94abf
3 files changed
+300 -19

No files matched your search

+194 -19
View File
@@ -1,43 +1,218 @@
use chrono::{DateTime, Utc};
use chrono::{DateTime, FixedOffset};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassfundSummary {
pub student_name_with_class: String,
pub student_name_with_class: Option<String>,
pub balance: f64,
pub spent: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassfundPayments {
pub monthly_data: Vec<PaymentMonthlyData>,
pub struct ClassFundPaymentInfo {
instructions: Option<String>,
bank_account: Option<String>,
variable_symbol: Option<i64>,
specific_symbol: i64,
amount: f64,
message: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentMonthlyData {
pub date: DateTime<Utc>,
pub monthly_balance: i64,
pub items: Vec<Payment>,
pub struct ClassFundRecord {
description: Option<String>,
date: DateTime<FixedOffset>,
amount: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Payment {
pub description: String,
pub date: DateTime<Utc>,
pub amount: i64,
pub struct ClassFundSummary {
student_name_with_class: Option<String>,
balance: f64,
spent: f64
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AddBalance {
pub instructions: String,
pub bank_account: String,
pub variable_symbol: u32,
pub specific_symbol: u32,
pub amount: i64,
pub message: String,
pub struct ClassFundTeacherDocumentDetailStudent {
full_name_with_class: Option<String>,
amount: f64,
status: Option<String> //Option<PaymentsTeacherStudentStatus>, enum "Active" "Canceled"
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherDocumentDetail{
title: Option<String>,
amount: f64,
date: DateTime<FixedOffset>,
student_count: i64,
students: Option<Vec<ClassFundTeacherDocumentDetailStudent>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherDocumentsItem{
id: i64,
title: Option<String>,
date: DateTime<FixedOffset>,
total_amount: f64,
amount_per_student: f64,
student_count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherDocumentsMonthly{
date: DateTime<FixedOffset>,
monthly_balance: f64,
items: Vec<ClassFundTeacherDocumentsItem>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherStudentsItem{
variable_symbol: i64,
name: Option<String>,
registration_number: Option<i64>,
balance: f64,
status: String//PaymentsTeacherStudentStatus, enum "Active" "Canceled
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherSummaryClass{
abbrev: Option<String>,
class_id: Option<String>,
balance: f64,
amount_to_pay: f64,
debtors: i64,
spent: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClassFundTeacherSummary{
teacher_name: Option<String>,
allowed_classes: Option<Vec<ClassFundTeacherSummaryClass>>,
}
//------------------------------------------------------------------------------------------------------------------------------------------------------------
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPaymentDetail{
title: Option<String>,
due_date: DateTime<FixedOffset>,
amount: f64,
original_amount: f64,
status: String, //r16 = <RegularPaymentStatus> "BeforeDueDate", "NotPaid", "Paid", "PartiallyPaid"
bank_account: Option<String>,
variable_symbol: Option<i64>,
specific_symbol: Option<i64>,
message: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPayment{
payment_id: i64,
title: Option<String>,
due_date: DateTime<FixedOffset>,
amount: f64,
status: String, //r16 = <RegularPaymentStatus> "BeforeDueDate", "NotPaid", "Paid", "PartiallyPaid"
original_amount: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPaymentsSummary{
pub balance: f64,
pub paid: f64,
pub amount_scheduled: f64,
pub student_name_with_class: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionDetailItem {
pub due_date: DateTime<FixedOffset>,
pub title: Option<String>,
pub amount: f64,
pub advance_notice_date: DateTime<FixedOffset>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionDetail {
pub id: i64,
pub title: Option<String>,
pub payment_type_id: i64,
pub payment_type_name: Option<String>,
pub amount: f64,
pub state: String, //r16 = <RegularPrescriptionState> "Paid", "PaidNotActive","unknown","Unpaid", "UnpaidNotActive"
pub due_date_max: DateTime<FixedOffset>,
pub bank_account: Option<String>,
pub specific_symbol: Option<i64>,
pub items: Option<Vec<RegularPrescriptionDetailItem>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionDocumentLine {
pub date: DateTime<FixedOffset>,
pub title: Option<String>,
pub amount: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionRegulationLine {
pub due_date: DateTime<FixedOffset>,
pub title: Option<String>,
pub amount: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionStudentDetail {
pub id: i64,
pub last_name: Option<String>,
pub first_name: Option<String>,
pub full_name: Option<String>,
pub title: Option<String>,
pub balance: f64,
pub total_regulation_amount: f64,
pub status: String, //PaymentsTeacherStudentStatus, enum "Active" "Canceled"
pub document_lines: Option<Vec<RegularPrescriptionDocumentLine>>,
pub regulation_lines: Option<Vec<RegularPrescriptionRegulationLine>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescriptionStudent {
pub id: i64,
pub last_name: Option<String>,
pub first_name: Option<String>,
pub full_name: Option<String>,
pub balance: f64,
pub status: String, //PaymentsTeacherStudentStatus, enum "Active" "Canceled"
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegularPrescription {
pub id: i64,
pub title: Option<String>,
pub payment_type_id: i64,
pub payment_type_name: Option<String>,
pub amount: f64,
pub state: String, //PaymentsTeacherStudentStatus, enum "Active" "Canceled"
pub due_date_max: Option<DateTime<FixedOffset>>,
pub students_count: i64,
}
+41
View File
@@ -0,0 +1,41 @@
use chrono::{DateTime, FixedOffset};
use serde::{Deserialize, Serialize};
use crate::{StdTypeNullable};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CertificateTerms {
pub certificate_terms: Vec<CertificateTerm>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CertificateTerm {
pub final_marks: Option<Vec<FinalMark>>,
pub subjects: Option<Vec<StdTypeNullable>>,
pub grade_name: String,
pub grade: i64,
pub year_in_school: i64,
pub school_year: String,
pub semester: String,
pub semester_name: String,
pub repeated: bool,
pub closed: bool,
pub achievement_text: Option<String>,
pub absent_hours: Option<i64>,
pub not_excused_hours: Option<i64>,
pub marks_average: Option<f64>,
pub certificate_date: Option<DateTime<FixedOffset>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FinalMark {
pub mark_date: DateTime<FixedOffset>,
pub edit_date: DateTime<FixedOffset>,
pub mark_text: String,
pub subject_id: String,
pub id: String,
}
+65
View File
@@ -8,6 +8,23 @@ pub struct StdType {
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct StdTypeNullable {
pub id: Option<String>,
pub abbrev: Option<String>,
pub name: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SchoolClass {
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct StdClassGroup {
@@ -16,3 +33,51 @@ pub struct StdClassGroup {
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SchoolClassSet {
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Teacher {
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct TeacherSet{
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Room{
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RoomSet{
pub id: String,
pub abbrev: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Student{
pub id: String,
pub abbrev: String,
pub name: String,
}