Implemented a domain layer, because the API DTO's where getting bloated.

This commit is contained in:
2026-09-26 17:22:10 +02:00
parent 04debfba7b
commit 4737bd5c81
24 changed files with 1103 additions and 538 deletions
+26
View File
@@ -0,0 +1,26 @@
mod cents;
mod direction;
mod recurring_transaction;
mod schedule;
mod transaction;
pub use cents::{Cents, CentsConversionError};
pub use direction::Direction;
pub use recurring_transaction::RecurringTransaction;
pub use schedule::{
Recurrence, RecurrenceInterval, RecurrenceIntervalError, RecurrenceUnit, Schedule,
WeekendAdjustment,
};
pub use transaction::Transaction;
#[derive(Debug, thiserror::Error)]
pub enum ValidationError {
#[error(transparent)]
Amount(#[from] CentsConversionError),
#[error(transparent)]
RecurrenceInterval(#[from] RecurrenceIntervalError),
#[error("end must not be before start")]
EndBeforeStart,
}