From 458a24d09f95eefb161728d9676ecdfca30e3f5e Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 8 Sep 2024 17:02:33 +0200 Subject: Split flow.py to simulate.py and model.py model.py should be a file containing only dataclasses to model finance. simulate.py should take care of the simulation of that finance data to create a financial forecast. --- finance/model.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 finance/model.py (limited to 'finance/model.py') diff --git a/finance/model.py b/finance/model.py new file mode 100644 index 0000000..8bf2e3d --- /dev/null +++ b/finance/model.py @@ -0,0 +1,12 @@ +import dataclasses +import datetime +import decimal + + +@dataclasses.dataclass(kw_only=True, frozen=True) +class Flow: + """Time-discrete flow of money paid on the first day of a month""" + + amount: decimal.Decimal + since: None | datetime.datetime + until: None | datetime.datetime -- cgit v1.2.3-70-g09d2